From aeb7aaacdd6a6fc8791a0be91cfc2544c9db346f Mon Sep 17 00:00:00 2001
From: Enrico Zimuel
Date: Wed, 2 Mar 2022 00:14:18 +0100
Subject: [PATCH] First commit for 8.0.0-alpha release
---
.ci/run-repository.sh | 2 +-
.ci/test-matrix.yml | 2 +-
.gitattributes | 3 -
.github/workflows/test.yml | 24 +-
.gitignore | 2 +-
.php_cs | 23 -
BREAKING_CHANGES.md | 23 +
CHANGELOG.md | 47 +
LICENSE | 23 +-
LICENSE-APACHE | 174 -
LICENSE-LGPL | 459 -
NOTICE | 32 -
README.md | 520 +-
composer.json | 57 +-
phpstan.neon | 8 +-
phpunit-integration-tests.xml | 18 -
phpunit-yaml-free-tests.xml | 4 +-
phpunit-yaml-platinum-tests.xml | 2 +-
phpunit.xml.dist | 2 +-
ruleset.xml | 7 -
src/Client.php | 169 +
src/ClientBuilder.php | 406 +
src/Elasticsearch/Client.php | 1906 -
src/Elasticsearch/ClientBuilder.php | 849 -
src/Elasticsearch/Common/EmptyLogger.php | 39 -
.../AuthenticationConfigException.php | 22 -
.../Exceptions/BadMethodCallException.php | 28 -
.../Exceptions/BadRequest400Exception.php | 23 -
.../ClientErrorResponseException.php | 23 -
.../Exceptions/Conflict409Exception.php | 23 -
.../Exceptions/Curl/CouldNotConnectToHost.php | 26 -
.../Curl/CouldNotResolveHostException.php | 26 -
.../Curl/OperationTimeoutException.php | 26 -
.../ElasticCloudIdParseException.php | 21 -
.../Exceptions/ElasticsearchException.php | 23 -
.../Exceptions/Forbidden403Exception.php | 23 -
.../Exceptions/InvalidArgumentException.php | 23 -
.../Common/Exceptions/MaxRetriesException.php | 23 -
.../Common/Exceptions/Missing404Exception.php | 23 -
.../Exceptions/NoDocumentsToGetException.php | 23 -
.../Exceptions/NoNodesAvailableException.php | 23 -
.../Exceptions/NoShardAvailableException.php | 23 -
.../Exceptions/RequestTimeout408Exception.php | 23 -
.../Exceptions/RoutingMissingException.php | 23 -
.../Common/Exceptions/RuntimeException.php | 23 -
.../ScriptLangNotSupportedException.php | 23 -
.../Serializer/JsonErrorException.php | 82 -
.../ServerErrorResponseException.php | 23 -
.../Common/Exceptions/TransportException.php | 23 -
.../Exceptions/Unauthorized401Exception.php | 23 -
.../Exceptions/UnexpectedValueException.php | 23 -
.../ConnectionPool/AbstractConnectionPool.php | 92 -
.../ConnectionPoolInterface.php | 28 -
.../Selectors/RandomSelector.php | 34 -
.../Selectors/RoundRobinSelector.php | 43 -
.../Selectors/SelectorInterface.php | 31 -
.../Selectors/StickyRoundRobinSelector.php | 54 -
.../ConnectionPool/SimpleConnectionPool.php | 45 -
.../ConnectionPool/SniffingConnectionPool.php | 167 -
.../ConnectionPool/StaticConnectionPool.php | 101 -
.../StaticNoPingConnectionPool.php | 84 -
src/Elasticsearch/Connections/Connection.php | 810 -
.../Connections/ConnectionFactory.php | 71 -
.../ConnectionFactoryInterface.php | 24 -
.../Connections/ConnectionInterface.php | 79 -
.../Endpoints/AbstractEndpoint.php | 316 -
.../Endpoints/AsyncSearch/Delete.php | 51 -
.../Endpoints/AsyncSearch/Get.php | 55 -
.../Endpoints/AsyncSearch/Status.php | 51 -
.../Endpoints/AsyncSearch/Submit.php | 102 -
.../Autoscaling/DeleteAutoscalingPolicy.php | 62 -
.../Autoscaling/GetAutoscalingCapacity.php | 46 -
.../Autoscaling/GetAutoscalingPolicy.php | 62 -
.../Autoscaling/PutAutoscalingPolicy.php | 72 -
src/Elasticsearch/Endpoints/Bulk.php | 96 -
src/Elasticsearch/Endpoints/Cat/Aliases.php | 72 -
.../Endpoints/Cat/Allocation.php | 73 -
src/Elasticsearch/Endpoints/Cat/Count.php | 56 -
src/Elasticsearch/Endpoints/Cat/Fielddata.php | 72 -
src/Elasticsearch/Endpoints/Cat/Health.php | 54 -
src/Elasticsearch/Endpoints/Cat/Help.php | 49 -
src/Elasticsearch/Endpoints/Cat/Indices.php | 63 -
src/Elasticsearch/Endpoints/Cat/Master.php | 54 -
.../Endpoints/Cat/MlDataFrameAnalytics.php | 59 -
.../Endpoints/Cat/MlDatafeeds.php | 70 -
src/Elasticsearch/Endpoints/Cat/MlJobs.php | 71 -
.../Endpoints/Cat/MlTrainedModels.php | 72 -
src/Elasticsearch/Endpoints/Cat/NodeAttrs.php | 54 -
src/Elasticsearch/Endpoints/Cat/Nodes.php | 57 -
.../Endpoints/Cat/PendingTasks.php | 55 -
src/Elasticsearch/Endpoints/Cat/Plugins.php | 55 -
src/Elasticsearch/Endpoints/Cat/Recovery.php | 61 -
.../Endpoints/Cat/Repositories.php | 54 -
src/Elasticsearch/Endpoints/Cat/Segments.php | 57 -
src/Elasticsearch/Endpoints/Cat/Shards.php | 59 -
src/Elasticsearch/Endpoints/Cat/Snapshots.php | 73 -
src/Elasticsearch/Endpoints/Cat/Tasks.php | 57 -
src/Elasticsearch/Endpoints/Cat/Templates.php | 69 -
.../Endpoints/Cat/ThreadPool.php | 73 -
.../Endpoints/Cat/Transforms.php | 71 -
.../Endpoints/Ccr/DeleteAutoFollowPattern.php | 62 -
src/Elasticsearch/Endpoints/Ccr/Follow.php | 63 -
.../Endpoints/Ccr/FollowInfo.php | 51 -
.../Endpoints/Ccr/FollowStats.php | 51 -
.../Endpoints/Ccr/ForgetFollower.php | 61 -
.../Endpoints/Ccr/GetAutoFollowPattern.php | 61 -
.../Endpoints/Ccr/PauseAutoFollowPattern.php | 62 -
.../Endpoints/Ccr/PauseFollow.php | 51 -
.../Endpoints/Ccr/PutAutoFollowPattern.php | 72 -
.../Endpoints/Ccr/ResumeAutoFollowPattern.php | 62 -
.../Endpoints/Ccr/ResumeFollow.php | 61 -
src/Elasticsearch/Endpoints/Ccr/Stats.php | 46 -
src/Elasticsearch/Endpoints/Ccr/Unfollow.php | 51 -
src/Elasticsearch/Endpoints/ClearScroll.php | 79 -
.../Endpoints/ClosePointInTime.php | 58 -
.../Endpoints/Cluster/AllocationExplain.php | 59 -
.../Cluster/DeleteComponentTemplate.php | 65 -
.../Cluster/DeleteVotingConfigExclusions.php | 48 -
.../Cluster/ExistsComponentTemplate.php | 65 -
.../Cluster/GetComponentTemplate.php | 67 -
.../Endpoints/Cluster/GetSettings.php | 51 -
.../Endpoints/Cluster/Health.php | 63 -
.../Endpoints/Cluster/PendingTasks.php | 49 -
.../Cluster/PostVotingConfigExclusions.php | 50 -
.../Cluster/PutComponentTemplate.php | 76 -
.../Endpoints/Cluster/PutSettings.php | 60 -
.../Endpoints/Cluster/RemoteInfo.php | 48 -
.../Endpoints/Cluster/Reroute.php | 63 -
src/Elasticsearch/Endpoints/Cluster/State.php | 77 -
src/Elasticsearch/Endpoints/Cluster/Stats.php | 67 -
src/Elasticsearch/Endpoints/Count.php | 75 -
src/Elasticsearch/Endpoints/Create.php | 84 -
.../DanglingIndices/DeleteDanglingIndex.php | 66 -
.../DanglingIndices/ImportDanglingIndex.php | 66 -
.../DanglingIndices/ListDanglingIndices.php | 48 -
src/Elasticsearch/Endpoints/Delete.php | 75 -
src/Elasticsearch/Endpoints/DeleteByQuery.php | 94 -
.../Endpoints/DeleteByQueryRethrottle.php | 64 -
src/Elasticsearch/Endpoints/DeleteScript.php | 54 -
.../Endpoints/Enrich/DeletePolicy.php | 62 -
.../Endpoints/Enrich/ExecutePolicy.php | 64 -
.../Endpoints/Enrich/GetPolicy.php | 64 -
.../Endpoints/Enrich/PutPolicy.php | 72 -
src/Elasticsearch/Endpoints/Enrich/Stats.php | 46 -
src/Elasticsearch/Endpoints/Eql/Delete.php | 51 -
src/Elasticsearch/Endpoints/Eql/Get.php | 54 -
src/Elasticsearch/Endpoints/Eql/GetStatus.php | 51 -
src/Elasticsearch/Endpoints/Eql/Search.php | 65 -
src/Elasticsearch/Endpoints/Exists.php | 63 -
src/Elasticsearch/Endpoints/ExistsSource.php | 76 -
src/Elasticsearch/Endpoints/Explain.php | 75 -
.../Endpoints/Features/GetFeatures.php | 48 -
.../Endpoints/Features/ResetFeatures.php | 46 -
src/Elasticsearch/Endpoints/FieldCaps.php | 66 -
.../Endpoints/Fleet/GlobalCheckpoints.php | 56 -
src/Elasticsearch/Endpoints/Fleet/Msearch.php | 80 -
src/Elasticsearch/Endpoints/Fleet/Search.php | 65 -
src/Elasticsearch/Endpoints/Get.php | 63 -
src/Elasticsearch/Endpoints/GetScript.php | 53 -
.../Endpoints/GetScriptContext.php | 48 -
.../Endpoints/GetScriptLanguages.php | 48 -
src/Elasticsearch/Endpoints/GetSource.php | 62 -
src/Elasticsearch/Endpoints/Graph/Explore.php | 64 -
.../Endpoints/Ilm/DeleteLifecycle.php | 64 -
.../Endpoints/Ilm/ExplainLifecycle.php | 54 -
.../Endpoints/Ilm/GetLifecycle.php | 63 -
src/Elasticsearch/Endpoints/Ilm/GetStatus.php | 48 -
.../Endpoints/Ilm/MigrateToDataTiers.php | 58 -
.../Endpoints/Ilm/MoveToStep.php | 63 -
.../Endpoints/Ilm/PutLifecycle.php | 74 -
.../Endpoints/Ilm/RemovePolicy.php | 53 -
src/Elasticsearch/Endpoints/Ilm/Retry.php | 53 -
src/Elasticsearch/Endpoints/Ilm/Start.php | 48 -
src/Elasticsearch/Endpoints/Ilm/Stop.php | 48 -
src/Elasticsearch/Endpoints/Index.php | 79 -
.../Endpoints/Indices/AddBlock.php | 69 -
.../Endpoints/Indices/Analyze.php | 62 -
.../Endpoints/Indices/ClearCache.php | 59 -
.../Endpoints/Indices/CloneIndices.php | 77 -
src/Elasticsearch/Endpoints/Indices/Close.php | 58 -
.../Endpoints/Indices/Create.php | 65 -
.../Endpoints/Indices/CreateDataStream.php | 64 -
.../Endpoints/Indices/DataStreamsStats.php | 64 -
.../Endpoints/Indices/Delete.php | 57 -
.../Endpoints/Indices/DeleteAlias.php | 76 -
.../Endpoints/Indices/DeleteDataStream.php | 67 -
.../Endpoints/Indices/DeleteIndexTemplate.php | 65 -
.../Endpoints/Indices/DeleteTemplate.php | 65 -
.../Endpoints/Indices/DiskUsage.php | 57 -
.../Endpoints/Indices/Exists.php | 58 -
.../Endpoints/Indices/ExistsAlias.php | 76 -
.../Endpoints/Indices/ExistsIndexTemplate.php | 66 -
.../Endpoints/Indices/ExistsTemplate.php | 69 -
.../Endpoints/Indices/ExistsType.php | 60 -
.../Endpoints/Indices/FieldUsageStats.php | 56 -
src/Elasticsearch/Endpoints/Indices/Flush.php | 56 -
.../Endpoints/Indices/ForceMerge.php | 57 -
.../Endpoints/Indices/Freeze.php | 58 -
src/Elasticsearch/Endpoints/Indices/Get.php | 59 -
.../Endpoints/Indices/GetAlias.php | 76 -
.../Endpoints/Indices/GetDataStream.php | 66 -
.../Endpoints/Indices/GetFieldMapping.php | 77 -
.../Endpoints/Indices/GetIndexTemplate.php | 65 -
.../Endpoints/Indices/GetMapping.php | 56 -
.../Endpoints/Indices/GetSettings.php | 79 -
.../Endpoints/Indices/GetTemplate.php | 68 -
.../Endpoints/Indices/MigrateToDataStream.php | 64 -
.../Endpoints/Indices/ModifyDataStream.php | 58 -
src/Elasticsearch/Endpoints/Indices/Open.php | 58 -
.../Endpoints/Indices/PromoteDataStream.php | 64 -
.../Endpoints/Indices/PutAlias.php | 83 -
.../Endpoints/Indices/PutIndexTemplate.php | 76 -
.../Endpoints/Indices/PutMapping.php | 68 -
.../Endpoints/Indices/PutSettings.php | 68 -
.../Endpoints/Indices/PutTemplate.php | 76 -
.../Endpoints/Indices/Recovery.php | 53 -
.../Endpoints/Indices/Refresh.php | 54 -
.../Indices/ReloadSearchAnalyzers.php | 55 -
.../Endpoints/Indices/ResolveIndex.php | 67 -
.../Endpoints/Indices/Rollover.php | 94 -
.../Endpoints/Indices/Segments.php | 55 -
.../Endpoints/Indices/ShardStores.php | 55 -
.../Endpoints/Indices/Shrink.php | 77 -
.../Indices/SimulateIndexTemplate.php | 76 -
.../Endpoints/Indices/SimulateTemplate.php | 75 -
src/Elasticsearch/Endpoints/Indices/Split.php | 77 -
src/Elasticsearch/Endpoints/Indices/Stats.php | 82 -
.../Endpoints/Indices/Unfreeze.php | 58 -
.../Endpoints/Indices/UpdateAliases.php | 59 -
.../Endpoints/Indices/ValidateQuery.php | 80 -
src/Elasticsearch/Endpoints/Info.php | 48 -
.../Endpoints/Ingest/DeletePipeline.php | 54 -
.../Endpoints/Ingest/GeoIpStats.php | 46 -
.../Endpoints/Ingest/GetPipeline.php | 53 -
.../Endpoints/Ingest/ProcessorGrok.php | 48 -
.../Endpoints/Ingest/PutPipeline.php | 65 -
.../Endpoints/Ingest/Simulate.php | 62 -
src/Elasticsearch/Endpoints/KnnSearch.php | 63 -
.../Endpoints/License/Delete.php | 46 -
src/Elasticsearch/Endpoints/License/Get.php | 49 -
.../Endpoints/License/GetBasicStatus.php | 48 -
.../Endpoints/License/GetTrialStatus.php | 48 -
src/Elasticsearch/Endpoints/License/Post.php | 58 -
.../Endpoints/License/PostStartBasic.php | 48 -
.../Endpoints/License/PostStartTrial.php | 49 -
.../Endpoints/Logstash/DeletePipeline.php | 53 -
.../Endpoints/Logstash/GetPipeline.php | 53 -
.../Endpoints/Logstash/PutPipeline.php | 63 -
src/Elasticsearch/Endpoints/MTermVectors.php | 73 -
src/Elasticsearch/Endpoints/Mget.php | 69 -
.../Endpoints/Migration/Deprecations.php | 52 -
.../Migration/GetFeatureUpgradeStatus.php | 48 -
.../Migration/PostFeatureUpgrade.php | 48 -
src/Elasticsearch/Endpoints/Ml/CloseJob.php | 77 -
.../Endpoints/Ml/DeleteCalendar.php | 62 -
.../Endpoints/Ml/DeleteCalendarEvent.php | 74 -
.../Endpoints/Ml/DeleteCalendarJob.php | 74 -
.../Endpoints/Ml/DeleteDataFrameAnalytics.php | 54 -
.../Endpoints/Ml/DeleteDatafeed.php | 64 -
.../Endpoints/Ml/DeleteExpiredData.php | 74 -
.../Endpoints/Ml/DeleteFilter.php | 62 -
.../Endpoints/Ml/DeleteForecast.php | 82 -
src/Elasticsearch/Endpoints/Ml/DeleteJob.php | 65 -
.../Endpoints/Ml/DeleteModelSnapshot.php | 74 -
.../Endpoints/Ml/DeleteTrainedModel.php | 62 -
.../Endpoints/Ml/DeleteTrainedModelAlias.php | 74 -
.../Endpoints/Ml/EstimateModelMemory.php | 58 -
.../Endpoints/Ml/EvaluateDataFrame.php | 56 -
.../Ml/ExplainDataFrameAnalytics.php | 60 -
src/Elasticsearch/Endpoints/Ml/FlushJob.php | 78 -
src/Elasticsearch/Endpoints/Ml/Forecast.php | 66 -
src/Elasticsearch/Endpoints/Ml/GetBuckets.php | 99 -
.../Endpoints/Ml/GetCalendarEvents.php | 68 -
.../Endpoints/Ml/GetCalendars.php | 74 -
.../Endpoints/Ml/GetCategories.php | 93 -
.../Endpoints/Ml/GetDataFrameAnalytics.php | 55 -
.../Ml/GetDataFrameAnalyticsStats.php | 55 -
.../Endpoints/Ml/GetDatafeedStats.php | 64 -
.../Endpoints/Ml/GetDatafeeds.php | 65 -
src/Elasticsearch/Endpoints/Ml/GetFilters.php | 64 -
.../Endpoints/Ml/GetInfluencers.php | 81 -
.../Endpoints/Ml/GetJobStats.php | 64 -
src/Elasticsearch/Endpoints/Ml/GetJobs.php | 65 -
.../Endpoints/Ml/GetModelSnapshots.php | 96 -
.../Endpoints/Ml/GetOverallBuckets.php | 81 -
src/Elasticsearch/Endpoints/Ml/GetRecords.php | 81 -
.../Ml/GetTrainedModelDeploymentStats.php | 62 -
.../Endpoints/Ml/GetTrainedModels.php | 70 -
.../Endpoints/Ml/GetTrainedModelsStats.php | 65 -
.../Ml/InferTrainedModelDeployment.php | 74 -
src/Elasticsearch/Endpoints/Ml/Info.php | 46 -
src/Elasticsearch/Endpoints/Ml/OpenJob.php | 62 -
.../Endpoints/Ml/PostCalendarEvents.php | 72 -
src/Elasticsearch/Endpoints/Ml/PostData.php | 93 -
.../Ml/PreviewDataFrameAnalytics.php | 60 -
.../Endpoints/Ml/PreviewDatafeed.php | 71 -
.../Endpoints/Ml/PutCalendar.php | 72 -
.../Endpoints/Ml/PutCalendarJob.php | 74 -
.../Endpoints/Ml/PutDataFrameAnalytics.php | 61 -
.../Endpoints/Ml/PutDatafeed.php | 77 -
src/Elasticsearch/Endpoints/Ml/PutFilter.php | 72 -
src/Elasticsearch/Endpoints/Ml/PutJob.php | 77 -
.../Endpoints/Ml/PutTrainedModel.php | 74 -
.../Endpoints/Ml/PutTrainedModelAlias.php | 76 -
.../Ml/PutTrainedModelDefinitionPart.php | 84 -
.../Ml/PutTrainedModelVocabulary.php | 72 -
src/Elasticsearch/Endpoints/Ml/ResetJob.php | 64 -
.../Endpoints/Ml/RevertModelSnapshot.php | 86 -
.../Endpoints/Ml/SetUpgradeMode.php | 49 -
.../Endpoints/Ml/StartDataFrameAnalytics.php | 63 -
.../Endpoints/Ml/StartDatafeed.php | 76 -
.../Ml/StartTrainedModelDeployment.php | 65 -
.../Endpoints/Ml/StopDataFrameAnalytics.php | 65 -
.../Endpoints/Ml/StopDatafeed.php | 77 -
.../Ml/StopTrainedModelDeployment.php | 62 -
.../Endpoints/Ml/UpdateDataFrameAnalytics.php | 61 -
.../Endpoints/Ml/UpdateDatafeed.php | 77 -
.../Endpoints/Ml/UpdateFilter.php | 72 -
src/Elasticsearch/Endpoints/Ml/UpdateJob.php | 72 -
.../Endpoints/Ml/UpdateModelSnapshot.php | 86 -
.../Endpoints/Ml/UpgradeJobSnapshot.php | 77 -
src/Elasticsearch/Endpoints/Ml/Validate.php | 58 -
.../Endpoints/Ml/ValidateDetector.php | 58 -
.../Endpoints/Monitoring/Bulk.php | 85 -
src/Elasticsearch/Endpoints/Msearch.php | 86 -
.../Endpoints/MsearchTemplate.php | 84 -
.../ClearRepositoriesMeteringArchive.php | 77 -
.../Nodes/GetRepositoriesMeteringInfo.php | 65 -
.../Endpoints/Nodes/HotThreads.php | 71 -
src/Elasticsearch/Endpoints/Nodes/Info.php | 88 -
.../Endpoints/Nodes/ReloadSecureSettings.php | 76 -
src/Elasticsearch/Endpoints/Nodes/Stats.php | 116 -
src/Elasticsearch/Endpoints/Nodes/Usage.php | 87 -
.../Endpoints/OpenPointInTime.php | 57 -
src/Elasticsearch/Endpoints/Ping.php | 48 -
src/Elasticsearch/Endpoints/PutScript.php | 82 -
src/Elasticsearch/Endpoints/RankEval.php | 65 -
src/Elasticsearch/Endpoints/Reindex.php | 65 -
.../Endpoints/ReindexRethrottle.php | 64 -
.../Endpoints/RenderSearchTemplate.php | 60 -
.../Endpoints/Rollup/DeleteJob.php | 51 -
.../Endpoints/Rollup/GetJobs.php | 50 -
.../Endpoints/Rollup/GetRollupCaps.php | 50 -
.../Endpoints/Rollup/GetRollupIndexCaps.php | 51 -
src/Elasticsearch/Endpoints/Rollup/PutJob.php | 61 -
src/Elasticsearch/Endpoints/Rollup/Rollup.php | 75 -
.../Endpoints/Rollup/RollupSearch.php | 73 -
.../Endpoints/Rollup/StartJob.php | 51 -
.../Endpoints/Rollup/StopJob.php | 54 -
.../Endpoints/ScriptsPainlessExecute.php | 58 -
src/Elasticsearch/Endpoints/Scroll.php | 78 -
src/Elasticsearch/Endpoints/Search.php | 104 -
src/Elasticsearch/Endpoints/SearchMvt.php | 116 -
src/Elasticsearch/Endpoints/SearchShards.php | 57 -
.../Endpoints/SearchTemplate.php | 74 -
.../SearchableSnapshots/CacheStats.php | 64 -
.../SearchableSnapshots/ClearCache.php | 55 -
.../Endpoints/SearchableSnapshots/Mount.php | 88 -
.../Endpoints/SearchableSnapshots/Stats.php | 52 -
.../Endpoints/Security/Authenticate.php | 48 -
.../Endpoints/Security/ChangePassword.php | 73 -
.../Endpoints/Security/ClearApiKeyCache.php | 67 -
.../Security/ClearCachedPrivileges.php | 67 -
.../Endpoints/Security/ClearCachedRealms.php | 67 -
.../Endpoints/Security/ClearCachedRoles.php | 67 -
.../Security/ClearCachedServiceTokens.php | 91 -
.../Endpoints/Security/CreateApiKey.php | 58 -
.../Endpoints/Security/CreateServiceToken.php | 98 -
.../Endpoints/Security/DeletePrivileges.php | 76 -
.../Endpoints/Security/DeleteRole.php | 64 -
.../Endpoints/Security/DeleteRoleMapping.php | 64 -
.../Endpoints/Security/DeleteServiceToken.php | 88 -
.../Endpoints/Security/DeleteUser.php | 64 -
.../Endpoints/Security/DisableUser.php | 64 -
.../Endpoints/Security/EnableUser.php | 64 -
.../Endpoints/Security/EnrollKibana.php | 46 -
.../Endpoints/Security/EnrollNode.php | 46 -
.../Endpoints/Security/GetApiKey.php | 52 -
.../Security/GetBuiltinPrivileges.php | 48 -
.../Endpoints/Security/GetPrivileges.php | 78 -
.../Endpoints/Security/GetRole.php | 66 -
.../Endpoints/Security/GetRoleMapping.php | 66 -
.../Endpoints/Security/GetServiceAccounts.php | 78 -
.../Security/GetServiceCredentials.php | 76 -
.../Endpoints/Security/GetToken.php | 58 -
.../Endpoints/Security/GetUser.php | 66 -
.../Endpoints/Security/GetUserPrivileges.php | 48 -
.../Endpoints/Security/GrantApiKey.php | 58 -
.../Endpoints/Security/HasPrivileges.php | 73 -
.../Endpoints/Security/InvalidateApiKey.php | 56 -
.../Endpoints/Security/InvalidateToken.php | 58 -
.../Endpoints/Security/PutPrivileges.php | 58 -
.../Endpoints/Security/PutRole.php | 74 -
.../Endpoints/Security/PutRoleMapping.php | 74 -
.../Endpoints/Security/PutUser.php | 74 -
.../Endpoints/Security/QueryApiKeys.php | 58 -
.../Endpoints/Security/SamlAuthenticate.php | 56 -
.../Endpoints/Security/SamlCompleteLogout.php | 56 -
.../Endpoints/Security/SamlInvalidate.php | 56 -
.../Endpoints/Security/SamlLogout.php | 56 -
.../Security/SamlPrepareAuthentication.php | 56 -
.../Security/SamlServiceProviderMetadata.php | 62 -
.../Endpoints/Shutdown/DeleteNode.php | 64 -
.../Endpoints/Shutdown/GetNode.php | 63 -
.../Endpoints/Shutdown/PutNode.php | 74 -
.../Endpoints/Slm/DeleteLifecycle.php | 64 -
.../Endpoints/Slm/ExecuteLifecycle.php | 64 -
.../Endpoints/Slm/ExecuteRetention.php | 48 -
.../Endpoints/Slm/GetLifecycle.php | 66 -
src/Elasticsearch/Endpoints/Slm/GetStats.php | 48 -
src/Elasticsearch/Endpoints/Slm/GetStatus.php | 48 -
.../Endpoints/Slm/PutLifecycle.php | 74 -
src/Elasticsearch/Endpoints/Slm/Start.php | 48 -
src/Elasticsearch/Endpoints/Slm/Stop.php | 48 -
.../Endpoints/Snapshot/CleanupRepository.php | 65 -
.../Endpoints/Snapshot/CloneSnapshot.php | 98 -
.../Endpoints/Snapshot/Create.php | 87 -
.../Endpoints/Snapshot/CreateRepository.php | 76 -
.../Endpoints/Snapshot/Delete.php | 79 -
.../Endpoints/Snapshot/DeleteRepository.php | 68 -
src/Elasticsearch/Endpoints/Snapshot/Get.php | 83 -
.../Endpoints/Snapshot/GetRepository.php | 67 -
.../Endpoints/Snapshot/RepositoryAnalyze.php | 74 -
.../Endpoints/Snapshot/Restore.php | 87 -
.../Endpoints/Snapshot/Status.php | 82 -
.../Endpoints/Snapshot/VerifyRepository.php | 65 -
.../Endpoints/Sql/ClearCursor.php | 56 -
.../Endpoints/Sql/DeleteAsync.php | 51 -
src/Elasticsearch/Endpoints/Sql/GetAsync.php | 56 -
.../Endpoints/Sql/GetAsyncStatus.php | 51 -
src/Elasticsearch/Endpoints/Sql/Query.php | 58 -
src/Elasticsearch/Endpoints/Sql/Translate.php | 58 -
.../Endpoints/Ssl/Certificates.php | 48 -
src/Elasticsearch/Endpoints/Tasks/Cancel.php | 66 -
src/Elasticsearch/Endpoints/Tasks/Get.php | 65 -
.../Endpoints/Tasks/ListTasks.php | 54 -
src/Elasticsearch/Endpoints/TermVectors.php | 79 -
src/Elasticsearch/Endpoints/TermsEnum.php | 63 -
.../Endpoints/TextStructure/FindStructure.php | 89 -
.../Endpoints/Transform/DeleteTransform.php | 64 -
.../Endpoints/Transform/GetTransform.php | 66 -
.../Endpoints/Transform/GetTransformStats.php | 66 -
.../Endpoints/Transform/PreviewTransform.php | 71 -
.../Endpoints/Transform/PutTransform.php | 74 -
.../Endpoints/Transform/StartTransform.php | 64 -
.../Endpoints/Transform/StopTransform.php | 68 -
.../Endpoints/Transform/UpdateTransform.php | 74 -
.../Endpoints/Transform/UpgradeTransforms.php | 48 -
src/Elasticsearch/Endpoints/Update.php | 89 -
src/Elasticsearch/Endpoints/UpdateByQuery.php | 96 -
.../Endpoints/UpdateByQueryRethrottle.php | 64 -
.../Endpoints/Watcher/AckWatch.php | 82 -
.../Endpoints/Watcher/ActivateWatch.php | 62 -
.../Endpoints/Watcher/DeactivateWatch.php | 62 -
.../Endpoints/Watcher/DeleteWatch.php | 51 -
.../Endpoints/Watcher/ExecuteWatch.php | 62 -
.../Endpoints/Watcher/GetWatch.php | 53 -
.../Endpoints/Watcher/PutWatch.php | 66 -
.../Endpoints/Watcher/QueryWatches.php | 58 -
src/Elasticsearch/Endpoints/Watcher/Start.php | 48 -
src/Elasticsearch/Endpoints/Watcher/Stats.php | 67 -
src/Elasticsearch/Endpoints/Watcher/Stop.php | 48 -
src/Elasticsearch/Endpoints/Xpack/Info.php | 49 -
src/Elasticsearch/Endpoints/Xpack/Usage.php | 48 -
.../Helper/Iterators/SearchHitIterator.php | 163 -
.../Iterators/SearchResponseIterator.php | 178 -
.../Namespaces/AbstractNamespace.php | 68 -
.../Namespaces/AsyncSearchNamespace.php | 157 -
.../Namespaces/AutoscalingNamespace.php | 110 -
.../Namespaces/BooleanRequestWrapper.php | 63 -
src/Elasticsearch/Namespaces/CatNamespace.php | 700 -
src/Elasticsearch/Namespaces/CcrNamespace.php | 300 -
.../Namespaces/ClusterNamespace.php | 376 -
.../Namespaces/DanglingIndicesNamespace.php | 93 -
.../Namespaces/EnrichNamespace.php | 131 -
src/Elasticsearch/Namespaces/EqlNamespace.php | 118 -
.../Namespaces/FeaturesNamespace.php | 68 -
.../Namespaces/FleetNamespace.php | 107 -
.../Namespaces/GraphNamespace.php | 55 -
src/Elasticsearch/Namespaces/IlmNamespace.php | 250 -
.../Namespaces/IndicesNamespace.php | 1452 -
.../Namespaces/IngestNamespace.php | 158 -
.../Namespaces/LicenseNamespace.php | 158 -
.../Namespaces/LogstashNamespace.php | 93 -
.../Namespaces/MigrationNamespace.php | 84 -
src/Elasticsearch/Namespaces/MlNamespace.php | 1720 -
.../Namespaces/MonitoringNamespace.php | 56 -
.../Namespaces/NamespaceBuilderInterface.php | 42 -
.../Namespaces/NodesNamespace.php | 213 -
.../Namespaces/RollupNamespace.php | 256 -
.../SearchableSnapshotsNamespace.php | 129 -
.../Namespaces/SecurityNamespace.php | 938 -
.../Namespaces/ShutdownNamespace.php | 93 -
src/Elasticsearch/Namespaces/SlmNamespace.php | 198 -
.../Namespaces/SnapshotNamespace.php | 338 -
src/Elasticsearch/Namespaces/SqlNamespace.php | 155 -
src/Elasticsearch/Namespaces/SslNamespace.php | 47 -
.../Namespaces/TasksNamespace.php | 116 -
.../Namespaces/TextStructureNamespace.php | 64 -
.../Namespaces/TransformNamespace.php | 233 -
.../Namespaces/WatcherNamespace.php | 259 -
.../Namespaces/XpackNamespace.php | 67 -
.../Serializers/ArrayToJSONSerializer.php | 57 -
.../EverythingToJSONSerializer.php | 53 -
.../Serializers/SerializerInterface.php | 39 -
.../Serializers/SmartSerializer.php | 100 -
src/Elasticsearch/Transport.php | 175 -
src/Endpoints/AbstractEndpoint.php | 27 +
src/Endpoints/AsyncSearch.php | 161 +
src/Endpoints/Autoscaling.php | 107 +
src/Endpoints/Cat.php | 780 +
src/Endpoints/Ccr.php | 303 +
src/Endpoints/Cluster.php | 396 +
src/Endpoints/DanglingIndices.php | 91 +
src/Endpoints/Enrich.php | 132 +
src/Endpoints/Eql.php | 119 +
src/Endpoints/Features.php | 64 +
src/Endpoints/Fleet.php | 105 +
src/Endpoints/Graph.php | 53 +
src/Endpoints/Ilm.php | 246 +
src/Endpoints/Indices.php | 1457 +
src/Endpoints/Ingest.php | 158 +
src/Endpoints/License.php | 154 +
src/Endpoints/Logstash.php | 93 +
src/Endpoints/Migration.php | 81 +
src/Endpoints/Ml.php | 1740 +
src/Endpoints/Monitoring.php | 58 +
src/Endpoints/Nodes.php | 243 +
src/Endpoints/Rollup.php | 241 +
src/Endpoints/SearchableSnapshots.php | 134 +
src/Endpoints/Security.php | 963 +
src/Endpoints/Shutdown.php | 96 +
src/Endpoints/Slm.php | 187 +
src/Endpoints/Snapshot.php | 336 +
src/Endpoints/Sql.php | 160 +
src/Endpoints/Ssl.php | 43 +
src/Endpoints/Tasks.php | 109 +
src/Endpoints/TextStructure.php | 64 +
src/Endpoints/Transform.php | 247 +
src/Endpoints/Watcher.php | 265 +
src/Endpoints/Xpack.php | 70 +
src/Exception/ArrayAccessException.php | 22 +
src/Exception/AuthenticationException.php | 22 +
src/Exception/ClientResponseException.php | 26 +
src/Exception/ConfigException.php | 22 +
src/Exception/ElasticsearchException.php | 22 +
src/Exception/HttpClientException.php | 22 +
src/Exception/InvalidArgumentException.php | 22 +
src/Exception/MissingParameterException.php | 22 +
src/Exception/ProductCheckException.php | 22 +
src/Exception/ServerResponseException.php | 26 +
src/Response/Elasticsearch.php | 222 +
src/Response/ElasticsearchInterface.php | 25 +
src/Traits/ClientEndpointsTrait.php | 1326 +
src/Traits/EndpointTrait.php | 54 +
src/Traits/MessageResponseTrait.php | 94 +
src/Traits/NamespaceTrait.php | 357 +
src/Traits/ProductCheckTrait.php | 38 +
src/Traits/ResponseTrait.php | 33 +
src/Transport/Adapter/AdapterInterface.php | 22 +
src/Transport/Adapter/Guzzle.php | 44 +
src/Transport/AsyncOnSuccess.php | 29 +
src/Transport/AsyncOnSuccessNoException.php | 29 +
src/Transport/RequestOptions.php | 33 +
tests/ClientBuilderTest.php | 320 +
tests/ClientTest.php | 191 +
.../Tests/ClientBuilder/ArrayLogger.php | 74 -
.../Tests/ClientBuilder/DummyLogger.php | 23 -
.../Elasticsearch/Tests/ClientBuilderTest.php | 347 -
.../Tests/ClientIntegrationTest.php | 165 -
tests/Elasticsearch/Tests/ClientTest.php | 410 -
.../Selectors/RoundRobinSelectorTest.php | 112 -
.../StickyRoundRobinSelectorTest.php | 77 -
.../SniffingConnectionPoolIntegrationTest.php | 48 -
.../SniffingConnectionPoolTest.php | 460 -
.../StaticConnectionPoolIntegrationTest.php | 67 -
.../StaticConnectionPoolTest.php | 254 -
.../Tests/Connections/ConnectionTest.php | 552 -
.../Tests/Endpoints/AbstractEndpointTest.php | 76 -
.../Tests/Endpoints/StatusEndpointTest.php | 67 -
.../Iterators/SearchHitIteratorTest.php | 135 -
.../Iterators/SearchResponseIteratorTest.php | 183 -
.../Tests/RegisteredNamespaceTest.php | 80 -
.../Serializers/ArrayToJSONSerializerTest.php | 66 -
.../EverythingToJSONSerializerTest.php | 67 -
.../Tests/Serializers/SmartSerializerTest.php | 48 -
tests/Elasticsearch/Tests/TransportTest.php | 85 -
tests/Response/ElasticsearchTest.php | 203 +
.../AsyncOnSuccessNoExceptionTest.php | 59 +
tests/Transport/AsyncOnSuccessTest.php | 61 +
tests/{Elasticsearch/Tests => }/Utility.php | 38 +-
tests/bootstrap.php | 34 -
util/ActionTest.php | 13 +-
util/ClientEndpoint.php | 111 -
util/Endpoint.php | 558 -
util/GenerateEndpoints.php | 277 -
util/NamespaceEndpoint.php | 173 -
util/RestSpecRunner.php | 8 +-
util/YamlTests.php | 7 +-
util/add_header.pl | 68 -
util/alternatives_report.spec.json | 78246 --------------
util/build_tests.php | 8 +-
util/clean_es_docker.sh | 4 -
util/parsed-alternative-report.json | 87086 ----------------
util/run_es_docker.sh | 76 -
605 files changed, 13639 insertions(+), 212853 deletions(-)
delete mode 100644 .php_cs
delete mode 100644 LICENSE-APACHE
delete mode 100644 LICENSE-LGPL
delete mode 100644 NOTICE
mode change 100755 => 100644 README.md
delete mode 100644 phpunit-integration-tests.xml
delete mode 100644 ruleset.xml
create mode 100644 src/Client.php
create mode 100644 src/ClientBuilder.php
delete mode 100644 src/Elasticsearch/Client.php
delete mode 100644 src/Elasticsearch/ClientBuilder.php
delete mode 100644 src/Elasticsearch/Common/EmptyLogger.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/AuthenticationConfigException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/BadMethodCallException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/BadRequest400Exception.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/ClientErrorResponseException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/Conflict409Exception.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/Curl/CouldNotConnectToHost.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/Curl/CouldNotResolveHostException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/Curl/OperationTimeoutException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/ElasticCloudIdParseException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/ElasticsearchException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/Forbidden403Exception.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/InvalidArgumentException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/MaxRetriesException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/Missing404Exception.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/NoDocumentsToGetException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/NoNodesAvailableException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/NoShardAvailableException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/RequestTimeout408Exception.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/RoutingMissingException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/RuntimeException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/ScriptLangNotSupportedException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/Serializer/JsonErrorException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/ServerErrorResponseException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/TransportException.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/Unauthorized401Exception.php
delete mode 100644 src/Elasticsearch/Common/Exceptions/UnexpectedValueException.php
delete mode 100644 src/Elasticsearch/ConnectionPool/AbstractConnectionPool.php
delete mode 100644 src/Elasticsearch/ConnectionPool/ConnectionPoolInterface.php
delete mode 100644 src/Elasticsearch/ConnectionPool/Selectors/RandomSelector.php
delete mode 100644 src/Elasticsearch/ConnectionPool/Selectors/RoundRobinSelector.php
delete mode 100644 src/Elasticsearch/ConnectionPool/Selectors/SelectorInterface.php
delete mode 100644 src/Elasticsearch/ConnectionPool/Selectors/StickyRoundRobinSelector.php
delete mode 100644 src/Elasticsearch/ConnectionPool/SimpleConnectionPool.php
delete mode 100644 src/Elasticsearch/ConnectionPool/SniffingConnectionPool.php
delete mode 100644 src/Elasticsearch/ConnectionPool/StaticConnectionPool.php
delete mode 100644 src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php
delete mode 100644 src/Elasticsearch/Connections/Connection.php
delete mode 100644 src/Elasticsearch/Connections/ConnectionFactory.php
delete mode 100644 src/Elasticsearch/Connections/ConnectionFactoryInterface.php
delete mode 100644 src/Elasticsearch/Connections/ConnectionInterface.php
delete mode 100644 src/Elasticsearch/Endpoints/AbstractEndpoint.php
delete mode 100644 src/Elasticsearch/Endpoints/AsyncSearch/Delete.php
delete mode 100644 src/Elasticsearch/Endpoints/AsyncSearch/Get.php
delete mode 100644 src/Elasticsearch/Endpoints/AsyncSearch/Status.php
delete mode 100644 src/Elasticsearch/Endpoints/AsyncSearch/Submit.php
delete mode 100644 src/Elasticsearch/Endpoints/Autoscaling/DeleteAutoscalingPolicy.php
delete mode 100644 src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingCapacity.php
delete mode 100644 src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingPolicy.php
delete mode 100644 src/Elasticsearch/Endpoints/Autoscaling/PutAutoscalingPolicy.php
delete mode 100644 src/Elasticsearch/Endpoints/Bulk.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Aliases.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Allocation.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Count.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Fielddata.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Health.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Help.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Indices.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Master.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/MlDataFrameAnalytics.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/MlDatafeeds.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/MlJobs.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/MlTrainedModels.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/NodeAttrs.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Nodes.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/PendingTasks.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Plugins.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Recovery.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Repositories.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Segments.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Shards.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Snapshots.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Tasks.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Templates.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/ThreadPool.php
delete mode 100644 src/Elasticsearch/Endpoints/Cat/Transforms.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/Follow.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/FollowInfo.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/FollowStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/PauseAutoFollowPattern.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/PauseFollow.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/ResumeAutoFollowPattern.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/Stats.php
delete mode 100644 src/Elasticsearch/Endpoints/Ccr/Unfollow.php
delete mode 100644 src/Elasticsearch/Endpoints/ClearScroll.php
delete mode 100644 src/Elasticsearch/Endpoints/ClosePointInTime.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/DeleteComponentTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/DeleteVotingConfigExclusions.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/ExistsComponentTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/GetComponentTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/GetSettings.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/Health.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/PendingTasks.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/PostVotingConfigExclusions.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/PutComponentTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/PutSettings.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/Reroute.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/State.php
delete mode 100644 src/Elasticsearch/Endpoints/Cluster/Stats.php
delete mode 100644 src/Elasticsearch/Endpoints/Count.php
delete mode 100644 src/Elasticsearch/Endpoints/Create.php
delete mode 100644 src/Elasticsearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php
delete mode 100644 src/Elasticsearch/Endpoints/DanglingIndices/ImportDanglingIndex.php
delete mode 100644 src/Elasticsearch/Endpoints/DanglingIndices/ListDanglingIndices.php
delete mode 100644 src/Elasticsearch/Endpoints/Delete.php
delete mode 100644 src/Elasticsearch/Endpoints/DeleteByQuery.php
delete mode 100644 src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php
delete mode 100644 src/Elasticsearch/Endpoints/DeleteScript.php
delete mode 100644 src/Elasticsearch/Endpoints/Enrich/DeletePolicy.php
delete mode 100644 src/Elasticsearch/Endpoints/Enrich/ExecutePolicy.php
delete mode 100644 src/Elasticsearch/Endpoints/Enrich/GetPolicy.php
delete mode 100644 src/Elasticsearch/Endpoints/Enrich/PutPolicy.php
delete mode 100644 src/Elasticsearch/Endpoints/Enrich/Stats.php
delete mode 100644 src/Elasticsearch/Endpoints/Eql/Delete.php
delete mode 100644 src/Elasticsearch/Endpoints/Eql/Get.php
delete mode 100644 src/Elasticsearch/Endpoints/Eql/GetStatus.php
delete mode 100644 src/Elasticsearch/Endpoints/Eql/Search.php
delete mode 100644 src/Elasticsearch/Endpoints/Exists.php
delete mode 100644 src/Elasticsearch/Endpoints/ExistsSource.php
delete mode 100644 src/Elasticsearch/Endpoints/Explain.php
delete mode 100644 src/Elasticsearch/Endpoints/Features/GetFeatures.php
delete mode 100644 src/Elasticsearch/Endpoints/Features/ResetFeatures.php
delete mode 100644 src/Elasticsearch/Endpoints/FieldCaps.php
delete mode 100644 src/Elasticsearch/Endpoints/Fleet/GlobalCheckpoints.php
delete mode 100644 src/Elasticsearch/Endpoints/Fleet/Msearch.php
delete mode 100644 src/Elasticsearch/Endpoints/Fleet/Search.php
delete mode 100644 src/Elasticsearch/Endpoints/Get.php
delete mode 100644 src/Elasticsearch/Endpoints/GetScript.php
delete mode 100644 src/Elasticsearch/Endpoints/GetScriptContext.php
delete mode 100644 src/Elasticsearch/Endpoints/GetScriptLanguages.php
delete mode 100644 src/Elasticsearch/Endpoints/GetSource.php
delete mode 100644 src/Elasticsearch/Endpoints/Graph/Explore.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/GetStatus.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/MigrateToDataTiers.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/MoveToStep.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/Retry.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/Start.php
delete mode 100644 src/Elasticsearch/Endpoints/Ilm/Stop.php
delete mode 100644 src/Elasticsearch/Endpoints/Index.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/AddBlock.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Analyze.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ClearCache.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/CloneIndices.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Close.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Create.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/CreateDataStream.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/DataStreamsStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Delete.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/DeleteAlias.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/DeleteDataStream.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/DeleteIndexTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/DiskUsage.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Exists.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ExistsAlias.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ExistsIndexTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ExistsType.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/FieldUsageStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Flush.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ForceMerge.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Freeze.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Get.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/GetAlias.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/GetDataStream.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/GetIndexTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/GetMapping.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/GetSettings.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/GetTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/MigrateToDataStream.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ModifyDataStream.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Open.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/PromoteDataStream.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/PutAlias.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/PutIndexTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/PutMapping.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/PutSettings.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/PutTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Recovery.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Refresh.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ReloadSearchAnalyzers.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ResolveIndex.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Rollover.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Segments.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ShardStores.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Shrink.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/SimulateIndexTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/SimulateTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Split.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Stats.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/Unfreeze.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/UpdateAliases.php
delete mode 100644 src/Elasticsearch/Endpoints/Indices/ValidateQuery.php
delete mode 100644 src/Elasticsearch/Endpoints/Info.php
delete mode 100644 src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php
delete mode 100644 src/Elasticsearch/Endpoints/Ingest/GeoIpStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Ingest/GetPipeline.php
delete mode 100644 src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php
delete mode 100644 src/Elasticsearch/Endpoints/Ingest/PutPipeline.php
delete mode 100644 src/Elasticsearch/Endpoints/Ingest/Simulate.php
delete mode 100644 src/Elasticsearch/Endpoints/KnnSearch.php
delete mode 100644 src/Elasticsearch/Endpoints/License/Delete.php
delete mode 100644 src/Elasticsearch/Endpoints/License/Get.php
delete mode 100644 src/Elasticsearch/Endpoints/License/GetBasicStatus.php
delete mode 100644 src/Elasticsearch/Endpoints/License/GetTrialStatus.php
delete mode 100644 src/Elasticsearch/Endpoints/License/Post.php
delete mode 100644 src/Elasticsearch/Endpoints/License/PostStartBasic.php
delete mode 100644 src/Elasticsearch/Endpoints/License/PostStartTrial.php
delete mode 100644 src/Elasticsearch/Endpoints/Logstash/DeletePipeline.php
delete mode 100644 src/Elasticsearch/Endpoints/Logstash/GetPipeline.php
delete mode 100644 src/Elasticsearch/Endpoints/Logstash/PutPipeline.php
delete mode 100644 src/Elasticsearch/Endpoints/MTermVectors.php
delete mode 100644 src/Elasticsearch/Endpoints/Mget.php
delete mode 100644 src/Elasticsearch/Endpoints/Migration/Deprecations.php
delete mode 100644 src/Elasticsearch/Endpoints/Migration/GetFeatureUpgradeStatus.php
delete mode 100644 src/Elasticsearch/Endpoints/Migration/PostFeatureUpgrade.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/CloseJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteCalendar.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteCalendarEvent.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteCalendarJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteDataFrameAnalytics.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteDatafeed.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteExpiredData.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteFilter.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteForecast.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteModelSnapshot.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteTrainedModel.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/DeleteTrainedModelAlias.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/EstimateModelMemory.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/EvaluateDataFrame.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/ExplainDataFrameAnalytics.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/FlushJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/Forecast.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetBuckets.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetCalendars.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetCategories.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalytics.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalyticsStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetFilters.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetInfluencers.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetJobStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetJobs.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetRecords.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetTrainedModelDeploymentStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetTrainedModels.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/GetTrainedModelsStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/InferTrainedModelDeployment.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/Info.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/OpenJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PostData.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PreviewDataFrameAnalytics.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutCalendar.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutDataFrameAnalytics.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutDatafeed.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutFilter.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutTrainedModel.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutTrainedModelAlias.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutTrainedModelDefinitionPart.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/PutTrainedModelVocabulary.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/ResetJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/StartDataFrameAnalytics.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/StartDatafeed.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/StartTrainedModelDeployment.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/StopDataFrameAnalytics.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/StopDatafeed.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/StopTrainedModelDeployment.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/UpdateDataFrameAnalytics.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/UpdateFilter.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/UpdateJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/UpgradeJobSnapshot.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/Validate.php
delete mode 100644 src/Elasticsearch/Endpoints/Ml/ValidateDetector.php
delete mode 100644 src/Elasticsearch/Endpoints/Monitoring/Bulk.php
delete mode 100644 src/Elasticsearch/Endpoints/Msearch.php
delete mode 100644 src/Elasticsearch/Endpoints/MsearchTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Nodes/ClearRepositoriesMeteringArchive.php
delete mode 100644 src/Elasticsearch/Endpoints/Nodes/GetRepositoriesMeteringInfo.php
delete mode 100644 src/Elasticsearch/Endpoints/Nodes/HotThreads.php
delete mode 100644 src/Elasticsearch/Endpoints/Nodes/Info.php
delete mode 100644 src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php
delete mode 100644 src/Elasticsearch/Endpoints/Nodes/Stats.php
delete mode 100644 src/Elasticsearch/Endpoints/Nodes/Usage.php
delete mode 100644 src/Elasticsearch/Endpoints/OpenPointInTime.php
delete mode 100644 src/Elasticsearch/Endpoints/Ping.php
delete mode 100644 src/Elasticsearch/Endpoints/PutScript.php
delete mode 100644 src/Elasticsearch/Endpoints/RankEval.php
delete mode 100644 src/Elasticsearch/Endpoints/Reindex.php
delete mode 100644 src/Elasticsearch/Endpoints/ReindexRethrottle.php
delete mode 100644 src/Elasticsearch/Endpoints/RenderSearchTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/Rollup/DeleteJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Rollup/GetJobs.php
delete mode 100644 src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php
delete mode 100644 src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php
delete mode 100644 src/Elasticsearch/Endpoints/Rollup/PutJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Rollup/Rollup.php
delete mode 100644 src/Elasticsearch/Endpoints/Rollup/RollupSearch.php
delete mode 100644 src/Elasticsearch/Endpoints/Rollup/StartJob.php
delete mode 100644 src/Elasticsearch/Endpoints/Rollup/StopJob.php
delete mode 100644 src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php
delete mode 100644 src/Elasticsearch/Endpoints/Scroll.php
delete mode 100644 src/Elasticsearch/Endpoints/Search.php
delete mode 100644 src/Elasticsearch/Endpoints/SearchMvt.php
delete mode 100644 src/Elasticsearch/Endpoints/SearchShards.php
delete mode 100644 src/Elasticsearch/Endpoints/SearchTemplate.php
delete mode 100644 src/Elasticsearch/Endpoints/SearchableSnapshots/CacheStats.php
delete mode 100644 src/Elasticsearch/Endpoints/SearchableSnapshots/ClearCache.php
delete mode 100644 src/Elasticsearch/Endpoints/SearchableSnapshots/Mount.php
delete mode 100644 src/Elasticsearch/Endpoints/SearchableSnapshots/Stats.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/Authenticate.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/ChangePassword.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/ClearApiKeyCache.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/ClearCachedPrivileges.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/ClearCachedServiceTokens.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/CreateApiKey.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/CreateServiceToken.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/DeletePrivileges.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/DeleteRole.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/DeleteServiceToken.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/DeleteUser.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/DisableUser.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/EnableUser.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/EnrollKibana.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/EnrollNode.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetApiKey.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetBuiltinPrivileges.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetPrivileges.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetRole.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetRoleMapping.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetServiceAccounts.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetServiceCredentials.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetToken.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetUser.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/GrantApiKey.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/HasPrivileges.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/InvalidateToken.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/PutPrivileges.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/PutRole.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/PutRoleMapping.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/PutUser.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/QueryApiKeys.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/SamlAuthenticate.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/SamlCompleteLogout.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/SamlInvalidate.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/SamlLogout.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/SamlPrepareAuthentication.php
delete mode 100644 src/Elasticsearch/Endpoints/Security/SamlServiceProviderMetadata.php
delete mode 100644 src/Elasticsearch/Endpoints/Shutdown/DeleteNode.php
delete mode 100644 src/Elasticsearch/Endpoints/Shutdown/GetNode.php
delete mode 100644 src/Elasticsearch/Endpoints/Shutdown/PutNode.php
delete mode 100644 src/Elasticsearch/Endpoints/Slm/DeleteLifecycle.php
delete mode 100644 src/Elasticsearch/Endpoints/Slm/ExecuteLifecycle.php
delete mode 100644 src/Elasticsearch/Endpoints/Slm/ExecuteRetention.php
delete mode 100644 src/Elasticsearch/Endpoints/Slm/GetLifecycle.php
delete mode 100644 src/Elasticsearch/Endpoints/Slm/GetStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Slm/GetStatus.php
delete mode 100644 src/Elasticsearch/Endpoints/Slm/PutLifecycle.php
delete mode 100644 src/Elasticsearch/Endpoints/Slm/Start.php
delete mode 100644 src/Elasticsearch/Endpoints/Slm/Stop.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/CleanupRepository.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/CloneSnapshot.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/Create.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/Delete.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/Get.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/GetRepository.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/RepositoryAnalyze.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/Restore.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/Status.php
delete mode 100644 src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php
delete mode 100644 src/Elasticsearch/Endpoints/Sql/ClearCursor.php
delete mode 100644 src/Elasticsearch/Endpoints/Sql/DeleteAsync.php
delete mode 100644 src/Elasticsearch/Endpoints/Sql/GetAsync.php
delete mode 100644 src/Elasticsearch/Endpoints/Sql/GetAsyncStatus.php
delete mode 100644 src/Elasticsearch/Endpoints/Sql/Query.php
delete mode 100644 src/Elasticsearch/Endpoints/Sql/Translate.php
delete mode 100644 src/Elasticsearch/Endpoints/Ssl/Certificates.php
delete mode 100644 src/Elasticsearch/Endpoints/Tasks/Cancel.php
delete mode 100644 src/Elasticsearch/Endpoints/Tasks/Get.php
delete mode 100644 src/Elasticsearch/Endpoints/Tasks/ListTasks.php
delete mode 100644 src/Elasticsearch/Endpoints/TermVectors.php
delete mode 100644 src/Elasticsearch/Endpoints/TermsEnum.php
delete mode 100644 src/Elasticsearch/Endpoints/TextStructure/FindStructure.php
delete mode 100644 src/Elasticsearch/Endpoints/Transform/DeleteTransform.php
delete mode 100644 src/Elasticsearch/Endpoints/Transform/GetTransform.php
delete mode 100644 src/Elasticsearch/Endpoints/Transform/GetTransformStats.php
delete mode 100644 src/Elasticsearch/Endpoints/Transform/PreviewTransform.php
delete mode 100644 src/Elasticsearch/Endpoints/Transform/PutTransform.php
delete mode 100644 src/Elasticsearch/Endpoints/Transform/StartTransform.php
delete mode 100644 src/Elasticsearch/Endpoints/Transform/StopTransform.php
delete mode 100644 src/Elasticsearch/Endpoints/Transform/UpdateTransform.php
delete mode 100644 src/Elasticsearch/Endpoints/Transform/UpgradeTransforms.php
delete mode 100644 src/Elasticsearch/Endpoints/Update.php
delete mode 100644 src/Elasticsearch/Endpoints/UpdateByQuery.php
delete mode 100644 src/Elasticsearch/Endpoints/UpdateByQueryRethrottle.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/AckWatch.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/ActivateWatch.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/DeactivateWatch.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/DeleteWatch.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/ExecuteWatch.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/GetWatch.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/PutWatch.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/QueryWatches.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/Start.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/Stats.php
delete mode 100644 src/Elasticsearch/Endpoints/Watcher/Stop.php
delete mode 100644 src/Elasticsearch/Endpoints/Xpack/Info.php
delete mode 100644 src/Elasticsearch/Endpoints/Xpack/Usage.php
delete mode 100644 src/Elasticsearch/Helper/Iterators/SearchHitIterator.php
delete mode 100644 src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php
delete mode 100644 src/Elasticsearch/Namespaces/AbstractNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/AsyncSearchNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/AutoscalingNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/BooleanRequestWrapper.php
delete mode 100644 src/Elasticsearch/Namespaces/CatNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/CcrNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/ClusterNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/DanglingIndicesNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/EnrichNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/EqlNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/FeaturesNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/FleetNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/GraphNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/IlmNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/IndicesNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/IngestNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/LicenseNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/LogstashNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/MigrationNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/MlNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/MonitoringNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/NamespaceBuilderInterface.php
delete mode 100644 src/Elasticsearch/Namespaces/NodesNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/RollupNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/SecurityNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/ShutdownNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/SlmNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/SnapshotNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/SqlNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/SslNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/TasksNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/TextStructureNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/TransformNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/WatcherNamespace.php
delete mode 100644 src/Elasticsearch/Namespaces/XpackNamespace.php
delete mode 100644 src/Elasticsearch/Serializers/ArrayToJSONSerializer.php
delete mode 100644 src/Elasticsearch/Serializers/EverythingToJSONSerializer.php
delete mode 100644 src/Elasticsearch/Serializers/SerializerInterface.php
delete mode 100644 src/Elasticsearch/Serializers/SmartSerializer.php
delete mode 100644 src/Elasticsearch/Transport.php
create mode 100644 src/Endpoints/AbstractEndpoint.php
create mode 100644 src/Endpoints/AsyncSearch.php
create mode 100644 src/Endpoints/Autoscaling.php
create mode 100644 src/Endpoints/Cat.php
create mode 100644 src/Endpoints/Ccr.php
create mode 100644 src/Endpoints/Cluster.php
create mode 100644 src/Endpoints/DanglingIndices.php
create mode 100644 src/Endpoints/Enrich.php
create mode 100644 src/Endpoints/Eql.php
create mode 100644 src/Endpoints/Features.php
create mode 100644 src/Endpoints/Fleet.php
create mode 100644 src/Endpoints/Graph.php
create mode 100644 src/Endpoints/Ilm.php
create mode 100644 src/Endpoints/Indices.php
create mode 100644 src/Endpoints/Ingest.php
create mode 100644 src/Endpoints/License.php
create mode 100644 src/Endpoints/Logstash.php
create mode 100644 src/Endpoints/Migration.php
create mode 100644 src/Endpoints/Ml.php
create mode 100644 src/Endpoints/Monitoring.php
create mode 100644 src/Endpoints/Nodes.php
create mode 100644 src/Endpoints/Rollup.php
create mode 100644 src/Endpoints/SearchableSnapshots.php
create mode 100644 src/Endpoints/Security.php
create mode 100644 src/Endpoints/Shutdown.php
create mode 100644 src/Endpoints/Slm.php
create mode 100644 src/Endpoints/Snapshot.php
create mode 100644 src/Endpoints/Sql.php
create mode 100644 src/Endpoints/Ssl.php
create mode 100644 src/Endpoints/Tasks.php
create mode 100644 src/Endpoints/TextStructure.php
create mode 100644 src/Endpoints/Transform.php
create mode 100644 src/Endpoints/Watcher.php
create mode 100644 src/Endpoints/Xpack.php
create mode 100644 src/Exception/ArrayAccessException.php
create mode 100644 src/Exception/AuthenticationException.php
create mode 100644 src/Exception/ClientResponseException.php
create mode 100644 src/Exception/ConfigException.php
create mode 100644 src/Exception/ElasticsearchException.php
create mode 100644 src/Exception/HttpClientException.php
create mode 100644 src/Exception/InvalidArgumentException.php
create mode 100644 src/Exception/MissingParameterException.php
create mode 100644 src/Exception/ProductCheckException.php
create mode 100644 src/Exception/ServerResponseException.php
create mode 100644 src/Response/Elasticsearch.php
create mode 100644 src/Response/ElasticsearchInterface.php
create mode 100644 src/Traits/ClientEndpointsTrait.php
create mode 100644 src/Traits/EndpointTrait.php
create mode 100644 src/Traits/MessageResponseTrait.php
create mode 100644 src/Traits/NamespaceTrait.php
create mode 100644 src/Traits/ProductCheckTrait.php
create mode 100644 src/Traits/ResponseTrait.php
create mode 100644 src/Transport/Adapter/AdapterInterface.php
create mode 100644 src/Transport/Adapter/Guzzle.php
create mode 100644 src/Transport/AsyncOnSuccess.php
create mode 100644 src/Transport/AsyncOnSuccessNoException.php
create mode 100644 src/Transport/RequestOptions.php
create mode 100644 tests/ClientBuilderTest.php
create mode 100644 tests/ClientTest.php
delete mode 100644 tests/Elasticsearch/Tests/ClientBuilder/ArrayLogger.php
delete mode 100644 tests/Elasticsearch/Tests/ClientBuilder/DummyLogger.php
delete mode 100644 tests/Elasticsearch/Tests/ClientBuilderTest.php
delete mode 100644 tests/Elasticsearch/Tests/ClientIntegrationTest.php
delete mode 100644 tests/Elasticsearch/Tests/ClientTest.php
delete mode 100644 tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php
delete mode 100644 tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php
delete mode 100644 tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php
delete mode 100644 tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolTest.php
delete mode 100644 tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php
delete mode 100644 tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolTest.php
delete mode 100644 tests/Elasticsearch/Tests/Connections/ConnectionTest.php
delete mode 100644 tests/Elasticsearch/Tests/Endpoints/AbstractEndpointTest.php
delete mode 100644 tests/Elasticsearch/Tests/Endpoints/StatusEndpointTest.php
delete mode 100644 tests/Elasticsearch/Tests/Helper/Iterators/SearchHitIteratorTest.php
delete mode 100644 tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php
delete mode 100644 tests/Elasticsearch/Tests/RegisteredNamespaceTest.php
delete mode 100644 tests/Elasticsearch/Tests/Serializers/ArrayToJSONSerializerTest.php
delete mode 100644 tests/Elasticsearch/Tests/Serializers/EverythingToJSONSerializerTest.php
delete mode 100644 tests/Elasticsearch/Tests/Serializers/SmartSerializerTest.php
delete mode 100644 tests/Elasticsearch/Tests/TransportTest.php
create mode 100644 tests/Response/ElasticsearchTest.php
create mode 100644 tests/Transport/AsyncOnSuccessNoExceptionTest.php
create mode 100644 tests/Transport/AsyncOnSuccessTest.php
rename tests/{Elasticsearch/Tests => }/Utility.php (95%)
delete mode 100644 tests/bootstrap.php
delete mode 100644 util/ClientEndpoint.php
delete mode 100644 util/Endpoint.php
delete mode 100644 util/GenerateEndpoints.php
delete mode 100644 util/NamespaceEndpoint.php
delete mode 100644 util/add_header.pl
delete mode 100644 util/alternatives_report.spec.json
delete mode 100755 util/clean_es_docker.sh
delete mode 100644 util/parsed-alternative-report.json
delete mode 100755 util/run_es_docker.sh
diff --git a/.ci/run-repository.sh b/.ci/run-repository.sh
index 9a2bf4d4c..157c3b59a 100644
--- a/.ci/run-repository.sh
+++ b/.ci/run-repository.sh
@@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail
-PHP_VERSION=${PHP_VERSION-7.4-cli}
+PHP_VERSION=${PHP_VERSION-8.0-cli}
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
elasticsearch_container=${elasticsearch_container-}
diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml
index 826b91acd..0e9b02d77 100644
--- a/.ci/test-matrix.yml
+++ b/.ci/test-matrix.yml
@@ -3,9 +3,9 @@ STACK_VERSION:
- 8.0.0-SNAPSHOT
PHP_VERSION:
+ - 8.1-cli
- 8.0-cli
- 7.4-cli
- - 7.3-cli
TEST_SUITE:
- free
diff --git a/.gitattributes b/.gitattributes
index 2339e9db9..e59ed4a8a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -5,11 +5,8 @@
/util export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
-/.gitmodules export-ignore
-/.php_cs export-ignore
/phpstan.neon export-ignore
/phpunit-integration-tests.xml export-ignore
/phpunit-yaml-free-tests.xml export-ignore
/phpunit-yaml-platinum-tests.xml export-ignore
/phpunit.xml.dist export-ignore
-/ruleset.xml export-ignore
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 8cff3a560..742468b3f 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
- php-version: [7.3, 7.4, 8.0]
+ php-version: [7.4, 8.0, 8.1]
os: [ubuntu-latest]
es-version: [8.0.0-SNAPSHOT]
@@ -40,10 +40,6 @@ jobs:
run: |
composer install --prefer-dist
- - name: PHP Coding Standards
- run: |
- composer run-script phpcs
-
- name: PHP Static Analysis Tool
run: |
composer run-script phpstan
@@ -53,22 +49,4 @@ jobs:
vendor/bin/phpunit -c phpunit.xml.dist
env:
TEST_SUITE: free
-
- - name: Configure sysctl limits
- run: |
- sudo swapoff -a
- sudo sysctl -w vm.swappiness=1
- sudo sysctl -w fs.file-max=262144
- sudo sysctl -w vm.max_map_count=262144
-
- - name: Runs Elasticsearch ${{ matrix.es-version }}
- uses: elastic/elastic-github-actions/elasticsearch@master
- with:
- stack-version: ${{ matrix.es-version }}
-
- - name: Integration tests
- run: |
- vendor/bin/phpunit -c phpunit-integration-tests.xml
- env:
- ELASTICSEARCH_URL: http://localhost:9200
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index b96a449df..61b321f53 100755
--- a/.gitignore
+++ b/.gitignore
@@ -45,7 +45,7 @@ build
tests/*-junit.xml
# YAML tests
-tests/Elasticsearch/Tests/Yaml
+tests/Yaml
# Exclude .ci/make.sh artifcats
.ci/output
\ No newline at end of file
diff --git a/.php_cs b/.php_cs
deleted file mode 100644
index 5604a025a..000000000
--- a/.php_cs
+++ /dev/null
@@ -1,23 +0,0 @@
-exclude('benchmarks')
- ->exclude('docs')
- ->exclude('util')
- ->exclude('.github')
- ->exclude('util')
- ->exclude('travis')
- ->exclude('util/cache')
- ->exclude('util/elasticsearch')
- ->exclude('tests/Elasticsearch/Tests/Yaml')
- ->exclude('vendor')
- ->in(__DIR__);
-
- return Symfony\CS\Config\Config::create()
- ->setUsingCache(true)
- ->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
- ->finder($finder);
-}
-
-return php_cs();
diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md
index 52a3baa20..4cd3b2154 100644
--- a/BREAKING_CHANGES.md
+++ b/BREAKING_CHANGES.md
@@ -1,3 +1,26 @@
+# 8.0
+
+This major release is a complete new PHP client for Elasticsearch. We build it from scratch!
+We tried to reduce the BC breaks as much as possible but there are some big differences :rage:
+
+## Architectural changes:
+
+- we changed the namespace, now everything is under `Elastic\Elasticsearch`;
+- we used the [elastic-transport-php](https://github.com/elastic/elastic-transport-php) library
+ to manage the HTTP requests and responses; This library allows the usage of any [PSR-18](https://www.php-fig.org/psr/psr-18/)
+ client.
+- we changed the response type of each endpoints using a wrapper class of a [PSR-7](https://www.php-fig.org/psr/psr-7/)
+ response. This class allows the access of the body response as array or object. This means
+ you can access the API response as in 7.x, no BC break here! :angel:
+
+## Specific changes:
+
+- to be completed
+# 7.17
+
+- We changed the signature of `Elasticsearch\Common\EmptyLogger::log` adding the `void` return type.
+ This change has been needed to support psr/log v3.
+
# 7.4
- Using a deprecated parameter is notified triggering a [E_USER_DEPRECATED](https://www.php.net/manual/en/errorfunc.constants.php)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a1c8ff1d6..65ee7c8a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,50 @@
+## Release 7.17.0
+
+- Allow psr/log v3
+ [#1184](https://github.com/elastic/elasticsearch-php/pull/1184)
+
+## Release 7.16.0
+
+- Added support of includePortInHostHeader in ClientBuilder::fromConfig
+ [#1181](https://github.com/elastic/elasticsearch-php/pull/1181)
+- Fixed UTF-16 issue in SmartSerializer with single unpaired surrogate in unicode escape
+ [#1179](https://github.com/elastic/elasticsearch-php/pull/1179)
+- Replace trait with abstract class to avoid Deprecated Functionality issue in PHP 8.1
+ [#1175](https://github.com/elastic/elasticsearch-php/pull/1175)
+
+## Release 7.15.0
+
+- Updated endpoints for Elasticsearch 7.15.0
+ [995f6d4](https://github.com/elastic/elasticsearch-php/commit/995f6d4bde7de76004e95d7a434b1d59da7a7e75)
+
+## Release 7.14.0
+
+- Usage of psr/log version 2
+ [#1154](https://github.com/elastic/elasticsearch-php/pull/1154)
+- Update search iterators to send `scroll_id` inside the request body
+ [#1134](https://github.com/elastic/elasticsearch-php/pull/1134)
+- Added the `ingest.geoip.downloader.enabled=false` setting for ES
+ [5867351](https://github.com/elastic/elasticsearch-php/commit/586735109dc18f22bfdf3b73ab0621b37e857be1)
+- Removed phpcs for autogenerated files (endpoints)
+ [651c57b](https://github.com/elastic/elasticsearch-php/commit/651c57b2e6bf98a0fd48220949966e630e5a804a)
+
+## Release 7.13.1
+
+- Added port in url for trace and logger messages
+ [#1126](https://github.com/elastic/elasticsearch-php/pull/1126)
+## Release 7.13.0
+
+- (DOCS) Added the HTTP meta data section
+ [#1143](https://github.com/elastic/elasticsearch-php/pull/1143)
+- Added support for API Compatibility Header
+ [#1142](https://github.com/elastic/elasticsearch-php/pull/1142)
+- (DOCS) Added Helpers section to PHP book
+ [#1129](https://github.com/elastic/elasticsearch-php/pull/1129)
+- Added the API description in phpdoc section for each endpoint
+ [9e05c81](https://github.com/elastic/elasticsearch-php/commit/9e05c8108b638b60cc676b6a4f4be97c7df9eb64)
+- Usage of PHPUnit 9 only + migrated xml configurations
+ [038b5dd](https://github.com/elastic/elasticsearch-php/commit/038b5dd043dc76b20b9f5f265ea914a38d33568d)
+
## Release 7.12.0
- Updated the endpoints for ES 7.12 + removed cpliakas/git-wrapper
diff --git a/LICENSE b/LICENSE
index 1944df193..3a92ef35b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,19 @@
-Copyright 2013-2020 Elasticsearch B.V.
+Copyright 2022 Elasticsearch B.V (https://www.elastic.co)
-elasticsearch-php is licensed under the Apache License, Version 2.0
-( or ) or the GNU
-Lesser General Public License, Version 2.1 ( or
-) at your option.
\ No newline at end of file
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/LICENSE-APACHE b/LICENSE-APACHE
deleted file mode 100644
index dd5b3a58a..000000000
--- a/LICENSE-APACHE
+++ /dev/null
@@ -1,174 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
diff --git a/LICENSE-LGPL b/LICENSE-LGPL
deleted file mode 100644
index a6f981c8d..000000000
--- a/LICENSE-LGPL
+++ /dev/null
@@ -1,459 +0,0 @@
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- [This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
- freedom to share and change it. By contrast, the GNU General Public
- Licenses are intended to guarantee your freedom to share and change
- free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
- specially designated software packages--typically libraries--of the
- Free Software Foundation and other authors who decide to use it. You
- can use it too, but we suggest you first think carefully about whether
- this license or the ordinary General Public License is the better
- strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
- not price. Our General Public Licenses are designed to make sure that
- you have the freedom to distribute copies of free software (and charge
- for this service if you wish); that you receive source code or can get
- it if you want it; that you can change the software and use pieces of
- it in new free programs; and that you are informed that you can do
- these things.
-
- To protect your rights, we need to make restrictions that forbid
- distributors to deny you these rights or to ask you to surrender these
- rights. These restrictions translate to certain responsibilities for
- you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
- or for a fee, you must give the recipients all the rights that we gave
- you. You must make sure that they, too, receive or can get the source
- code. If you link other code with the library, you must provide
- complete object files to the recipients, so that they can relink them
- with the library after making changes to the library and recompiling
- it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
- library, and (2) we offer you this license, which gives you legal
- permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
- there is no warranty for the free library. Also, if the library is
- modified by someone else and passed on, the recipients should know
- that what they have is not the original version, so that the original
- author's reputation will not be affected by problems that might be
- introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
- any free program. We wish to make sure that a company cannot
- effectively restrict the users of a free program by obtaining a
- restrictive license from a patent holder. Therefore, we insist that
- any patent license obtained for a version of the library must be
- consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
- ordinary GNU General Public License. This license, the GNU Lesser
- General Public License, applies to certain designated libraries, and
- is quite different from the ordinary General Public License. We use
- this license for certain libraries in order to permit linking those
- libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
- a shared library, the combination of the two is legally speaking a
- combined work, a derivative of the original library. The ordinary
- General Public License therefore permits such linking only if the
- entire combination fits its criteria of freedom. The Lesser General
- Public License permits more lax criteria for linking other code with
- the library.
-
- We call this license the "Lesser" General Public License because it
- does Less to protect the user's freedom than the ordinary General
- Public License. It also provides other free software developers Less
- of an advantage over competing non-free programs. These disadvantages
- are the reason we use the ordinary General Public License for many
- libraries. However, the Lesser license provides advantages in certain
- special circumstances.
-
- For example, on rare occasions, there may be a special need to
- encourage the widest possible use of a certain library, so that it becomes
- a de-facto standard. To achieve this, non-free programs must be
- allowed to use the library. A more frequent case is that a free
- library does the same job as widely used non-free libraries. In this
- case, there is little to gain by limiting the free library to free
- software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
- programs enables a greater number of people to use a large body of
- free software. For example, permission to use the GNU C Library in
- non-free programs enables many more people to use the whole GNU
- operating system, as well as its variant, the GNU/Linux operating
- system.
-
- Although the Lesser General Public License is Less protective of the
- users' freedom, it does ensure that the user of a program that is
- linked with the Library has the freedom and the wherewithal to run
- that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
- modification follow. Pay close attention to the difference between a
- "work based on the library" and a "work that uses the library". The
- former contains code derived from the library, whereas the latter must
- be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
- program which contains a notice placed by the copyright holder or
- other authorized party saying it may be distributed under the terms of
- this Lesser General Public License (also called "this License").
- Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
- prepared so as to be conveniently linked with application programs
- (which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
- which has been distributed under these terms. A "work based on the
- Library" means either the Library or any derivative work under
- copyright law: that is to say, a work containing the Library or a
- portion of it, either verbatim or with modifications and/or translated
- straightforwardly into another language. (Hereinafter, translation is
- included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
- making modifications to it. For a library, complete source code means
- all the source code for all modules it contains, plus any associated
- interface definition files, plus the scripts used to control compilation
- and installation of the library.
-
- Activities other than copying, distribution and modification are not
- covered by this License; they are outside its scope. The act of
- running a program using the Library is not restricted, and output from
- such a program is covered only if its contents constitute a work based
- on the Library (independent of the use of the Library in a tool for
- writing it). Whether that is true depends on what the Library does
- and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
- complete source code as you receive it, in any medium, provided that
- you conspicuously and appropriately publish on each copy an
- appropriate copyright notice and disclaimer of warranty; keep intact
- all the notices that refer to this License and to the absence of any
- warranty; and distribute a copy of this License along with the
- Library.
-
- You may charge a fee for the physical act of transferring a copy,
- and you may at your option offer warranty protection in exchange for a
- fee.
-
- 2. You may modify your copy or copies of the Library or any portion
- of it, thus forming a work based on the Library, and copy and
- distribute such modifications or work under the terms of Section 1
- above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
- These requirements apply to the modified work as a whole. If
- identifiable sections of that work are not derived from the Library,
- and can be reasonably considered independent and separate works in
- themselves, then this License, and its terms, do not apply to those
- sections when you distribute them as separate works. But when you
- distribute the same sections as part of a whole which is a work based
- on the Library, the distribution of the whole must be on the terms of
- this License, whose permissions for other licensees extend to the
- entire whole, and thus to each and every part regardless of who wrote
- it.
-
- Thus, it is not the intent of this section to claim rights or contest
- your rights to work written entirely by you; rather, the intent is to
- exercise the right to control the distribution of derivative or
- collective works based on the Library.
-
- In addition, mere aggregation of another work not based on the Library
- with the Library (or with a work based on the Library) on a volume of
- a storage or distribution medium does not bring the other work under
- the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
- License instead of this License to a given copy of the Library. To do
- this, you must alter all the notices that refer to this License, so
- that they refer to the ordinary GNU General Public License, version 2,
- instead of to this License. (If a newer version than version 2 of the
- ordinary GNU General Public License has appeared, then you can specify
- that version instead if you wish.) Do not make any other change in
- these notices.
-
- Once this change is made in a given copy, it is irreversible for
- that copy, so the ordinary GNU General Public License applies to all
- subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
- the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
- derivative of it, under Section 2) in object code or executable form
- under the terms of Sections 1 and 2 above provided that you accompany
- it with the complete corresponding machine-readable source code, which
- must be distributed under the terms of Sections 1 and 2 above on a
- medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
- from a designated place, then offering equivalent access to copy the
- source code from the same place satisfies the requirement to
- distribute the source code, even though third parties are not
- compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
- Library, but is designed to work with the Library by being compiled or
- linked with it, is called a "work that uses the Library". Such a
- work, in isolation, is not a derivative work of the Library, and
- therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
- creates an executable that is a derivative of the Library (because it
- contains portions of the Library), rather than a "work that uses the
- library". The executable is therefore covered by this License.
- Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
- that is part of the Library, the object code for the work may be a
- derivative work of the Library even though the source code is not.
- Whether this is true is especially significant if the work can be
- linked without the Library, or if the work is itself a library. The
- threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
- structure layouts and accessors, and small macros and small inline
- functions (ten lines or less in length), then the use of the object
- file is unrestricted, regardless of whether it is legally a derivative
- work. (Executables containing this object code plus portions of the
- Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
- distribute the object code for the work under the terms of Section 6.
- Any executables containing that work also fall under Section 6,
- whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
- link a "work that uses the Library" with the Library to produce a
- work containing portions of the Library, and distribute that work
- under terms of your choice, provided that the terms permit
- modification of the work for the customer's own use and reverse
- engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
- Library is used in it and that the Library and its use are covered by
- this License. You must supply a copy of this License. If the work
- during execution displays copyright notices, you must include the
- copyright notice for the Library among them, as well as a reference
- directing the user to the copy of this License. Also, you must do one
- of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
- Library" must include any data and utility programs needed for
- reproducing the executable from it. However, as a special exception,
- the materials to be distributed need not include anything that is
- normally distributed (in either source or binary form) with the major
- components (compiler, kernel, and so on) of the operating system on
- which the executable runs, unless that component itself accompanies
- the executable.
-
- It may happen that this requirement contradicts the license
- restrictions of other proprietary libraries that do not normally
- accompany the operating system. Such a contradiction means you cannot
- use both them and the Library together in an executable that you
- distribute.
-
- 7. You may place library facilities that are a work based on the
- Library side-by-side in a single library together with other library
- facilities not covered by this License, and distribute such a combined
- library, provided that the separate distribution of the work based on
- the Library and of the other library facilities is otherwise
- permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
- the Library except as expressly provided under this License. Any
- attempt otherwise to copy, modify, sublicense, link with, or
- distribute the Library is void, and will automatically terminate your
- rights under this License. However, parties who have received copies,
- or rights, from you under this License will not have their licenses
- terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
- signed it. However, nothing else grants you permission to modify or
- distribute the Library or its derivative works. These actions are
- prohibited by law if you do not accept this License. Therefore, by
- modifying or distributing the Library (or any work based on the
- Library), you indicate your acceptance of this License to do so, and
- all its terms and conditions for copying, distributing or modifying
- the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
- Library), the recipient automatically receives a license from the
- original licensor to copy, distribute, link with or modify the Library
- subject to these terms and conditions. You may not impose any further
- restrictions on the recipients' exercise of the rights granted herein.
- You are not responsible for enforcing compliance by third parties with
- this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
- infringement or for any other reason (not limited to patent issues),
- conditions are imposed on you (whether by court order, agreement or
- otherwise) that contradict the conditions of this License, they do not
- excuse you from the conditions of this License. If you cannot
- distribute so as to satisfy simultaneously your obligations under this
- License and any other pertinent obligations, then as a consequence you
- may not distribute the Library at all. For example, if a patent
- license would not permit royalty-free redistribution of the Library by
- all those who receive copies directly or indirectly through you, then
- the only way you could satisfy both it and this License would be to
- refrain entirely from distribution of the Library.
-
- If any portion of this section is held invalid or unenforceable under any
- particular circumstance, the balance of the section is intended to apply,
- and the section as a whole is intended to apply in other circumstances.
-
- It is not the purpose of this section to induce you to infringe any
- patents or other property right claims or to contest validity of any
- such claims; this section has the sole purpose of protecting the
- integrity of the free software distribution system which is
- implemented by public license practices. Many people have made
- generous contributions to the wide range of software distributed
- through that system in reliance on consistent application of that
- system; it is up to the author/donor to decide if he or she is willing
- to distribute software through any other system and a licensee cannot
- impose that choice.
-
- This section is intended to make thoroughly clear what is believed to
- be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
- certain countries either by patents or by copyrighted interfaces, the
- original copyright holder who places the Library under this License may add
- an explicit geographical distribution limitation excluding those countries,
- so that distribution is permitted only in or among countries not thus
- excluded. In such case, this License incorporates the limitation as if
- written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
- versions of the Lesser General Public License from time to time.
- Such new versions will be similar in spirit to the present version,
- but may differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the Library
- specifies a version number of this License which applies to it and
- "any later version", you have the option of following the terms and
- conditions either of that version or of any later version published by
- the Free Software Foundation. If the Library does not specify a
- license version number, you may choose any version ever published by
- the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
- programs whose distribution conditions are incompatible with these,
- write to the author to ask for permission. For software which is
- copyrighted by the Free Software Foundation, write to the Free
- Software Foundation; we sometimes make exceptions for this. Our
- decision will be guided by the two goals of preserving the free status
- of all derivatives of our free software and of promoting the sharing
- and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
- WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
- EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
- OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
- KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
- LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
- THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
- WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
- AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
- FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
- CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
- LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
- RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
- FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
- SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- DAMAGES.
-
- END OF TERMS AND CONDITIONS
diff --git a/NOTICE b/NOTICE
deleted file mode 100644
index 3897fb594..000000000
--- a/NOTICE
+++ /dev/null
@@ -1,32 +0,0 @@
-Apache v2.0 Notice:
- Copyright 2013-2014 Elasticsearch
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-LGPL v2.1 Notice:
- Copyright (C) 2013-2014 Elasticsearch
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
\ No newline at end of file
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
index da6c2cc9e..fdb73af79
--- a/README.md
+++ b/README.md
@@ -1,506 +1,114 @@
-elasticsearch-php
-=================
+Elasticsearch PHP client
+========================
[![Build status](https://github.com/elastic/elasticsearch-php/workflows/PHP%20test/badge.svg)](https://github.com/elastic/elasticsearch-php/actions) [![Latest Stable Version](https://poser.pugx.org/elasticsearch/elasticsearch/v/stable)](https://packagist.org/packages/elasticsearch/elasticsearch) [![Total Downloads](https://poser.pugx.org/elasticsearch/elasticsearch/downloads)](https://packagist.org/packages/elasticsearch/elasticsearch)
-Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in PHP; because of this it tries to be opinion-free and very extendable.
-
-To maintain consistency across all the low-level clients (Ruby, Python, etc.), clients accept simple associative arrays as parameters. All parameters, from the URI to the document body, are defined in the associative array.
-
-Starting from version `7.4.0`, all the endpoints (and namespaces) are autogenerated using the [util/GenerateEndpoints.php](https://github.com/elastic/elasticsearch-php/blob/master/util/GenerateEndpoints.php) script. This script reads the [Elasticsearch API specs](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/api) and generates the PHP classes for all the endpoints.
-
-Starting from version `7.7.0` we included also the [XPack endpoints](https://www.elastic.co/what-is/open-x-pack) of Elasticsearch.
-These APIs are related to:
-
-- [Cross-cluster replication](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-apis.html)
-- [Graph explorer](https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html)
-- [Info](https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html)
-- [Licensing](https://www.elastic.co/guide/en/elasticsearch/reference/current/licensing-apis.html)
-- [Machine learning anomaly detection](https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html)
-- [Machine learning data frame analytics](https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-df-analytics-apis.html)
-- [Migration](https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api.html)
-- [Reload search analyzers](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-reload-analyzers.html)
-- [Rollup](https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-apis.html)
-- [Security](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api.html)
-- [Snapshot lifecycle management](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-lifecycle-management-api.html)
-- [Transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-apis.html)
-- [Usage](https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html)
-- [Watcher](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api.html)
-
-Table of Contents
-=================
-
-- [elasticsearch-php](#elasticsearch-php)
- * [Features](#features)
- * [Version Matrix](#version-matrix)
- * [Compatibility](#compatibility)
- * [Documentation](#documentation)
- * [Installation via Composer](#installation-via-composer)
- * [PHP Version Requirement](#php-version-requirement)
- * [Quickstart](#quickstart)
- + [Index a document](#index-a-document)
- + [Get a document](#get-a-document)
- + [Search for a document](#search-for-a-document)
- + [Delete a document](#delete-a-document)
- + [Delete an index](#delete-an-index)
- + [Create an index](#create-an-index)
-- [Unit Testing using Mock a Elastic Client](#unit-testing-using-mock-a-elastic-client)
-- [Contributing](#contributing)
-- [Wrap up](#wrap-up)
- * [Available Licenses](#available-licenses)
- + [Contributions](#contributions)
-
-Features
---------
-
- - One-to-one mapping with REST API and other language clients
- - Configurable, automatic discovery of cluster nodes
- - Persistent, Keep-Alive connections (within the lifetime of the script)
- - Load balancing (with pluggable selection strategy) across all available nodes. Defaults to round-robin
- - Pluggable connection pools to offer different connection strategies
- - Generalized, pluggable architecture - most components can be replaced with your own custom class if specialized behavior is required
- - Option to use asynchronous future, which enables parallel execution of curl requests to multiple nodes
+## Contents
+- [Getting started](#getting-started-)
+- [Usage](#usage)
+- [Backward Incompatible Changes](#backward-incompatible-changes-)
+- [FAQ](#faq-)
+- [Contribute](#contribute-)
+- [License](#license-)
-**Note:** [X-Pack](https://www.elastic.co/what-is/open-x-pack) endpoints are included from elasticsearch-php 7.7+.
-
+***
-Version Matrix
---------------
+## Getting started 🐣
-| Elasticsearch Version | Elasticsearch-PHP Branch |
-| --------------------- | ------------------------ |
-| >= 7.x | 7.x |
-| >= 6.6, < 7.0 | 6.7.x |
-| >= 6.0, < 6.6 | 6.5.x |
-| >= 5.0, < 6.0 | 5.0 |
-| >= 2.0, < 5.0 | 1.0 or 2.0 |
-| >= 1.0, < 2.0 | 1.0 or 2.0 |
-| <= 0.90.x | 0.4 |
+Using this client assumes that you have an [Elasticsearch](https://www.elastic.co/elasticsearch/) server installed and running.
- - If you are using Elasticsearch 7.x you can use Elasticsearch-PHP 7.x branch
- - If you are using Elasticsearch 6.6 to 6.7, use Elasticsearch-PHP 6.7.x branch.
- - If you are using Elasticsearch 6.0 to 6.5, use Elasticsearch-PHP 6.5.x branch.
- - If you are using Elasticsearch 5.x, use Elasticsearch-PHP 5.0 branch.
- - If you are using Elasticsearch 1.x or 2.x, prefer using the Elasticsearch-PHP 2.0 branch. The 1.0 branch is compatible however.
- - If you are using a version older than 1.0, you must install the `0.4` Elasticsearch-PHP branch. Since ES 0.90.x and below is now EOL, the corresponding `0.4` branch will not receive any more development or bugfixes. Please upgrade.
- - You should never use Elasticsearch-PHP Master branch, as it tracks Elasticsearch master and may contain incomplete features or breaks in backwards compatibility. Only use ES-PHP master if you are developing against ES master for some reason.
+You can install the client in your project by using composer:
-Compatibility
--------------
-
-Language clients are forward compatible; meaning that clients support communicating
-with greater or equal minor versions of Elasticsearch. Elasticsearch language
-clients are only backwards compatible with default distributions and without
-guarantees made.
-
-Documentation
---------------
-[Full documentation can be found here.](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html) Docs are stored within the repo under /docs/, so if you see a typo or problem, please submit a PR to fix it!
-
-We also provide a code examples generator for PHP using the `util/GenerateDocExamples.php` script. This command parses the `util/alternative_report.spec.json` file produced from this [JSON specification](https://raw.githubusercontent.com/elastic/built-docs/master/raw/en/elasticsearch/reference/master/alternatives_report.json) and it generates the PHP examples for each digest value.
-The examples are stored in asciidoc format under `docs/examples` folder.
-
-Installation via Composer
--------------------------
-The recommended method to install _Elasticsearch-PHP_ is through [Composer](http://getcomposer.org).
-
-1. Add `elasticsearch/elasticsearch` as a dependency in your project's `composer.json` file (change version to suit your version of Elasticsearch, for instance for ES 7.0):
-
- ```json
- {
- "require": {
- "elasticsearch/elasticsearch": "^7.0"
- }
- }
- ```
-
-2. Download and install Composer:
-
- ```bash
- curl -s http://getcomposer.org/installer | php
- ```
-
-3. Install your dependencies:
-
- ```bash
- php composer.phar install
- ```
-
-4. Require Composer's autoloader
-
- Composer also prepares an autoload file that's capable of autoloading all the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:
-
- ```php
- build();
- ```
-
-You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at [getcomposer.org](http://getcomposer.org).
-
-PHP Version Requirement
-----
-Version 7.0 of this library requires at least PHP version 7.1. In addition, it requires the native JSON
-extension to be version 1.3.7 or higher.
-
-| Elasticsearch-PHP Branch | PHP Version |
-| ----------- | ------------------------ |
-| 7.0 | >= 7.1.0 |
-| 6.0 | >= 7.0.0 |
-| 5.0 | >= 5.6.6 |
-| 2.0 | >= 5.4.0 |
-| 0.4, 1.0 | >= 5.3.9 |
-
-
-Quickstart
-----
-
-
-### Index a document
-
-In elasticsearch-php, almost everything is configured by associative arrays. The REST endpoint, document and optional parameters - everything is an associative array.
-
-To index a document, we need to specify three pieces of information: index, id and a document body. This is done by
-constructing an associative array of key:value pairs. The request body is itself an associative array with key:value pairs
-corresponding to the data in your document:
-
-```php
-$params = [
- 'index' => 'my_index',
- 'id' => 'my_id',
- 'body' => ['testField' => 'abc']
-];
-
-$response = $client->index($params);
-print_r($response);
+```bash
+composer require elasticsearch/elasticsearch
```
-The response that you get back indicates the document was created in the index that you specified. The response is an
-associative array containing a decoded version of the JSON that Elasticsearch returns:
+After the installation you can use the client as follows:
```php
-Array
-(
- [_index] => my_index
- [_type] => _doc
- [_id] => my_id
- [_version] => 1
- [result] => created
- [_shards] => Array
- (
- [total] => 1
- [successful] => 1
- [failed] => 0
- )
-
- [_seq_no] => 0
- [_primary_term] => 1
-)
-```
-### Get a document
+use Elastic\Elasticsearch\ClientBuilder;
-Let's get the document that we just indexed. This will simply return the document:
+$client = ClientBuilder::create()
+ ->setHosts(['localhost:9200'])
+ ->build();
-```php
-$params = [
- 'index' => 'my_index',
- 'id' => 'my_id'
-];
+// Info API
+$response = $client->info();
-$response = $client->get($params);
-print_r($response);
+echo $response['version']['number']; // 8.0.0
```
-The response contains some metadata (index, version, etc.) as well as a `_source` field, which is the original document
-that you sent to Elasticsearch.
+The `$response` is an object of `Elastic\Elasticsearch\Response\Elasticsearch`
+class that implements `ElasticsearchInterface`, PSR-7 [ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface)
+and [ArrayAccess](https://www.php.net/manual/en/class.arrayaccess.php).
-```php
-Array
-(
- [_index] => my_index
- [_type] => _doc
- [_id] => my_id
- [_version] => 1
- [_seq_no] => 0
- [_primary_term] => 1
- [found] => 1
- [_source] => Array
- (
- [testField] => abc
- )
-
-)
-```
-
-If you want to retrieve the `_source` field directly, there is the `getSource` method:
+You can manage the response as PSR-7, as follows:
```php
-$params = [
- 'index' => 'my_index',
- 'id' => 'my_id'
-];
-
-$source = $client->getSource($params);
-print_r($source);
+echo $response->getStatusCode(); // 200
+echo (string) $response->getBody(); // Response body in JSON
```
-The response will be just the `_source` value:
+You can access the result of each endpoints using object or array interface,
+as follows:
```php
-Array
-(
- [testField] => abc
-)
+// Access body value as object
+echo $response->version->number; // 8.0.0
+// Access body value as array
+echo $response['version']['number']; // 8.0.0
+
+var_dump($response->asArray()); // response body content as array
+var_dump($response->asObject()); // response body content as object
+var_dump($response->asString()); // response body as string (JSON)
```
-### Search for a document
+## Usage
-Searching is a hallmark of Elasticsearch, so let's perform a search. We are going to use the Match query as a demonstration:
-
-```php
-$params = [
- 'index' => 'my_index',
- 'body' => [
- 'query' => [
- 'match' => [
- 'testField' => 'abc'
- ]
- ]
- ]
-];
-
-$response = $client->search($params);
-print_r($response);
-```
+To be completed
-The response is a little different from the previous responses. We see some metadata (`took`, `timed_out`, etc.) and
-an array named `hits`. This represents your search results. Inside of `hits` is another array named `hits`, which contains
-individual search results:
-```php
-Array
-(
- [took] => 33
- [timed_out] =>
- [_shards] => Array
- (
- [total] => 1
- [successful] => 1
- [skipped] => 0
- [failed] => 0
- )
-
- [hits] => Array
- (
- [total] => Array
- (
- [value] => 1
- [relation] => eq
- )
-
- [max_score] => 0.2876821
- [hits] => Array
- (
- [0] => Array
- (
- [_index] => my_index
- [_type] => _doc
- [_id] => my_id
- [_score] => 0.2876821
- [_source] => Array
- (
- [testField] => abc
- )
-
- )
-
- )
-
- )
-
-)
-```
-
-### Delete a document
-
-Alright, let's go ahead and delete the document that we added previously:
-
-```php
-$params = [
- 'index' => 'my_index',
- 'id' => 'my_id'
-];
+For more information about the Elasticsearch REST API you can read the official documentation
+[here](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html).
-$response = $client->delete($params);
-print_r($response);
-```
+### Versioning
-You'll notice this is identical syntax to the `get` syntax. The only difference is the operation: `delete` instead of
-`get`. The response will confirm the document was deleted:
+ This client is versioned and released alongside Elasticsearch server.
-```php
-Array
-(
- [_index] => my_index
- [_type] => _doc
- [_id] => my_id
- [_version] => 2
- [result] => deleted
- [_shards] => Array
- (
- [total] => 1
- [successful] => 1
- [failed] => 0
- )
-
- [_seq_no] => 1
- [_primary_term] => 1
-)
-```
+ To guarantee compatibility, use the most recent version of this library within the major version of the corresponding Enterprise Search implementation.
+ For example, for Elasticsearch `7.16`, use `7.16` of this library or above, but not `8.0`.
-### Delete an index
+## Backward Incompatible Changes :boom:
-Due to the dynamic nature of Elasticsearch, the first document we added automatically built an index with some default settings. Let's delete that index because we want to specify our own settings later:
+To be completed
-```php
-$deleteParams = [
- 'index' => 'my_index'
-];
-$response = $client->indices()->delete($deleteParams);
-print_r($response);
-```
+## FAQ 🔮
-The response:
+### Where do I report issues with the client?
+If something is not working as expected, please open an [issue](https://github.com/elastic/elasticsearh-php/issues/new).
-```php
-Array
-(
- [acknowledged] => 1
-)
-```
+### Where else can I go to get help?
-### Create an index
+You can checkout the [Elastic community discuss forums](https://discuss.elastic.co/).
-Now that we are starting fresh (no data or index), let's add a new index with some custom settings:
+## Contribute 🚀
-```php
-$params = [
- 'index' => 'my_index',
- 'body' => [
- 'settings' => [
- 'number_of_shards' => 2,
- 'number_of_replicas' => 0
- ]
- ]
-];
-
-$response = $client->indices()->create($params);
-print_r($response);
-```
+We welcome contributors to the project. Before you begin, a couple notes...
-Elasticsearch will now create that index with your chosen settings, and return an acknowledgement:
++ If you want to contribute to this project you need to subscribe to a [Contributor Agreement](https://www.elastic.co/contributor-agreement).
++ Before opening a pull request, please create an issue to [discuss the scope of your proposal](https://github.com/elastic/elasticsearch-php/issues).
++ If you want to send a PR for version `8.0` please use the `8.0` branch.
++ Never send PR to `master` unless you want to contribute to the development version of the client (`master` represents the next major version).
++ Each PR should include a **unit test** using [PHPUnit](https://phpunit.de/). If you are not familiar with PHPUnit you can have a look at the [reference](https://phpunit.readthedocs.io/en/9.5/).
-```php
-Array
-(
- [acknowledged] => 1
-)
-```
+Thanks in advance for your contribution! :heart:
-Unit Testing using Mock a Elastic Client
-========================================
-```php
-use GuzzleHttp\Ring\Client\MockHandler;
-use Elasticsearch\ClientBuilder;
-
-// The connection class requires 'body' to be a file stream handle
-// Depending on what kind of request you do, you may need to set more values here
-$handler = new MockHandler([
- 'status' => 200,
- 'transfer_stats' => [
- 'total_time' => 100
- ],
- 'body' => fopen('somefile.json'),
- 'effective_url' => 'localhost'
-]);
-$builder = ClientBuilder::create();
-$builder->setHosts(['somehost']);
-$builder->setHandler($handler);
-$client = $builder->build();
-// Do a request and you'll get back the 'body' response above
-```
+## License 📗
-Contributing
-============
-
-If you want to contribute to this project you need to subscribe to a [Contributor Agreement](https://www.elastic.co/contributor-agreement).
-If you want to send a PR for version `Y` please use the `Y.x` branch. For instance if you want to send a PR for **elasticsearch-php 7** use the `7.x` branch.
-
-Never send PR to `master` unless you want to contribute to the development version of the client (`master` represents the next major version).
-
-Each PR should include a **unit test** using [PHPUnit](https://phpunit.de/). If you are not familiar with PHPUnit you can have a look at this [reference](https://phpunit.readthedocs.io/en/7.0/).
-
-Wrap up
-=======
-
-That was just a crash-course overview of the client and its syntax. If you are familiar with Elasticsearch, you'll notice that the methods are named just like REST endpoints.
-
-You'll also notice that the client is configured in a manner that facilitates easy discovery via the IDE. All core actions are available under the `$client` object (indexing, searching, getting, etc.). Index and cluster management are located under the `$client->indices()` and `$client->cluster()` objects, respectively.
-
-Check out the rest of the [Documentation](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html) to see how the entire client works.
-
-
-Available Licenses
--------
-
-Starting with version 1.3.1, Elasticsearch-PHP is available under two licenses: Apache v2.0 and LGPL v2.1. Versions
-prior to 1.3.1 are still licensed with only Apache v2.0.
-
-The user may choose which license they wish to use. Since there is no discriminating executable or distribution bundle
-to differentiate licensing, the user should document their license choice externally, in case the library is re-distributed.
-If no explicit choice is made, assumption is that redistribution obeys rules of both licenses.
-
-### Contributions
-All contributions to the library are to be so that they can be licensed under both licenses.
-
-Apache v2.0 License:
->Copyright 2013-2016 Elasticsearch
->
->Licensed under the Apache License, Version 2.0 (the "License");
->you may not use this file except in compliance with the License.
->You may obtain a copy of the License at
->
-> http://www.apache.org/licenses/LICENSE-2.0
->
->Unless required by applicable law or agreed to in writing, software
->distributed under the License is distributed on an "AS IS" BASIS,
->WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
->See the License for the specific language governing permissions and
->limitations under the License.
-
-LGPL v2.1 Notice:
->Copyright (C) 2013-2016 Elasticsearch
->
->This library is free software; you can redistribute it and/or
->modify it under the terms of the GNU Lesser General Public
->License as published by the Free Software Foundation; either
->version 2.1 of the License, or (at your option) any later version.
->
->This library is distributed in the hope that it will be useful,
->but WITHOUT ANY WARRANTY; without even the implied warranty of
->MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
->Lesser General Public License for more details.
->
->You should have received a copy of the GNU Lesser General Public
->License along with this library; if not, write to the Free Software
->Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+[MIT](LICENSE) © [Elastic](https://www.elastic.co/)
diff --git a/composer.json b/composer.json
index 6ec649efb..57afbc297 100644
--- a/composer.json
+++ b/composer.json
@@ -1,55 +1,46 @@
{
"name": "elasticsearch/elasticsearch",
"description": "PHP Client for Elasticsearch",
- "keywords": ["search","client", "elasticsearch"],
- "type": "library",
- "license": "Apache-2.0",
- "authors": [
- {
- "name": "Zachary Tong"
- },
- {
- "name": "Enrico Zimuel"
- }
+ "keywords": [
+ "search",
+ "client",
+ "elasticsearch",
+ "elastic"
],
+ "type": "library",
+ "license": "MIT",
"require": {
- "php": "^7.3 || ^8.0",
- "ext-json": ">=1.3.7",
- "ezimuel/ringphp": "^1.1.2",
- "psr/log": "^1|^2"
+ "php": "^7.4 || ^8.0",
+ "elastic/transport": ">=8.0.0-rc3",
+ "psr/http-client": "^1.0",
+ "psr/http-message": "^1.0",
+ "psr/log": "^1|^2|^3",
+ "guzzlehttp/guzzle": "^7.0"
},
"require-dev": {
"ext-yaml": "*",
"ext-zip": "*",
- "mockery/mockery": "^1.2",
- "phpstan/phpstan": "^0.12",
- "phpunit/phpunit": "^9.3",
- "squizlabs/php_codesniffer": "^3.4",
- "symfony/finder": "~4.0"
- },
- "suggest": {
- "ext-curl": "*",
- "monolog/monolog": "Allows for client-level logging and tracing"
+ "mockery/mockery": "^1.5",
+ "phpstan/phpstan": "^1.4",
+ "phpunit/phpunit": "^9.5",
+ "symfony/finder": "~4.0",
+ "nyholm/psr7": "^1.5",
+ "php-http/mock-client": "^1.5"
},
"autoload": {
"psr-4": {
- "Elasticsearch\\": "src/Elasticsearch/"
+ "Elastic\\Elasticsearch\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
- "Elasticsearch\\Tests\\": "tests/Elasticsearch/Tests/",
- "Elasticsearch\\IntegrationTests\\": "tests/Elasticsearch/IntegrationTests/",
- "Elasticsearch\\Util\\": "util/"
+ "Elastic\\Elasticsearch\\Tests\\": "tests/",
+ "Elastic\\Elasticsearch\\Util\\": "util/"
}
},
- "config": {
- "sort-packages": true
- },
"scripts": {
- "phpcs": [
- "phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp src",
- "phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp tests --ignore=tests/Elasticsearch/Tests/Yaml"
+ "test" : [
+ "vendor/bin/phpunit"
],
"phpstan": [
"phpstan analyse src --level 2 --no-progress"
diff --git a/phpstan.neon b/phpstan.neon
index 8d3ed4325..8e7aa19ae 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,9 +1,3 @@
parameters:
- reportUnmatchedIgnoredErrors:
- false
ignoreErrors:
- - '#Unsafe usage of new static\(\)#'
- - '#Call to static method performRequest\(\) on trait#'
- - '#Constant JSON_THROW_ON_ERROR not found#'
- - '#Caught class JsonException not found#'
- - '#Call to method getCode\(\) on an unknown class JsonException#'
+ - '#PHPDoc tag @param has invalid value#'
diff --git a/phpunit-integration-tests.xml b/phpunit-integration-tests.xml
deleted file mode 100644
index 2c83e3ccc..000000000
--- a/phpunit-integration-tests.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- src
-
-
-
-
- tests
-
-
-
-
- Integration
-
-
-
diff --git a/phpunit-yaml-free-tests.xml b/phpunit-yaml-free-tests.xml
index 67e80cfd8..05600b653 100644
--- a/phpunit-yaml-free-tests.xml
+++ b/phpunit-yaml-free-tests.xml
@@ -1,5 +1,5 @@
-
+
src
@@ -12,7 +12,7 @@
- tests/Elasticsearch/Tests/Yaml/Free
+ tests/Yaml/Free
diff --git a/phpunit-yaml-platinum-tests.xml b/phpunit-yaml-platinum-tests.xml
index 4c2e5187d..77468439b 100644
--- a/phpunit-yaml-platinum-tests.xml
+++ b/phpunit-yaml-platinum-tests.xml
@@ -1,5 +1,5 @@
-
+
src
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 354208118..e58f45517 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,5 +1,5 @@
-
+
src
diff --git a/ruleset.xml b/ruleset.xml
deleted file mode 100644
index eb1e6ab95..000000000
--- a/ruleset.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/Client.php b/src/Client.php
new file mode 100644
index 000000000..8a254433a
--- /dev/null
+++ b/src/Client.php
@@ -0,0 +1,169 @@
+transport = $transport;
+ $this->logger = $logger;
+
+ $this->defaultTransportSettings($this->transport);
+ }
+
+ public function getTransport(): Transport
+ {
+ return $this->transport;
+ }
+
+ public function getLogger(): LoggerInterface
+ {
+ return $this->logger;
+ }
+
+ /**
+ * Set the default settings for Elasticsearch
+ */
+ protected function defaultTransportSettings(Transport $transport): void
+ {
+ $transport->setUserAgent('elasticsearch-php', self::VERSION);
+ }
+
+ /**
+ * Set the asyncronous HTTP request
+ */
+ public function setAsync(bool $async): self
+ {
+ $this->async = $async;
+ return $this;
+ }
+
+ /**
+ * Get the asyncronous HTTP request setting
+ */
+ public function getAsync(): bool
+ {
+ return $this->async;
+ }
+
+ /**
+ * Enable or disable the x-elastic-client-meta header
+ */
+ public function setElasticMetaHeader(bool $active): self
+ {
+ $this->elasticMetaHeader = $active;
+ return $this;
+ }
+
+ /**
+ * Get the status of x-elastic-client-meta header
+ */
+ public function getElasticMetaHeader(): bool
+ {
+ return $this->elasticMetaHeader;
+ }
+
+ /**
+ * Enable or disable the response Exception
+ */
+ public function setResponseException(bool $active): self
+ {
+ $this->responseException = $active;
+ return $this;
+ }
+
+ /**
+ * Get the status of response Exception
+ */
+ public function getResponseException(): bool
+ {
+ return $this->responseException;
+ }
+
+ /**
+ * Send the HTTP request using the Elastic Transport.
+ * It manages syncronous and asyncronus requests using Client::getAsync()
+ *
+ * @return Elasticsearch|Promise
+ */
+ public function sendRequest(RequestInterface $request)
+ {
+ // If async returns a Promise
+ if ($this->getAsync()) {
+ if ($this->getElasticMetaHeader()) {
+ $this->transport->setElasticMetaHeader(Client::CLIENT_NAME, Client::VERSION, true);
+ }
+ $this->transport->setAsyncOnSuccess(
+ $this->getResponseException() ? new AsyncOnSuccess : new AsyncOnSuccessNoException
+ );
+ return $this->transport->sendAsyncRequest($request);
+ }
+
+ if ($this->getElasticMetaHeader()) {
+ $this->transport->setElasticMetaHeader(Client::CLIENT_NAME, Client::VERSION, false);
+ }
+ $start = microtime(true);
+ $response = $this->transport->sendRequest($request);
+ $this->logger->info(sprintf("Response time in %.3f sec", microtime(true) - $start));
+
+ $result = new Elasticsearch;
+ $result->setResponse($response, $this->getResponseException());
+ return $result;
+ }
+}
\ No newline at end of file
diff --git a/src/ClientBuilder.php b/src/ClientBuilder.php
new file mode 100644
index 000000000..a56cfce28
--- /dev/null
+++ b/src/ClientBuilder.php
@@ -0,0 +1,406 @@
+ "Elastic\\Elasticsearch\\Transport\\Adapter\\Guzzle"
+ ];
+
+ private Transport $transport;
+ private ClientInterface $httpClient;
+ private HttpAsyncClient $asyncHttpClient;
+ private LoggerInterface $logger;
+
+ /**
+ * Hosts (elasticsearch nodes)
+ */
+ private array $hosts;
+
+ /**
+ * Elasticsearch API key
+ */
+ private string $apiKey;
+
+ /**
+ * Basic authentication username
+ */
+ private string $username;
+
+ /**
+ * Basic authentication password
+ */
+ private string $password;
+
+ /**
+ * Elastic cloud Id
+ */
+ private string $cloudId;
+
+ /**
+ * Retries
+ *
+ * The default value is calculated during the client build
+ * and it is equal to the number of hosts
+ */
+ private int $retries;
+
+ /**
+ * SSL certificate
+ * @param array [$cert, $password] $cert is the name of a file containing a PEM formatted certificate,
+ * $password if the certificate requires a password
+ */
+ private array $sslCert;
+
+ /**
+ * SSL key
+ * @param array [$key, $password] $key is the name of a file containing a private SSL key,
+ * $password if the private key requires a password
+ */
+ private array $sslKey;
+
+ /**
+ * SSL verification
+ *
+ * Enable or disable the SSL verfiication (default is true)
+ */
+ private bool $sslVerification = true;
+
+ /**
+ * Elastic meta header
+ *
+ * Enable or disable the x-elastic-client-meta header (default is true)
+ */
+ private bool $elasticMetaHeader = true;
+
+ /**
+ * HTTP client options
+ */
+ private array $httpClientOptions = [];
+
+ /**
+ * Make the constructor final so cannot be overwritten
+ */
+ final public function __construct()
+ {
+ }
+
+ /**
+ * Create an instance of ClientBuilder
+ */
+ public static function create(): ClientBuilder
+ {
+ return new static();
+ }
+
+ /**
+ * Build a new client from the provided config. Hash keys
+ * should correspond to the method name e.g. ['nodePool']
+ * corresponds to setNodePool().
+ *
+ * Missing keys will use the default for that setting if applicable
+ *
+ * Unknown keys will throw an exception by default, but this can be silenced
+ * by setting `quiet` to true
+ *
+ * @param array $config
+ * @param bool $quiet False if unknown settings throw exception, true to silently
+ * ignore unknown settings
+ * @throws ConfigException
+ */
+ public static function fromConfig(array $config, bool $quiet = false): Client
+ {
+ $builder = new static;
+ foreach ($config as $key => $value) {
+ $method = "set$key";
+ $reflection = new ReflectionClass($builder);
+ if ($reflection->hasMethod($method)) {
+ $func = $reflection->getMethod($method);
+ if ($func->getNumberOfParameters() > 1) {
+ $builder->$method(...$value);
+ } else {
+ $builder->$method($value);
+ }
+ unset($config[$key]);
+ }
+ }
+
+ if ($quiet === false && count($config) > 0) {
+ $unknown = implode(array_keys($config));
+ throw new ConfigException("Unknown parameters provided: $unknown");
+ }
+ return $builder->build();
+ }
+
+ public function setHttpClient(ClientInterface $httpClient): ClientBuilder
+ {
+ $this->httpClient = $httpClient;
+ return $this;
+ }
+
+ public function setAsyncHttpClient(HttpAsyncClient $asyncHttpClient): ClientBuilder
+ {
+ $this->asyncHttpClient = $asyncHttpClient;
+ return $this;
+ }
+
+ /**
+ * Set the PSR-3 Logger
+ */
+ public function setLogger(LoggerInterface $logger): ClientBuilder
+ {
+ $this->logger = $logger;
+ return $this;
+ }
+
+ /**
+ * Set the hosts (nodes)
+ */
+ public function setHosts(array $hosts): ClientBuilder
+ {
+ $this->hosts = $hosts;
+ return $this;
+ }
+
+ /**
+ * Set the ApiKey
+ * If the id is not specified we store the ApiKey otherwise
+ * we store as Base64(id:ApiKey)
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
+ */
+ public function setApiKey(string $apiKey, string $id = null): ClientBuilder
+ {
+ if (empty($id)) {
+ $this->apiKey = $apiKey;
+ } else {
+ $this->apiKey = base64_encode($id . ':' . $apiKey);
+ }
+ return $this;
+ }
+
+ /**
+ * Set the Basic Authentication
+ */
+ public function setBasicAuthentication(string $username, string $password): ClientBuilder
+ {
+ $this->username = $username;
+ $this->password = $password;
+ return $this;
+ }
+
+ public function setElasticCloudId(string $cloudId)
+ {
+ $this->cloudId = $cloudId;
+ return $this;
+ }
+
+ /**
+ * Set number or retries
+ *
+ * @param int $retries
+ */
+ public function setRetries(int $retries): ClientBuilder
+ {
+ if ($retries < 0) {
+ throw new InvalidArgumentException('The retries number must be >= 0');
+ }
+ $this->retries = $retries;
+ return $this;
+ }
+
+ /**
+ * Set SSL certificate
+ *
+ * @param string $cert The name of a file containing a PEM formatted certificate.
+ * @param string $password if the certificate requires a password
+ */
+ public function setSSLCert(string $cert, string $password = null): ClientBuilder
+ {
+ $this->sslCert = [$cert, $password];
+ return $this;
+ }
+
+ /**
+ * Set SSL key
+ *
+ * @param string $key The name of a file containing a private SSL key
+ * @param string $password if the private key requires a password
+ */
+ public function setSSLKey(string $key, string $password = null): ClientBuilder
+ {
+ $this->sslKey = [$key, $password];
+ return $this;
+ }
+
+ /**
+ * Enable or disable the SSL verification
+ */
+ public function setSSLVerification(bool $value = true): ClientBuilder
+ {
+ $this->sslVerification = $value;
+ return $this;
+ }
+
+ /**
+ * Enable or disable the x-elastic-client-meta header
+ */
+ public function setElasticMetaHeader(bool $value = true): ClientBuilder
+ {
+ $this->elasticMetaHeader = $value;
+ return $this;
+ }
+
+ public function setHttpClientOptions(array $options): ClientBuilder
+ {
+ $this->httpClientOptions = $options;
+ return $this;
+ }
+
+ /**
+ * Build and returns the Client object
+ */
+ public function build(): Client
+ {
+ // Logger
+ if (empty($this->logger)) {
+ $this->logger = new NullLogger();
+ }
+
+ // Set the default hosts if empty
+ if (empty($this->hosts)) {
+ $this->hosts = [self::DEFAULT_HOST];
+ }
+
+ // Transport
+ $builder = TransportBuilder::create();
+ $builder->setLogger($this->logger);
+ $builder->setHosts($this->hosts);
+
+ if (!empty($this->httpClient)) {
+ $builder->setClient($this->httpClient);
+ } else {
+ // Set HTTP client options
+ if (!empty($this->getConfig()) || !empty($this->httpClientOptions)) {
+ $builder->setClient(
+ $this->setOptions($builder->getClient(), $this->getConfig(), $this->httpClientOptions)
+ );
+ }
+ }
+ if (!empty($this->cloudId)) {
+ $builder->setCloudId($this->cloudId);
+ }
+ if (!empty($this->nodePool)) {
+ $builder->setNodePool($this->nodePool);
+ }
+ $this->transport = $builder->build();
+
+ // The default retries is equal to the number of hosts
+ if (empty($this->retries)) {
+ $this->retries = count($this->hosts);
+ }
+ $this->transport->setRetries($this->retries);
+
+ // Async client
+ if (!empty($this->asyncHttpClient)) {
+ $this->transport->setAsyncClient($this->asyncHttpClient);
+ }
+
+ // Basic authentication
+ if (!empty($this->username) && !empty($this->password)) {
+ $this->transport->setUserInfo($this->username, $this->password);
+ }
+
+ // API key
+ if (!empty($this->apiKey)) {
+ if (!empty($this->username)) {
+ throw new AuthenticationException('You cannot use APIKey and Basic Authenication together');
+ }
+ $this->transport->setHeader('Authorization', sprintf("ApiKey %s", $this->apiKey));
+ }
+
+ // Elastic cloud optimized with gzip
+ if (!empty($this->cloudId)) {
+ $this->transport->setHeader('Accept-Encoding', 'gzip');
+ }
+
+ $client = new Client($this->transport, $this->logger);
+ // Enable or disable the x-elastic-client-meta header
+ $client->setElasticMetaHeader($this->elasticMetaHeader);
+
+ return $client;
+ }
+
+ /**
+ * Returns the configuration to be used in the HTTP client
+ */
+ protected function getConfig(): array
+ {
+ $config = [];
+ if (!empty($this->sslCert)) {
+ $config[RequestOptions::SSL_CERT] = $this->sslCert;
+ }
+ if (!empty($this->sslKey)) {
+ $config[RequestOptions::SSL_KEY] = $this->sslKey;
+ }
+ if (!$this->sslVerification) {
+ $config[RequestOptions::SSL_VERIFY] = false;
+ }
+ return $config;
+ }
+
+ /**
+ * Set the configuration for the specific HTTP client using an adapter
+ */
+ protected function setOptions(ClientInterface $client, array $config, array $clientOptions = []): ClientInterface
+ {
+ if (empty($config) && empty($clientOptions)) {
+ return $client;
+ }
+ $class = get_class($client);
+ if (!isset(self::HTTP_ADAPTERS[$class])) {
+ throw new HttpClientException(sprintf(
+ "The HTTP client %s is not supported for custom options",
+ $class
+ ));
+ }
+ $adapterClass = self::HTTP_ADAPTERS[$class];
+ if (!class_exists($adapterClass) || !in_array(AdapterInterface::class, class_implements($adapterClass))) {
+ throw new HttpClientException(sprintf(
+ "The class %s does not exists or does not implement %s",
+ $adapterClass,
+ AdapterInterface::class
+ ));
+ }
+ $adapter = new $adapterClass;
+ return $adapter->setConfig($client, $config, $clientOptions);
+ }
+}
\ No newline at end of file
diff --git a/src/Elasticsearch/Client.php b/src/Elasticsearch/Client.php
deleted file mode 100644
index afb5cb049..000000000
--- a/src/Elasticsearch/Client.php
+++ /dev/null
@@ -1,1906 +0,0 @@
-transport = $transport;
- $this->endpoints = $endpoint;
- $this->asyncSearch = new AsyncSearchNamespace($transport, $endpoint);
- $this->autoscaling = new AutoscalingNamespace($transport, $endpoint);
- $this->cat = new CatNamespace($transport, $endpoint);
- $this->ccr = new CcrNamespace($transport, $endpoint);
- $this->cluster = new ClusterNamespace($transport, $endpoint);
- $this->danglingIndices = new DanglingIndicesNamespace($transport, $endpoint);
- $this->enrich = new EnrichNamespace($transport, $endpoint);
- $this->eql = new EqlNamespace($transport, $endpoint);
- $this->features = new FeaturesNamespace($transport, $endpoint);
- $this->fleet = new FleetNamespace($transport, $endpoint);
- $this->graph = new GraphNamespace($transport, $endpoint);
- $this->ilm = new IlmNamespace($transport, $endpoint);
- $this->indices = new IndicesNamespace($transport, $endpoint);
- $this->ingest = new IngestNamespace($transport, $endpoint);
- $this->license = new LicenseNamespace($transport, $endpoint);
- $this->logstash = new LogstashNamespace($transport, $endpoint);
- $this->migration = new MigrationNamespace($transport, $endpoint);
- $this->ml = new MlNamespace($transport, $endpoint);
- $this->monitoring = new MonitoringNamespace($transport, $endpoint);
- $this->nodes = new NodesNamespace($transport, $endpoint);
- $this->rollup = new RollupNamespace($transport, $endpoint);
- $this->searchableSnapshots = new SearchableSnapshotsNamespace($transport, $endpoint);
- $this->security = new SecurityNamespace($transport, $endpoint);
- $this->shutdown = new ShutdownNamespace($transport, $endpoint);
- $this->slm = new SlmNamespace($transport, $endpoint);
- $this->snapshot = new SnapshotNamespace($transport, $endpoint);
- $this->sql = new SqlNamespace($transport, $endpoint);
- $this->ssl = new SslNamespace($transport, $endpoint);
- $this->tasks = new TasksNamespace($transport, $endpoint);
- $this->textStructure = new TextStructureNamespace($transport, $endpoint);
- $this->transform = new TransformNamespace($transport, $endpoint);
- $this->watcher = new WatcherNamespace($transport, $endpoint);
- $this->xpack = new XpackNamespace($transport, $endpoint);
-
- $this->registeredNamespaces = $registeredNamespaces;
- }
-
- /**
- * Allows to perform multiple index/update/delete operations in a single request.
- *
- * $params['index'] = (string) Default index for items which don't provide one
- * $params['type'] = DEPRECATED (string) Default document type for items which don't provide one
- * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
- * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['routing'] = (string) Specific routing value
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['_source'] = (list) True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
- * $params['_source_excludes'] = (list) Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
- * $params['_source_includes'] = (list) Default list of fields to extract and return from the _source field, can be overridden on each sub-request
- * $params['pipeline'] = (string) The pipeline id to preprocess incoming documents with
- * $params['require_alias'] = (boolean) Sets require_alias for all incoming documents. Defaults to unset (false)
- * $params['body'] = (array) The operation definition and data (action-data pairs), separated by newlines (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html
- */
- public function bulk(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $type = $this->extractArgument($params, 'type');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Bulk');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setType($type);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Explicitly clears the search context for a scroll.
- *
- * $params['scroll_id'] = DEPRECATED (list) A comma-separated list of scroll IDs to clear
- * $params['body'] = (array) A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html
- */
- public function clearScroll(array $params = [])
- {
- $scroll_id = $this->extractArgument($params, 'scroll_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('ClearScroll');
- $endpoint->setParams($params);
- $endpoint->setScrollId($scroll_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Close a point in time
- *
- * $params['body'] = (array) a point-in-time id to close
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html
- */
- public function closePointInTime(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('ClosePointInTime');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns number of documents matching a query.
- *
- * $params['index'] = (list) A comma-separated list of indices to restrict the results
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['min_score'] = (number) Include only documents with a specific `_score` value in the result
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['routing'] = (list) A comma-separated list of specific routing values
- * $params['q'] = (string) Query in the Lucene query string syntax
- * $params['analyzer'] = (string) The analyzer to use for the query string
- * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
- * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
- * $params['df'] = (string) The field to use as default where no field prefix is given in the query string
- * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * $params['terminate_after'] = (number) The maximum count for each shard, upon reaching which the query execution will terminate early
- * $params['body'] = (array) A query to restrict the results specified with the Query DSL (optional)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
- */
- public function count(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Count');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a new document in the index.Returns a 409 response when a document with a same ID already exists in the index.
- *
- * $params['id'] = (string) Document ID (Required)
- * $params['index'] = (string) The name of the index (Required)
- * $params['type'] = DEPRECATED (string) The type of the document
- * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
- * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['routing'] = (string) Specific routing value
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
- * $params['pipeline'] = (string) The pipeline id to preprocess incoming documents with
- * $params['body'] = (array) The document (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
- */
- public function create(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $index = $this->extractArgument($params, 'index');
- $type = $this->extractArgument($params, 'type');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Create');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setIndex($index);
- $endpoint->setType($type);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Removes a document from the index.
- *
- * $params['id'] = (string) The document ID (Required)
- * $params['index'] = (string) The name of the index (Required)
- * $params['type'] = DEPRECATED (string) The type of the document
- * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
- * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['routing'] = (string) Specific routing value
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['if_seq_no'] = (number) only perform the delete operation if the last operation that has changed the document has the specified sequence number
- * $params['if_primary_term'] = (number) only perform the delete operation if the last operation that has changed the document has the specified primary term
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
- */
- public function delete(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $index = $this->extractArgument($params, 'index');
- $type = $this->extractArgument($params, 'type');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Delete');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setIndex($index);
- $endpoint->setType($type);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes documents matching the provided query.
- *
- * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
- * $params['analyzer'] = (string) The analyzer to use for the query string
- * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
- * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
- * $params['df'] = (string) The field to use as default where no field prefix is given in the query string
- * $params['from'] = (number) Starting offset (default: 0)
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['conflicts'] = (enum) What to do when the delete by query hits version conflicts? (Options = abort,proceed) (Default = abort)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['q'] = (string) Query in the Lucene query string syntax
- * $params['routing'] = (list) A comma-separated list of specific routing values
- * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
- * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
- * $params['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout.
- * $params['max_docs'] = (number) Maximum number of documents to process (default: all documents)
- * $params['sort'] = (list) A comma-separated list of : pairs
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
- * $params['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes
- * $params['version'] = (boolean) Specify whether to return document version as part of a hit
- * $params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to index level setting
- * $params['refresh'] = (boolean) Should the affected indexes be refreshed?
- * $params['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable. (Default = 1m)
- * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
- * $params['scroll_size'] = (number) Size on the scroll request powering the delete by query (Default = 100)
- * $params['wait_for_completion'] = (boolean) Should the request should block until the delete by query is complete. (Default = true)
- * $params['requests_per_second'] = (number) The throttle for this request in sub-requests per second. -1 means no throttle. (Default = 0)
- * $params['slices'] = (number|string) The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`. (Default = 1)
- * $params['body'] = (array) The search definition using the Query DSL (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
- */
- public function deleteByQuery(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('DeleteByQuery');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Changes the number of requests per second for a particular Delete By Query operation.
- *
- * $params['task_id'] = (string) The task id to rethrottle
- * $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
- */
- public function deleteByQueryRethrottle(array $params = [])
- {
- $task_id = $this->extractArgument($params, 'task_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('DeleteByQueryRethrottle');
- $endpoint->setParams($params);
- $endpoint->setTaskId($task_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes a script.
- *
- * $params['id'] = (string) Script ID
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
- */
- public function deleteScript(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('DeleteScript');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about whether a document exists in an index.
- *
- * $params['id'] = (string) The document ID
- * $params['index'] = (string) The name of the index
- * $params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
- * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
- * $params['routing'] = (string) Specific routing value
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
- *
- * @param array $params Associative array of parameters
- * @return bool
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
- */
- public function exists(array $params = []): bool
- {
- $id = $this->extractArgument($params, 'id');
- $index = $this->extractArgument($params, 'index');
-
- // manually make this verbose so we can check status code
- $params['client']['verbose'] = true;
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Exists');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setIndex($index);
-
- return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
- }
- /**
- * Returns information about whether a document source exists in an index.
- *
- * $params['id'] = (string) The document ID (Required)
- * $params['index'] = (string) The name of the index (Required)
- * $params['type'] = DEPRECATED (string) The type of the document; deprecated and optional starting with 7.0
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
- * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
- * $params['routing'] = (string) Specific routing value
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
- *
- * @param array $params Associative array of parameters
- * @return bool
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
- */
- public function existsSource(array $params = []): bool
- {
- $id = $this->extractArgument($params, 'id');
- $index = $this->extractArgument($params, 'index');
- $type = $this->extractArgument($params, 'type');
-
- // manually make this verbose so we can check status code
- $params['client']['verbose'] = true;
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('ExistsSource');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setIndex($index);
- $endpoint->setType($type);
-
- return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
- }
- /**
- * Returns information about why a specific matches (or doesn't match) a query.
- *
- * $params['id'] = (string) The document ID
- * $params['index'] = (string) The name of the index
- * $params['analyze_wildcard'] = (boolean) Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
- * $params['analyzer'] = (string) The analyzer for the query string query
- * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
- * $params['df'] = (string) The default field for query string query (default: _all)
- * $params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response
- * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['q'] = (string) Query in the Lucene query string syntax
- * $params['routing'] = (string) Specific routing value
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['body'] = (array) The query definition using the Query DSL
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html
- */
- public function explain(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Explain');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the information about the capabilities of fields among multiple indices.
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['fields'] = (list) A comma-separated list of field names
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['include_unmapped'] = (boolean) Indicates whether unmapped fields should be included in the response. (Default = false)
- * $params['body'] = (array) An index filter specified with the Query DSL
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html
- */
- public function fieldCaps(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('FieldCaps');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns a document.
- *
- * $params['id'] = (string) The document ID
- * $params['index'] = (string) The name of the index
- * $params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
- * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
- * $params['routing'] = (string) Specific routing value
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
- */
- public function get(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Get');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns a script.
- *
- * $params['id'] = (string) Script ID
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
- */
- public function getScript(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('GetScript');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns all script contexts.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html
- */
- public function getScriptContext(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('GetScriptContext');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns available script types, languages and contexts
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
- */
- public function getScriptLanguages(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('GetScriptLanguages');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the source of a document.
- *
- * $params['id'] = (string) The document ID
- * $params['index'] = (string) The name of the index
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
- * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
- * $params['routing'] = (string) Specific routing value
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
- */
- public function getSource(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('GetSource');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates or updates a document in an index.
- *
- * $params['id'] = (string) Document ID
- * $params['index'] = (string) The name of the index (Required)
- * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
- * $params['op_type'] = (enum) Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID (Options = index,create)
- * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['routing'] = (string) Specific routing value
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
- * $params['if_seq_no'] = (number) only perform the index operation if the last operation that has changed the document has the specified sequence number
- * $params['if_primary_term'] = (number) only perform the index operation if the last operation that has changed the document has the specified primary term
- * $params['pipeline'] = (string) The pipeline id to preprocess incoming documents with
- * $params['require_alias'] = (boolean) When true, requires destination to be an alias. Default is false
- * $params['body'] = (array) The document (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
- */
- public function index(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Index');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns basic information about the cluster.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
- */
- public function info(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Info');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Performs a kNN search.
- *
- * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
- * $params['routing'] = (list) A comma-separated list of specific routing values
- * $params['body'] = (array) The search definition
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function knnSearch(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('KnnSearch');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to get multiple documents in one request.
- *
- * $params['index'] = (string) The name of the index
- * $params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
- * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
- * $params['routing'] = (string) Specific routing value
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['body'] = (array) Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html
- */
- public function mget(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Mget');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to execute several search operations in one request.
- *
- * $params['index'] = (list) A comma-separated list of index names to use as default
- * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
- * $params['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute
- * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- * $params['pre_filter_shard_size'] = (number) A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
- * $params['max_concurrent_shard_requests'] = (number) The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests (Default = 5)
- * $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
- * $params['ccs_minimize_roundtrips'] = (boolean) Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution (Default = true)
- * $params['body'] = (array) The request definitions (metadata-search request definition pairs), separated by newlines (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html
- */
- public function msearch(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Msearch');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to execute several search template operations in one request.
- *
- * $params['index'] = (list) A comma-separated list of index names to use as default
- * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
- * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- * $params['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute
- * $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
- * $params['ccs_minimize_roundtrips'] = (boolean) Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution (Default = true)
- * $params['body'] = (array) The request definitions (metadata-search request definition pairs), separated by newlines (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
- */
- public function msearchTemplate(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('MsearchTemplate');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns multiple termvectors in one request.
- *
- * $params['index'] = (string) The index in which the document resides.
- * $params['ids'] = (list) A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
- * $params['term_statistics'] = (boolean) Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = false)
- * $params['field_statistics'] = (boolean) Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = true)
- * $params['fields'] = (list) A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * $params['offsets'] = (boolean) Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = true)
- * $params['positions'] = (boolean) Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = true)
- * $params['payloads'] = (boolean) Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = true)
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * $params['routing'] = (string) Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * $params['realtime'] = (boolean) Specifies if requests are real-time as opposed to near-real-time (default: true).
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
- * $params['body'] = (array) Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html
- */
- public function mtermvectors(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('MTermVectors');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Open a point in time that can be used in subsequent searches
- *
- * $params['index'] = (list) A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['routing'] = (string) Specific routing value
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['keep_alive'] = (string) Specific the time to live for the point in time
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html
- */
- public function openPointInTime(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('OpenPointInTime');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns whether the cluster is running.
- *
- *
- * @param array $params Associative array of parameters
- * @return bool
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
- */
- public function ping(array $params = []): bool
- {
-
- // manually make this verbose so we can check status code
- $params['client']['verbose'] = true;
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ping');
- $endpoint->setParams($params);
-
- return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
- }
- /**
- * Creates or updates a script.
- *
- * $params['id'] = (string) Script ID (Required)
- * $params['context'] = (string) Script context
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['body'] = (array) The document (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
- */
- public function putScript(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $context = $this->extractArgument($params, 'context');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('PutScript');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setContext($context);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to evaluate the quality of ranked search results over a set of typical search queries
- *
- * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
- * $params['body'] = (array) The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html
- */
- public function rankEval(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('RankEval');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to copy documents from one index to another, optionally filtering the sourcedocuments by a query, changing the destination index settings, or fetching thedocuments from a remote cluster.
- *
- * $params['refresh'] = (boolean) Should the affected indexes be refreshed?
- * $params['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable. (Default = 1m)
- * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
- * $params['wait_for_completion'] = (boolean) Should the request should block until the reindex is complete. (Default = true)
- * $params['requests_per_second'] = (number) The throttle to set on this request in sub-requests per second. -1 means no throttle. (Default = 0)
- * $params['scroll'] = (time) Control how long to keep the search context alive (Default = 5m)
- * $params['slices'] = (number|string) The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`. (Default = 1)
- * $params['max_docs'] = (number) Maximum number of documents to process (default: all documents)
- * $params['body'] = (array) The search definition using the Query DSL and the prototype for the index request. (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
- */
- public function reindex(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Reindex');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Changes the number of requests per second for a particular Reindex operation.
- *
- * $params['task_id'] = (string) The task id to rethrottle
- * $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
- */
- public function reindexRethrottle(array $params = [])
- {
- $task_id = $this->extractArgument($params, 'task_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('ReindexRethrottle');
- $endpoint->setParams($params);
- $endpoint->setTaskId($task_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to use the Mustache language to pre-render a search definition.
- *
- * $params['id'] = (string) The id of the stored search template
- * $params['body'] = (array) The search definition template and its params
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html
- */
- public function renderSearchTemplate(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('RenderSearchTemplate');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows an arbitrary script to be executed and a result to be returned
- *
- * $params['body'] = (array) The script to execute
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function scriptsPainlessExecute(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('ScriptsPainlessExecute');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to retrieve a large numbers of results from a single search request.
- *
- * $params['scroll_id'] = DEPRECATED (string) The scroll ID
- * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
- * $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
- * $params['body'] = (array) The scroll ID if not passed by URL or query parameter.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll
- */
- public function scroll(array $params = [])
- {
- $scroll_id = $this->extractArgument($params, 'scroll_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Scroll');
- $endpoint->setParams($params);
- $endpoint->setScrollId($scroll_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns results matching a query.
- *
- * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
- * $params['analyzer'] = (string) The analyzer to use for the query string
- * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
- * $params['ccs_minimize_roundtrips'] = (boolean) Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution (Default = true)
- * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
- * $params['df'] = (string) The field to use as default where no field prefix is given in the query string
- * $params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit
- * $params['stored_fields'] = (list) A comma-separated list of stored fields to return as part of a hit
- * $params['docvalue_fields'] = (list) A comma-separated list of fields to return as the docvalue representation of a field for each hit
- * $params['from'] = (number) Starting offset (default: 0)
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['q'] = (string) Query in the Lucene query string syntax
- * $params['routing'] = (list) A comma-separated list of specific routing values
- * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
- * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
- * $params['size'] = (number) Number of hits to return (default: 10)
- * $params['sort'] = (list) A comma-separated list of : pairs
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
- * $params['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes
- * $params['suggest_field'] = (string) Specify which field to use for suggestions
- * $params['suggest_mode'] = (enum) Specify suggest mode (Options = missing,popular,always) (Default = missing)
- * $params['suggest_size'] = (number) How many suggestions to return in response
- * $params['suggest_text'] = (string) The source text for which the suggestions should be returned
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['track_scores'] = (boolean) Whether to calculate and return scores even if they are not used for sorting
- * $params['track_total_hits'] = (boolean|long) Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
- * $params['allow_partial_search_results'] = (boolean) Indicate if an error should be returned if there is a partial search failure or timeout (Default = true)
- * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- * $params['version'] = (boolean) Specify whether to return document version as part of a hit
- * $params['seq_no_primary_term'] = (boolean) Specify whether to return sequence number and primary term of the last modification of each hit
- * $params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to index level setting
- * $params['batched_reduce_size'] = (number) The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. (Default = 512)
- * $params['max_concurrent_shard_requests'] = (number) The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests (Default = 5)
- * $params['pre_filter_shard_size'] = (number) A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
- * $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
- * $params['min_compatible_shard_node'] = (string) The minimum compatible version that all shards involved in search should have for this request to be successful
- * $params['body'] = (array) The search definition using the Query DSL
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
- */
- public function search(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Search');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.
- *
- * $params['index'] = (list) Comma-separated list of data streams, indices, or aliases to search
- * $params['field'] = (string) Field containing geospatial data to return
- * $params['zoom'] = (int) Zoom level for the vector tile to search
- * $params['x'] = (int) X coordinate for the vector tile to search
- * $params['y'] = (int) Y coordinate for the vector tile to search
- * $params['exact_bounds'] = (boolean) If false, the meta layer's feature is the bounding box of the tile. If true, the meta layer's feature is a bounding box resulting from a `geo_bounds` aggregation. (Default = false)
- * $params['extent'] = (int) Size, in pixels, of a side of the vector tile. (Default = 4096)
- * $params['grid_precision'] = (int) Additional zoom levels available through the aggs layer. Accepts 0-8. (Default = 8)
- * $params['grid_type'] = (enum) Determines the geometry type for features in the aggs layer. (Options = grid,point,centroid) (Default = grid)
- * $params['size'] = (int) Maximum number of features to return in the hits layer. Accepts 0-10000. (Default = 10000)
- * $params['track_total_hits'] = (boolean|long) Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
- * $params['body'] = (array) Search request body.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function searchMvt(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $field = $this->extractArgument($params, 'field');
- $zoom = $this->extractArgument($params, 'zoom');
- $x = $this->extractArgument($params, 'x');
- $y = $this->extractArgument($params, 'y');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('SearchMvt');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setField($field);
- $endpoint->setZoom($zoom);
- $endpoint->setX($x);
- $endpoint->setY($y);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about the indices and shards that a search request would be executed against.
- *
- * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['routing'] = (string) Specific routing value
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html
- */
- public function searchShards(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('SearchShards');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to use the Mustache language to pre-render a search definition.
- *
- * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['routing'] = (list) A comma-separated list of specific routing values
- * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
- * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
- * $params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit
- * $params['profile'] = (boolean) Specify whether to profile the query execution
- * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- * $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
- * $params['ccs_minimize_roundtrips'] = (boolean) Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution (Default = true)
- * $params['body'] = (array) The search definition template and its params (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
- */
- public function searchTemplate(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('SearchTemplate');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.
- *
- * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
- * $params['body'] = (array) field name, string which is the prefix expected in matching terms, timeout and size for max number of results
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html
- */
- public function termsEnum(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('TermsEnum');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information and statistics about terms in the fields of a particular document.
- *
- * $params['index'] = (string) The index in which the document resides. (Required)
- * $params['id'] = (string) The id of the document, when not specified a doc param should be supplied.
- * $params['term_statistics'] = (boolean) Specifies if total term frequency and document frequency should be returned. (Default = false)
- * $params['field_statistics'] = (boolean) Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. (Default = true)
- * $params['fields'] = (list) A comma-separated list of fields to return.
- * $params['offsets'] = (boolean) Specifies if term offsets should be returned. (Default = true)
- * $params['positions'] = (boolean) Specifies if term positions should be returned. (Default = true)
- * $params['payloads'] = (boolean) Specifies if term payloads should be returned. (Default = true)
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random).
- * $params['routing'] = (string) Specific routing value.
- * $params['realtime'] = (boolean) Specifies if request is real-time as opposed to near-real-time (default: true).
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
- * $params['body'] = (array) Define parameters and or supply a document to get termvectors for. See documentation.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html
- */
- public function termvectors(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('TermVectors');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates a document with a script or partial document.
- *
- * $params['id'] = (string) Document ID (Required)
- * $params['index'] = (string) The name of the index (Required)
- * $params['type'] = DEPRECATED (string) The type of the document
- * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['lang'] = (string) The script language (default: painless)
- * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['retry_on_conflict'] = (number) Specify how many times should the operation be retried when a conflict occurs (default: 0)
- * $params['routing'] = (string) Specific routing value
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['if_seq_no'] = (number) only perform the update operation if the last operation that has changed the document has the specified sequence number
- * $params['if_primary_term'] = (number) only perform the update operation if the last operation that has changed the document has the specified primary term
- * $params['require_alias'] = (boolean) When true, requires destination is an alias. Default is false
- * $params['body'] = (array) The request definition requires either `script` or partial `doc` (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
- */
- public function update(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $index = $this->extractArgument($params, 'index');
- $type = $this->extractArgument($params, 'type');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Update');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setIndex($index);
- $endpoint->setType($type);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Performs an update on every document in the index without changing the source,for example to pick up a mapping change.
- *
- * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
- * $params['analyzer'] = (string) The analyzer to use for the query string
- * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
- * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
- * $params['df'] = (string) The field to use as default where no field prefix is given in the query string
- * $params['from'] = (number) Starting offset (default: 0)
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['conflicts'] = (enum) What to do when the update by query hits version conflicts? (Options = abort,proceed) (Default = abort)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * $params['pipeline'] = (string) Ingest pipeline to set on index requests made by this action. (default: none)
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['q'] = (string) Query in the Lucene query string syntax
- * $params['routing'] = (list) A comma-separated list of specific routing values
- * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
- * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
- * $params['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout.
- * $params['max_docs'] = (number) Maximum number of documents to process (default: all documents)
- * $params['sort'] = (list) A comma-separated list of : pairs
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
- * $params['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes
- * $params['version'] = (boolean) Specify whether to return document version as part of a hit
- * $params['version_type'] = (boolean) Should the document increment the version number (internal) on hit or not (reindex)
- * $params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to index level setting
- * $params['refresh'] = (boolean) Should the affected indexes be refreshed?
- * $params['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable. (Default = 1m)
- * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
- * $params['scroll_size'] = (number) Size on the scroll request powering the update by query (Default = 100)
- * $params['wait_for_completion'] = (boolean) Should the request should block until the update by query operation is complete. (Default = true)
- * $params['requests_per_second'] = (number) The throttle to set on this request in sub-requests per second. -1 means no throttle. (Default = 0)
- * $params['slices'] = (number|string) The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`. (Default = 1)
- * $params['body'] = (array) The search definition using the Query DSL
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
- */
- public function updateByQuery(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('UpdateByQuery');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Changes the number of requests per second for a particular Update By Query operation.
- *
- * $params['task_id'] = (string) The task id to rethrottle
- * $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
- */
- public function updateByQueryRethrottle(array $params = [])
- {
- $task_id = $this->extractArgument($params, 'task_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('UpdateByQueryRethrottle');
- $endpoint->setParams($params);
- $endpoint->setTaskId($task_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the asyncSearch namespace
- */
- public function asyncSearch(): AsyncSearchNamespace
- {
- return $this->asyncSearch;
- }
- /**
- * Returns the autoscaling namespace
- */
- public function autoscaling(): AutoscalingNamespace
- {
- return $this->autoscaling;
- }
- /**
- * Returns the cat namespace
- */
- public function cat(): CatNamespace
- {
- return $this->cat;
- }
- /**
- * Returns the ccr namespace
- */
- public function ccr(): CcrNamespace
- {
- return $this->ccr;
- }
- /**
- * Returns the cluster namespace
- */
- public function cluster(): ClusterNamespace
- {
- return $this->cluster;
- }
- /**
- * Returns the danglingIndices namespace
- */
- public function danglingIndices(): DanglingIndicesNamespace
- {
- return $this->danglingIndices;
- }
- /**
- * Returns the enrich namespace
- */
- public function enrich(): EnrichNamespace
- {
- return $this->enrich;
- }
- /**
- * Returns the eql namespace
- */
- public function eql(): EqlNamespace
- {
- return $this->eql;
- }
- /**
- * Returns the features namespace
- */
- public function features(): FeaturesNamespace
- {
- return $this->features;
- }
- /**
- * Returns the fleet namespace
- */
- public function fleet(): FleetNamespace
- {
- return $this->fleet;
- }
- /**
- * Returns the graph namespace
- */
- public function graph(): GraphNamespace
- {
- return $this->graph;
- }
- /**
- * Returns the ilm namespace
- */
- public function ilm(): IlmNamespace
- {
- return $this->ilm;
- }
- /**
- * Returns the indices namespace
- */
- public function indices(): IndicesNamespace
- {
- return $this->indices;
- }
- /**
- * Returns the ingest namespace
- */
- public function ingest(): IngestNamespace
- {
- return $this->ingest;
- }
- /**
- * Returns the license namespace
- */
- public function license(): LicenseNamespace
- {
- return $this->license;
- }
- /**
- * Returns the logstash namespace
- */
- public function logstash(): LogstashNamespace
- {
- return $this->logstash;
- }
- /**
- * Returns the migration namespace
- */
- public function migration(): MigrationNamespace
- {
- return $this->migration;
- }
- /**
- * Returns the ml namespace
- */
- public function ml(): MlNamespace
- {
- return $this->ml;
- }
- /**
- * Returns the monitoring namespace
- */
- public function monitoring(): MonitoringNamespace
- {
- return $this->monitoring;
- }
- /**
- * Returns the nodes namespace
- */
- public function nodes(): NodesNamespace
- {
- return $this->nodes;
- }
- /**
- * Returns the rollup namespace
- */
- public function rollup(): RollupNamespace
- {
- return $this->rollup;
- }
- /**
- * Returns the searchableSnapshots namespace
- */
- public function searchableSnapshots(): SearchableSnapshotsNamespace
- {
- return $this->searchableSnapshots;
- }
- /**
- * Returns the security namespace
- */
- public function security(): SecurityNamespace
- {
- return $this->security;
- }
- /**
- * Returns the shutdown namespace
- */
- public function shutdown(): ShutdownNamespace
- {
- return $this->shutdown;
- }
- /**
- * Returns the slm namespace
- */
- public function slm(): SlmNamespace
- {
- return $this->slm;
- }
- /**
- * Returns the snapshot namespace
- */
- public function snapshot(): SnapshotNamespace
- {
- return $this->snapshot;
- }
- /**
- * Returns the sql namespace
- */
- public function sql(): SqlNamespace
- {
- return $this->sql;
- }
- /**
- * Returns the ssl namespace
- */
- public function ssl(): SslNamespace
- {
- return $this->ssl;
- }
- /**
- * Returns the tasks namespace
- */
- public function tasks(): TasksNamespace
- {
- return $this->tasks;
- }
- /**
- * Returns the textStructure namespace
- */
- public function textStructure(): TextStructureNamespace
- {
- return $this->textStructure;
- }
- /**
- * Returns the transform namespace
- */
- public function transform(): TransformNamespace
- {
- return $this->transform;
- }
- /**
- * Returns the watcher namespace
- */
- public function watcher(): WatcherNamespace
- {
- return $this->watcher;
- }
- /**
- * Returns the xpack namespace
- */
- public function xpack(): XpackNamespace
- {
- return $this->xpack;
- }
-
- /**
- * Catchall for registered namespaces
- *
- * @return object
- * @throws BadMethodCallException if the namespace cannot be found
- */
- public function __call(string $name, array $arguments)
- {
- if (isset($this->registeredNamespaces[$name])) {
- return $this->registeredNamespaces[$name];
- }
- throw new BadMethodCallException("Namespace [$name] not found");
- }
-
- /**
- * Extract an argument from the array of parameters
- *
- * @return null|mixed
- */
- public function extractArgument(array &$params, string $arg)
- {
- if (array_key_exists($arg, $params) === true) {
- $value = $params[$arg];
- $value = (is_object($value) && !is_iterable($value)) ?
- (array) $value :
- $value;
- unset($params[$arg]);
- return $value;
- } else {
- return null;
- }
- }
-
- /**
- * @return callable|array
- */
- private function performRequest(AbstractEndpoint $endpoint)
- {
- $promise = $this->transport->performRequest(
- $endpoint->getMethod(),
- $endpoint->getURI(),
- $endpoint->getParams(),
- $endpoint->getBody(),
- $endpoint->getOptions()
- );
-
- return $this->transport->resultOrFuture($promise, $endpoint->getOptions());
- }
-}
diff --git a/src/Elasticsearch/ClientBuilder.php b/src/Elasticsearch/ClientBuilder.php
deleted file mode 100644
index 0be2affee..000000000
--- a/src/Elasticsearch/ClientBuilder.php
+++ /dev/null
@@ -1,849 +0,0 @@
- true
- ];
-
- /**
- * @var array
- */
- private $hosts;
-
- /**
- * @var array
- */
- private $connectionParams;
-
- /**
- * @var int
- */
- private $retries;
-
- /**
- * @var bool
- */
- private $sniffOnStart = false;
-
- /**
- * @var null|array
- */
- private $sslCert = null;
-
- /**
- * @var null|array
- */
- private $sslKey = null;
-
- /**
- * @var null|bool|string
- */
- private $sslVerification = null;
-
- /**
- * @var bool
- */
- private $elasticMetaHeader = true;
-
- /**
- * @var bool
- */
- private $includePortInHostHeader = false;
-
- /**
- * Create an instance of ClientBuilder
- */
- public static function create(): ClientBuilder
- {
- return new static();
- }
-
- /**
- * Can supply first parm to Client::__construct() when invoking manually or with dependency injection
- */
- public function getTransport(): Transport
- {
- return $this->transport;
- }
-
- /**
- * Can supply second parm to Client::__construct() when invoking manually or with dependency injection
- */
- public function getEndpoint(): callable
- {
- return $this->endpoint;
- }
-
- /**
- * Can supply third parm to Client::__construct() when invoking manually or with dependency injection
- *
- * @return NamespaceBuilderInterface[]
- */
- public function getRegisteredNamespacesBuilders(): array
- {
- return $this->registeredNamespacesBuilders;
- }
-
- /**
- * Build a new client from the provided config. Hash keys
- * should correspond to the method name e.g. ['connectionPool']
- * corresponds to setConnectionPool().
- *
- * Missing keys will use the default for that setting if applicable
- *
- * Unknown keys will throw an exception by default, but this can be silenced
- * by setting `quiet` to true
- *
- * @param array $config
- * @param bool $quiet False if unknown settings throw exception, true to silently
- * ignore unknown settings
- * @throws Common\Exceptions\RuntimeException
- */
- public static function fromConfig(array $config, bool $quiet = false): Client
- {
- $builder = new static;
- foreach ($config as $key => $value) {
- $method = "set$key";
- $reflection = new ReflectionClass($builder);
- if ($reflection->hasMethod($method)) {
- $func = $reflection->getMethod($method);
- if ($func->getNumberOfParameters() > 1) {
- $builder->$method(...$value);
- } else {
- $builder->$method($value);
- }
- unset($config[$key]);
- }
- }
-
- if ($quiet === false && count($config) > 0) {
- $unknown = implode(array_keys($config));
- throw new RuntimeException("Unknown parameters provided: $unknown");
- }
- return $builder->build();
- }
-
- /**
- * Get the default handler
- *
- * @param array $multiParams
- * @param array $singleParams
- * @throws \RuntimeException
- */
- public static function defaultHandler(array $multiParams = [], array $singleParams = []): callable
- {
- $future = null;
- if (extension_loaded('curl')) {
- $config = array_merge([ 'mh' => curl_multi_init() ], $multiParams);
- if (function_exists('curl_reset')) {
- $default = new CurlHandler($singleParams);
- $future = new CurlMultiHandler($config);
- } else {
- $default = new CurlMultiHandler($config);
- }
- } else {
- throw new \RuntimeException('Elasticsearch-PHP requires cURL, or a custom HTTP handler.');
- }
-
- return $future ? Middleware::wrapFuture($default, $future) : $default;
- }
-
- /**
- * Get the multi handler for async (CurlMultiHandler)
- *
- * @throws \RuntimeException
- */
- public static function multiHandler(array $params = []): CurlMultiHandler
- {
- if (function_exists('curl_multi_init')) {
- return new CurlMultiHandler(array_merge([ 'mh' => curl_multi_init() ], $params));
- } else {
- throw new \RuntimeException('CurlMulti handler requires cURL.');
- }
- }
-
- /**
- * Get the handler instance (CurlHandler)
- *
- * @throws \RuntimeException
- */
- public static function singleHandler(): CurlHandler
- {
- if (function_exists('curl_reset')) {
- return new CurlHandler();
- } else {
- throw new \RuntimeException('CurlSingle handler requires cURL.');
- }
- }
-
- /**
- * Set connection Factory
- *
- * @param ConnectionFactoryInterface $connectionFactory
- */
- public function setConnectionFactory(ConnectionFactoryInterface $connectionFactory): ClientBuilder
- {
- $this->connectionFactory = $connectionFactory;
-
- return $this;
- }
-
- /**
- * Set the connection pool (default is StaticNoPingConnectionPool)
- *
- * @param AbstractConnectionPool|string $connectionPool
- * @param array $args
- * @throws \InvalidArgumentException
- */
- public function setConnectionPool($connectionPool, array $args = []): ClientBuilder
- {
- if (is_string($connectionPool)) {
- $this->connectionPool = $connectionPool;
- $this->connectionPoolArgs = $args;
- } elseif (is_object($connectionPool)) {
- $this->connectionPool = $connectionPool;
- } else {
- throw new InvalidArgumentException("Serializer must be a class path or instantiated object extending AbstractConnectionPool");
- }
-
- return $this;
- }
-
- /**
- * Set the endpoint
- *
- * @param callable $endpoint
- */
- public function setEndpoint(callable $endpoint): ClientBuilder
- {
- $this->endpoint = $endpoint;
-
- return $this;
- }
-
- /**
- * Register namespace
- *
- * @param NamespaceBuilderInterface $namespaceBuilder
- */
- public function registerNamespace(NamespaceBuilderInterface $namespaceBuilder): ClientBuilder
- {
- $this->registeredNamespacesBuilders[] = $namespaceBuilder;
-
- return $this;
- }
-
- /**
- * Set the transport
- *
- * @param Transport $transport
- */
- public function setTransport(Transport $transport): ClientBuilder
- {
- $this->transport = $transport;
-
- return $this;
- }
-
- /**
- * Set the HTTP handler (cURL is default)
- *
- * @param mixed $handler
- */
- public function setHandler($handler): ClientBuilder
- {
- $this->handler = $handler;
-
- return $this;
- }
-
- /**
- * Set the PSR-3 Logger
- *
- * @param LoggerInterface $logger
- */
- public function setLogger(LoggerInterface $logger): ClientBuilder
- {
- $this->logger = $logger;
-
- return $this;
- }
-
- /**
- * Set the PSR-3 tracer
- *
- * @param LoggerInterface $tracer
- */
- public function setTracer(LoggerInterface $tracer): ClientBuilder
- {
- $this->tracer = $tracer;
-
- return $this;
- }
-
- /**
- * Set the serializer
- *
- * @param \Elasticsearch\Serializers\SerializerInterface|string $serializer
- */
- public function setSerializer($serializer): ClientBuilder
- {
- $this->parseStringOrObject($serializer, $this->serializer, 'SerializerInterface');
-
- return $this;
- }
-
- /**
- * Set the hosts (nodes)
- *
- * @param array $hosts
- */
- public function setHosts(array $hosts): ClientBuilder
- {
- $this->hosts = $hosts;
-
- return $this;
- }
-
- /**
- * Set the APIKey Pair, consiting of the API Id and the ApiKey of the Response from /_security/api_key
- *
- * @throws AuthenticationConfigException
- */
- public function setApiKey(string $id, string $apiKey): ClientBuilder
- {
- if (isset($this->connectionParams['client']['curl'][CURLOPT_HTTPAUTH]) === true) {
- throw new AuthenticationConfigException("You can't use APIKey - and Basic Authenication together.");
- }
-
- $this->connectionParams['client']['headers']['Authorization'] = [
- 'ApiKey ' . base64_encode($id . ':' . $apiKey)
- ];
-
- return $this;
- }
-
- /**
- * Set Basic access authentication
- *
- * @see https://en.wikipedia.org/wiki/Basic_access_authentication
- * @param string $username
- * @param string $password
- *
- * @throws AuthenticationConfigException
- */
- public function setBasicAuthentication(string $username, string $password): ClientBuilder
- {
- if (isset($this->connectionParams['client']['headers']['Authorization']) === true) {
- throw new AuthenticationConfigException("You can't use APIKey - and Basic Authenication together.");
- }
-
- if (isset($this->connectionParams['client']['curl']) === false) {
- $this->connectionParams['client']['curl'] = [];
- }
-
- $this->connectionParams['client']['curl'] += [
- CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
- CURLOPT_USERPWD => $username.':'.$password
- ];
-
- return $this;
- }
-
- /**
- * Set Elastic Cloud ID to connect to Elastic Cloud
- *
- * @param string $cloudId
- */
- public function setElasticCloudId(string $cloudId): ClientBuilder
- {
- // Register the Hosts array
- $this->setHosts(
- [
- [
- 'host' => $this->parseElasticCloudId($cloudId),
- 'port' => '',
- 'scheme' => 'https',
- ]
- ]
- );
-
- if (!isset($this->connectionParams['client']['curl'][CURLOPT_ENCODING])) {
- // Merge best practices for the connection (enable gzip)
- $this->connectionParams['client']['curl'][CURLOPT_ENCODING] = 'gzip';
- }
-
- return $this;
- }
-
- /**
- * Set connection parameters
- *
- * @param array $params
- */
- public function setConnectionParams(array $params): ClientBuilder
- {
- $this->connectionParams = $params;
-
- return $this;
- }
-
- /**
- * Set number or retries (default is equal to number of nodes)
- *
- * @param int $retries
- */
- public function setRetries(int $retries): ClientBuilder
- {
- $this->retries = $retries;
-
- return $this;
- }
-
- /**
- * Set the selector algorithm
- *
- * @param \Elasticsearch\ConnectionPool\Selectors\SelectorInterface|string $selector
- */
- public function setSelector($selector): ClientBuilder
- {
- $this->parseStringOrObject($selector, $this->selector, 'SelectorInterface');
-
- return $this;
- }
-
- /**
- * Set sniff on start
- *
- * @param bool $sniffOnStart enable or disable sniff on start
- */
-
- public function setSniffOnStart(bool $sniffOnStart): ClientBuilder
- {
- $this->sniffOnStart = $sniffOnStart;
-
- return $this;
- }
-
- /**
- * Set SSL certificate
- *
- * @param string $cert The name of a file containing a PEM formatted certificate.
- * @param string $password if the certificate requires a password
- */
- public function setSSLCert(string $cert, string $password = null): ClientBuilder
- {
- $this->sslCert = [$cert, $password];
-
- return $this;
- }
-
- /**
- * Set SSL key
- *
- * @param string $key The name of a file containing a private SSL key
- * @param string $password if the private key requires a password
- */
- public function setSSLKey(string $key, string $password = null): ClientBuilder
- {
- $this->sslKey = [$key, $password];
-
- return $this;
- }
-
- /**
- * Set SSL verification
- *
- * @param bool|string $value
- */
- public function setSSLVerification($value = true): ClientBuilder
- {
- $this->sslVerification = $value;
-
- return $this;
- }
-
- /**
- * Set or disable the x-elastic-client-meta header
- */
- public function setElasticMetaHeader($value = true): ClientBuilder
- {
- $this->elasticMetaHeader = $value;
-
- return $this;
- }
-
- /**
- * Include the port in Host header
- *
- * @see https://github.com/elastic/elasticsearch-php/issues/993
- */
- public function includePortInHostHeader(bool $enable): ClientBuilder
- {
- $this->includePortInHostHeader = $enable;
-
- return $this;
- }
-
- /**
- * Build and returns the Client object
- */
- public function build(): Client
- {
- $this->buildLoggers();
-
- if (is_null($this->handler)) {
- $this->handler = ClientBuilder::defaultHandler();
- }
-
- $sslOptions = null;
- if (isset($this->sslKey)) {
- $sslOptions['ssl_key'] = $this->sslKey;
- }
- if (isset($this->sslCert)) {
- $sslOptions['cert'] = $this->sslCert;
- }
- if (isset($this->sslVerification)) {
- $sslOptions['verify'] = $this->sslVerification;
- }
-
- if (!is_null($sslOptions)) {
- $sslHandler = function (callable $handler, array $sslOptions) {
- return function (array $request) use ($handler, $sslOptions) {
- // Add our custom headers
- foreach ($sslOptions as $key => $value) {
- $request['client'][$key] = $value;
- }
-
- // Send the request using the handler and return the response.
- return $handler($request);
- };
- };
- $this->handler = $sslHandler($this->handler, $sslOptions);
- }
-
- if (is_null($this->serializer)) {
- $this->serializer = new SmartSerializer();
- } elseif (is_string($this->serializer)) {
- $this->serializer = new $this->serializer;
- }
-
- $this->connectionParams['client']['x-elastic-client-meta']= $this->elasticMetaHeader;
- $this->connectionParams['client']['port_in_header'] = $this->includePortInHostHeader;
-
- if (is_null($this->connectionFactory)) {
- if (is_null($this->connectionParams)) {
- $this->connectionParams = [];
- }
-
- // Make sure we are setting Content-Type and Accept (unless the user has explicitly
- // overridden it
- if (! isset($this->connectionParams['client']['headers'])) {
- $this->connectionParams['client']['headers'] = [];
- }
- $apiVersioning = getenv('ELASTIC_CLIENT_APIVERSIONING');
- if (! isset($this->connectionParams['client']['headers']['Content-Type'])) {
- if ($apiVersioning === 'true' || $apiVersioning === '1') {
- $this->connectionParams['client']['headers']['Content-Type'] = ['application/vnd.elasticsearch+json;compatible-with=7'];
- } else {
- $this->connectionParams['client']['headers']['Content-Type'] = ['application/json'];
- }
- }
- if (! isset($this->connectionParams['client']['headers']['Accept'])) {
- if ($apiVersioning === 'true' || $apiVersioning === '1') {
- $this->connectionParams['client']['headers']['Accept'] = ['application/vnd.elasticsearch+json;compatible-with=7'];
- } else {
- $this->connectionParams['client']['headers']['Accept'] = ['application/json'];
- }
- }
-
- $this->connectionFactory = new ConnectionFactory($this->handler, $this->connectionParams, $this->serializer, $this->logger, $this->tracer);
- }
-
- if (is_null($this->hosts)) {
- $this->hosts = $this->getDefaultHost();
- }
-
- if (is_null($this->selector)) {
- $this->selector = new RoundRobinSelector();
- } elseif (is_string($this->selector)) {
- $this->selector = new $this->selector;
- }
-
- $this->buildTransport();
-
- if (is_null($this->endpoint)) {
- $serializer = $this->serializer;
-
- $this->endpoint = function ($class) use ($serializer) {
- $fullPath = '\\Elasticsearch\\Endpoints\\' . $class;
-
- $reflection = new ReflectionClass($fullPath);
- $constructor = $reflection->getConstructor();
-
- if ($constructor && $constructor->getParameters()) {
- return new $fullPath($serializer);
- } else {
- return new $fullPath();
- }
- };
- }
-
- $registeredNamespaces = [];
- foreach ($this->registeredNamespacesBuilders as $builder) {
- /**
- * @var NamespaceBuilderInterface $builder
-*/
- $registeredNamespaces[$builder->getName()] = $builder->getObject($this->transport, $this->serializer);
- }
-
- return $this->instantiate($this->transport, $this->endpoint, $registeredNamespaces);
- }
-
- protected function instantiate(Transport $transport, callable $endpoint, array $registeredNamespaces): Client
- {
- return new Client($transport, $endpoint, $registeredNamespaces);
- }
-
- private function buildLoggers(): void
- {
- if (is_null($this->logger)) {
- $this->logger = new NullLogger();
- }
-
- if (is_null($this->tracer)) {
- $this->tracer = new NullLogger();
- }
- }
-
- private function buildTransport(): void
- {
- $connections = $this->buildConnectionsFromHosts($this->hosts);
-
- if (is_string($this->connectionPool)) {
- $this->connectionPool = new $this->connectionPool(
- $connections,
- $this->selector,
- $this->connectionFactory,
- $this->connectionPoolArgs
- );
- } elseif (is_null($this->connectionPool)) {
- $this->connectionPool = new StaticNoPingConnectionPool(
- $connections,
- $this->selector,
- $this->connectionFactory,
- $this->connectionPoolArgs
- );
- }
-
- if (is_null($this->retries)) {
- $this->retries = count($connections);
- }
-
- if (is_null($this->transport)) {
- $this->transport = new Transport($this->retries, $this->connectionPool, $this->logger, $this->sniffOnStart);
- }
- }
-
- private function parseStringOrObject($arg, &$destination, $interface): void
- {
- if (is_string($arg)) {
- $destination = new $arg;
- } elseif (is_object($arg)) {
- $destination = $arg;
- } else {
- throw new InvalidArgumentException("Serializer must be a class path or instantiated object implementing $interface");
- }
- }
-
- private function getDefaultHost(): array
- {
- return ['localhost:9200'];
- }
-
- /**
- * @return \Elasticsearch\Connections\Connection[]
- * @throws RuntimeException
- */
- private function buildConnectionsFromHosts(array $hosts): array
- {
- $connections = [];
- foreach ($hosts as $host) {
- if (is_string($host)) {
- $host = $this->prependMissingScheme($host);
- $host = $this->extractURIParts($host);
- } elseif (is_array($host)) {
- $host = $this->normalizeExtendedHost($host);
- } else {
- $this->logger->error("Could not parse host: ".print_r($host, true));
- throw new RuntimeException("Could not parse host: ".print_r($host, true));
- }
-
- $connections[] = $this->connectionFactory->create($host);
- }
-
- return $connections;
- }
-
- /**
- * @throws RuntimeException
- */
- private function normalizeExtendedHost(array $host): array
- {
- if (isset($host['host']) === false) {
- $this->logger->error("Required 'host' was not defined in extended format: ".print_r($host, true));
- throw new RuntimeException("Required 'host' was not defined in extended format: ".print_r($host, true));
- }
-
- if (isset($host['scheme']) === false) {
- $host['scheme'] = 'http';
- }
- if (isset($host['port']) === false) {
- $host['port'] = 9200;
- }
- return $host;
- }
-
- /**
- * @throws InvalidArgumentException
- */
- private function extractURIParts(string $host): array
- {
- $parts = parse_url($host);
-
- if ($parts === false) {
- throw new InvalidArgumentException(sprintf('Could not parse URI: "%s"', $host));
- }
-
- if (isset($parts['port']) !== true) {
- $parts['port'] = 9200;
- }
-
- return $parts;
- }
-
- private function prependMissingScheme(string $host): string
- {
- if (!preg_match("/^https?:\/\//", $host)) {
- $host = 'http://' . $host;
- }
-
- return $host;
- }
-
- /**
- * Parse the Elastic Cloud Params from the CloudId
- *
- * @param string $cloudId
- *
- * @return string
- *
- * @throws ElasticCloudIdParseException
- */
- private function parseElasticCloudId(string $cloudId): string
- {
- try {
- list($name, $encoded) = explode(':', $cloudId);
- list($uri, $uuids) = explode('$', base64_decode($encoded));
- list($es,) = explode(':', $uuids);
-
- return $es . '.' . $uri;
- } catch (\Throwable $t) {
- throw new ElasticCloudIdParseException('could not parse the Cloud ID:' . $cloudId);
- }
- }
-}
diff --git a/src/Elasticsearch/Common/EmptyLogger.php b/src/Elasticsearch/Common/EmptyLogger.php
deleted file mode 100644
index 938a4e51b..000000000
--- a/src/Elasticsearch/Common/EmptyLogger.php
+++ /dev/null
@@ -1,39 +0,0 @@
- 'The maximum stack depth has been exceeded',
- JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON',
- JSON_ERROR_CTRL_CHAR => 'Control character error, possibly incorrectly encoded',
- JSON_ERROR_SYNTAX => 'Syntax error',
- JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded',
- JSON_ERROR_RECURSION => 'One or more recursive references in the value to be encoded',
- JSON_ERROR_INF_OR_NAN => 'One or more NAN or INF values in the value to be encoded',
- JSON_ERROR_UNSUPPORTED_TYPE => 'A value of a type that cannot be encoded was given',
-
- // JSON_ERROR_* constant values that are available on PHP >= 7.0
- 9 => 'Decoding of value would result in invalid PHP property name', //JSON_ERROR_INVALID_PROPERTY_NAME
- 10 => 'Attempted to decode nonexistent UTF-16 code-point' //JSON_ERROR_UTF16
- );
-
- public function __construct($code, $input, $result, $previous = null)
- {
- if (isset(self::$messages[$code]) !== true) {
- throw new \InvalidArgumentException(sprintf('Encountered unknown JSON error code: [%d]', $code));
- }
-
- parent::__construct(self::$messages[$code], $code, $previous);
- $this->input = $input;
- $this->result = $result;
- }
-
- /**
- * @return mixed
- */
- public function getInput()
- {
- return $this->input;
- }
-
- /**
- * @return mixed
- */
- public function getResult()
- {
- return $this->result;
- }
-}
diff --git a/src/Elasticsearch/Common/Exceptions/ServerErrorResponseException.php b/src/Elasticsearch/Common/Exceptions/ServerErrorResponseException.php
deleted file mode 100644
index a7923ded4..000000000
--- a/src/Elasticsearch/Common/Exceptions/ServerErrorResponseException.php
+++ /dev/null
@@ -1,23 +0,0 @@
-connections = $connections;
- $this->seedConnections = $connections;
- $this->selector = $selector;
- $this->connectionPoolParams = $connectionPoolParams;
- $this->connectionFactory = $factory;
- }
-
- abstract public function nextConnection(bool $force = false): ConnectionInterface;
-
- abstract public function scheduleCheck(): void;
-}
diff --git a/src/Elasticsearch/ConnectionPool/ConnectionPoolInterface.php b/src/Elasticsearch/ConnectionPool/ConnectionPoolInterface.php
deleted file mode 100644
index 6556986cc..000000000
--- a/src/Elasticsearch/ConnectionPool/ConnectionPoolInterface.php
+++ /dev/null
@@ -1,28 +0,0 @@
-current % count($connections)];
-
- $this->current += 1;
-
- return $returnConnection;
- }
-}
diff --git a/src/Elasticsearch/ConnectionPool/Selectors/SelectorInterface.php b/src/Elasticsearch/ConnectionPool/Selectors/SelectorInterface.php
deleted file mode 100644
index a4e5cb2a5..000000000
--- a/src/Elasticsearch/ConnectionPool/Selectors/SelectorInterface.php
+++ /dev/null
@@ -1,31 +0,0 @@
-current]->isAlive()) {
- return $connections[$this->current];
- }
-
- $this->currentCounter += 1;
- $this->current = $this->currentCounter % count($connections);
-
- return $connections[$this->current];
- }
-}
diff --git a/src/Elasticsearch/ConnectionPool/SimpleConnectionPool.php b/src/Elasticsearch/ConnectionPool/SimpleConnectionPool.php
deleted file mode 100644
index a290decfb..000000000
--- a/src/Elasticsearch/ConnectionPool/SimpleConnectionPool.php
+++ /dev/null
@@ -1,45 +0,0 @@
-selector->select($this->connections);
- }
-
- public function scheduleCheck(): void
- {
- }
-}
diff --git a/src/Elasticsearch/ConnectionPool/SniffingConnectionPool.php b/src/Elasticsearch/ConnectionPool/SniffingConnectionPool.php
deleted file mode 100644
index 82eeea257..000000000
--- a/src/Elasticsearch/ConnectionPool/SniffingConnectionPool.php
+++ /dev/null
@@ -1,167 +0,0 @@
-setConnectionPoolParams($connectionPoolParams);
- $this->nextSniff = time() + $this->sniffingInterval;
- }
-
- public function nextConnection(bool $force = false): ConnectionInterface
- {
- $this->sniff($force);
-
- $size = count($this->connections);
- while ($size--) {
- /**
- * @var Connection $connection
-*/
- $connection = $this->selector->select($this->connections);
- if ($connection->isAlive() === true || $connection->ping() === true) {
- return $connection;
- }
- }
-
- if ($force === true) {
- throw new NoNodesAvailableException("No alive nodes found in your cluster");
- }
-
- return $this->nextConnection(true);
- }
-
- public function scheduleCheck(): void
- {
- $this->nextSniff = -1;
- }
-
- private function sniff(bool $force = false)
- {
- if ($force === false && $this->nextSniff >= time()) {
- return;
- }
-
- $total = count($this->connections);
-
- while ($total--) {
- /**
- * @var Connection $connection
-*/
- $connection = $this->selector->select($this->connections);
-
- if ($connection->isAlive() xor $force) {
- continue;
- }
-
- if ($this->sniffConnection($connection) === true) {
- return;
- }
- }
-
- if ($force === true) {
- return;
- }
-
- foreach ($this->seedConnections as $connection) {
- if ($this->sniffConnection($connection) === true) {
- return;
- }
- }
- }
-
- private function sniffConnection(Connection $connection): bool
- {
- try {
- $response = $connection->sniff();
- } catch (OperationTimeoutException $exception) {
- return false;
- }
-
- $nodes = $this->parseClusterState($connection->getTransportSchema(), $response);
-
- if (count($nodes) === 0) {
- return false;
- }
-
- $this->connections = array();
-
- foreach ($nodes as $node) {
- $nodeDetails = array(
- 'host' => $node['host'],
- 'port' => $node['port']
- );
- $this->connections[] = $this->connectionFactory->create($nodeDetails);
- }
-
- $this->nextSniff = time() + $this->sniffingInterval;
-
- return true;
- }
-
- private function parseClusterState(string $transportSchema, $nodeInfo): array
- {
- $pattern = '/([^:]*):([0-9]+)/';
- $schemaAddress = $transportSchema . '_address';
- $hosts = [];
-
- foreach ($nodeInfo['nodes'] as $node) {
- if (isset($node['http']) === true && isset($node['http']['publish_address']) === true) {
- if (preg_match($pattern, $node['http']['publish_address'], $match) === 1) {
- $hosts[] = array(
- 'host' => $match[1],
- 'port' => (int) $match[2],
- );
- }
- }
- }
-
- return $hosts;
- }
-
- private function setConnectionPoolParams(array $connectionPoolParams)
- {
- if (isset($connectionPoolParams['sniffingInterval']) === true) {
- $this->sniffingInterval = $connectionPoolParams['sniffingInterval'];
- }
- }
-}
diff --git a/src/Elasticsearch/ConnectionPool/StaticConnectionPool.php b/src/Elasticsearch/ConnectionPool/StaticConnectionPool.php
deleted file mode 100644
index b7b06a6f4..000000000
--- a/src/Elasticsearch/ConnectionPool/StaticConnectionPool.php
+++ /dev/null
@@ -1,101 +0,0 @@
-scheduleCheck();
- }
-
- public function nextConnection(bool $force = false): ConnectionInterface
- {
- $skipped = [];
-
- $total = count($this->connections);
- while ($total--) {
- /**
- * @var Connection $connection
-*/
- $connection = $this->selector->select($this->connections);
- if ($connection->isAlive() === true) {
- return $connection;
- }
-
- if ($this->readyToRevive($connection) === true) {
- if ($connection->ping() === true) {
- return $connection;
- }
- } else {
- $skipped[] = $connection;
- }
- }
-
- // All "alive" nodes failed, force pings on "dead" nodes
- foreach ($skipped as $connection) {
- if ($connection->ping() === true) {
- return $connection;
- }
- }
-
- throw new NoNodesAvailableException("No alive nodes found in your cluster");
- }
-
- public function scheduleCheck(): void
- {
- foreach ($this->connections as $connection) {
- $connection->markDead();
- }
- }
-
- private function readyToRevive(Connection $connection): bool
- {
- $timeout = min(
- $this->pingTimeout * pow(2, $connection->getPingFailures()),
- $this->maxPingTimeout
- );
-
- if ($connection->getLastPing() + $timeout < time()) {
- return true;
- } else {
- return false;
- }
- }
-}
diff --git a/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php b/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php
deleted file mode 100644
index f4cdf0cc2..000000000
--- a/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php
+++ /dev/null
@@ -1,84 +0,0 @@
-connections);
- while ($total--) {
- /**
- * @var Connection $connection
-*/
- $connection = $this->selector->select($this->connections);
- if ($connection->isAlive() === true) {
- return $connection;
- }
-
- if ($this->readyToRevive($connection) === true) {
- return $connection;
- }
- }
-
- throw new NoNodesAvailableException("No alive nodes found in your cluster");
- }
-
- public function scheduleCheck(): void
- {
- }
-
- private function readyToRevive(Connection $connection): bool
- {
- $timeout = min(
- $this->pingTimeout * pow(2, $connection->getPingFailures()),
- $this->maxPingTimeout
- );
-
- if ($connection->getLastPing() + $timeout < time()) {
- return true;
- } else {
- return false;
- }
- }
-}
diff --git a/src/Elasticsearch/Connections/Connection.php b/src/Elasticsearch/Connections/Connection.php
deleted file mode 100644
index 1542c9b6c..000000000
--- a/src/Elasticsearch/Connections/Connection.php
+++ /dev/null
@@ -1,810 +0,0 @@
-transportSchema = $hostDetails['scheme'];
- }
-
- // Only Set the Basic if API Key is not set and setBasicAuthentication was not called prior
- if (isset($connectionParams['client']['headers']['Authorization']) === false
- && isset($connectionParams['client']['curl'][CURLOPT_HTTPAUTH]) === false
- && isset($hostDetails['user'])
- && isset($hostDetails['pass'])
- ) {
- $connectionParams['client']['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_BASIC;
- $connectionParams['client']['curl'][CURLOPT_USERPWD] = $hostDetails['user'].':'.$hostDetails['pass'];
- }
-
- $connectionParams['client']['curl'][CURLOPT_PORT] = $hostDetails['port'];
-
- if (isset($connectionParams['client']['headers'])) {
- $this->headers = $connectionParams['client']['headers'];
- unset($connectionParams['client']['headers']);
- }
-
- // Add the User-Agent using the format: / (metadata-values)
- $this->headers['User-Agent'] = [sprintf(
- "elasticsearch-php/%s (%s %s; PHP %s)",
- Client::VERSION,
- PHP_OS,
- $this->getOSVersion(),
- phpversion()
- )];
-
- // Add x-elastic-client-meta header, if enabled
- if (isset($connectionParams['client']['x-elastic-client-meta']) && $connectionParams['client']['x-elastic-client-meta']) {
- $this->headers['x-elastic-client-meta'] = [$this->getElasticMetaHeader($connectionParams)];
- }
-
- $host = $hostDetails['host'];
- $path = null;
- if (isset($hostDetails['path']) === true) {
- $path = $hostDetails['path'];
- }
- $port = $hostDetails['port'];
-
- $this->host = $host;
- $this->path = $path;
- $this->port = $port;
- $this->log = $log;
- $this->trace = $trace;
- $this->connectionParams = $connectionParams;
- $this->serializer = $serializer;
-
- $this->handler = $this->wrapHandler($handler);
- }
-
- /**
- * @param string $method
- * @param string $uri
- * @param null|array $params
- * @param null $body
- * @param array $options
- * @param Transport $transport
- * @return mixed
- */
- public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], Transport $transport = null)
- {
- if ($body !== null) {
- $body = $this->serializer->serialize($body);
- }
-
- $headers = $this->headers;
- if (isset($options['client']['headers']) && is_array($options['client']['headers'])) {
- $headers = array_merge($this->headers, $options['client']['headers']);
- }
-
- $host = $this->host;
- if (isset($this->connectionParams['client']['port_in_header']) && $this->connectionParams['client']['port_in_header']) {
- $host .= ':' . $this->port;
- }
-
- $request = [
- 'http_method' => $method,
- 'scheme' => $this->transportSchema,
- 'uri' => $this->getURI($uri, $params),
- 'body' => $body,
- 'headers' => array_merge(
- [
- 'Host' => [$host]
- ],
- $headers
- )
- ];
-
- $request = array_replace_recursive($request, $this->connectionParams, $options);
-
- // RingPHP does not like if client is empty
- if (empty($request['client'])) {
- unset($request['client']);
- }
-
- $handler = $this->handler;
- $future = $handler($request, $this, $transport, $options);
-
- return $future;
- }
-
- public function getTransportSchema(): string
- {
- return $this->transportSchema;
- }
-
- public function getLastRequestInfo(): array
- {
- return $this->lastRequest;
- }
-
- private function wrapHandler(callable $handler): callable
- {
- return function (array $request, Connection $connection, Transport $transport = null, $options) use ($handler) {
-
- $this->lastRequest = [];
- $this->lastRequest['request'] = $request;
-
- // Send the request using the wrapped handler.
- $response = Core::proxy(
- $handler($request),
- function ($response) use ($connection, $transport, $request, $options) {
-
- $this->lastRequest['response'] = $response;
-
- if (isset($response['error']) === true) {
- if ($response['error'] instanceof ConnectException || $response['error'] instanceof RingException) {
- $this->log->warning("Curl exception encountered.");
-
- $exception = $this->getCurlRetryException($request, $response);
-
- $this->logRequestFail($request, $response, $exception);
-
- $node = $connection->getHost();
- $this->log->warning("Marking node $node dead.");
- $connection->markDead();
-
- // If the transport has not been set, we are inside a Ping or Sniff,
- // so we don't want to retrigger retries anyway.
- //
- // TODO this could be handled better, but we are limited because connectionpools do not
- // have access to Transport. Architecturally, all of this needs to be refactored
- if (isset($transport) === true) {
- $transport->connectionPool->scheduleCheck();
-
- $neverRetry = isset($request['client']['never_retry']) ? $request['client']['never_retry'] : false;
- $shouldRetry = $transport->shouldRetry($request);
- $shouldRetryText = ($shouldRetry) ? 'true' : 'false';
-
- $this->log->warning("Retries left? $shouldRetryText");
- if ($shouldRetry && !$neverRetry) {
- return $transport->performRequest(
- $request['http_method'],
- $request['uri'],
- [],
- $request['body'],
- $options
- );
- }
- }
-
- $this->log->warning("Out of retries, throwing exception from $node");
- // Only throw if we run out of retries
- throw $exception;
- } else {
- // Something went seriously wrong, bail
- $exception = new TransportException($response['error']->getMessage());
- $this->logRequestFail($request, $response, $exception);
- throw $exception;
- }
- } else {
- $connection->markAlive();
-
- if (isset($response['headers']['Warning'])) {
- $this->logWarning($request, $response);
- }
- if (isset($response['body']) === true) {
- $response['body'] = stream_get_contents($response['body']);
- $this->lastRequest['response']['body'] = $response['body'];
- }
-
- if ($response['status'] >= 400 && $response['status'] < 500) {
- $ignore = $request['client']['ignore'] ?? [];
- // Skip 404 if succeeded true in the body (e.g. clear_scroll)
- $body = $response['body'] ?? '';
- if (strpos($body, '"succeeded":true') !== false) {
- $ignore[] = 404;
- }
- $this->process4xxError($request, $response, $ignore);
- } elseif ($response['status'] >= 500) {
- $ignore = $request['client']['ignore'] ?? [];
- $this->process5xxError($request, $response, $ignore);
- }
-
- // No error, deserialize
- $response['body'] = $this->serializer->deserialize($response['body'], $response['transfer_stats']);
- }
- $this->logRequestSuccess($request, $response);
-
- return isset($request['client']['verbose']) && $request['client']['verbose'] === true ? $response : $response['body'];
- }
- );
-
- return $response;
- };
- }
-
- private function getURI(string $uri, ?array $params): string
- {
- if (isset($params) === true && !empty($params)) {
- $params = array_map(
- function ($value) {
- if ($value === true) {
- return 'true';
- } elseif ($value === false) {
- return 'false';
- }
-
- return $value;
- },
- $params
- );
-
- $uri .= '?' . http_build_query($params);
- }
-
- if ($this->path !== null) {
- $uri = $this->path . $uri;
- }
-
- return $uri ?? '';
- }
-
- public function getHeaders(): array
- {
- return $this->headers;
- }
-
- public function logWarning(array $request, array $response): void
- {
- $this->log->warning('Deprecation', $response['headers']['Warning']);
- }
-
- /**
- * Log a successful request
- *
- * @param array $request
- * @param array $response
- * @return void
- */
- public function logRequestSuccess(array $request, array $response): void
- {
- $port = $request['client']['curl'][CURLOPT_PORT] ?? $response['transfer_stats']['primary_port'] ?? '';
- $uri = $this->addPortInUrl($response['effective_url'], (int) $port);
-
- $this->log->debug('Request Body', array($request['body']));
- $this->log->info(
- 'Request Success:',
- array(
- 'method' => $request['http_method'],
- 'uri' => $uri,
- 'port' => $port,
- 'headers' => $request['headers'],
- 'HTTP code' => $response['status'],
- 'duration' => $response['transfer_stats']['total_time'],
- )
- );
- $this->log->debug('Response', array($response['body']));
-
- // Build the curl command for Trace.
- $curlCommand = $this->buildCurlCommand($request['http_method'], $uri, $request['body']);
- $this->trace->info($curlCommand);
- $this->trace->debug(
- 'Response:',
- array(
- 'response' => $response['body'],
- 'method' => $request['http_method'],
- 'uri' => $uri,
- 'port' => $port,
- 'HTTP code' => $response['status'],
- 'duration' => $response['transfer_stats']['total_time'],
- )
- );
- }
-
- /**
- * Log a failed request
- *
- * @param array $request
- * @param array $response
- * @param \Exception $exception
- *
- * @return void
- */
- public function logRequestFail(array $request, array $response, \Exception $exception): void
- {
- $port = $request['client']['curl'][CURLOPT_PORT] ?? $response['transfer_stats']['primary_port'] ?? '';
- $uri = $this->addPortInUrl($response['effective_url'], (int) $port);
-
- $this->log->debug('Request Body', array($request['body']));
- $this->log->warning(
- 'Request Failure:',
- array(
- 'method' => $request['http_method'],
- 'uri' => $uri,
- 'port' => $port,
- 'headers' => $request['headers'],
- 'HTTP code' => $response['status'],
- 'duration' => $response['transfer_stats']['total_time'],
- 'error' => $exception->getMessage(),
- )
- );
- $this->log->warning('Response', array($response['body']));
-
- // Build the curl command for Trace.
- $curlCommand = $this->buildCurlCommand($request['http_method'], $uri, $request['body']);
- $this->trace->info($curlCommand);
- $this->trace->debug(
- 'Response:',
- array(
- 'response' => $response,
- 'method' => $request['http_method'],
- 'uri' => $uri,
- 'port' => $port,
- 'HTTP code' => $response['status'],
- 'duration' => $response['transfer_stats']['total_time'],
- )
- );
- }
-
- public function ping(): bool
- {
- $options = [
- 'client' => [
- 'timeout' => $this->pingTimeout,
- 'never_retry' => true,
- 'verbose' => true
- ]
- ];
- try {
- $response = $this->performRequest('HEAD', '/', null, null, $options);
- $response = $response->wait();
- } catch (TransportException $exception) {
- $this->markDead();
-
- return false;
- }
-
- if ($response['status'] === 200) {
- $this->markAlive();
-
- return true;
- } else {
- $this->markDead();
-
- return false;
- }
- }
-
- /**
- * @return array|\GuzzleHttp\Ring\Future\FutureArray
- */
- public function sniff()
- {
- $options = [
- 'client' => [
- 'timeout' => $this->pingTimeout,
- 'never_retry' => true
- ]
- ];
-
- return $this->performRequest('GET', '/_nodes/', null, null, $options);
- }
-
- public function isAlive(): bool
- {
- return $this->isAlive;
- }
-
- public function markAlive(): void
- {
- $this->failedPings = 0;
- $this->isAlive = true;
- $this->lastPing = time();
- }
-
- public function markDead(): void
- {
- $this->isAlive = false;
- $this->failedPings += 1;
- $this->lastPing = time();
- }
-
- public function getLastPing(): int
- {
- return $this->lastPing;
- }
-
- public function getPingFailures(): int
- {
- return $this->failedPings;
- }
-
- public function getHost(): string
- {
- return $this->host;
- }
-
- public function getUserPass(): ?string
- {
- return $this->connectionParams['client']['curl'][CURLOPT_USERPWD] ?? null;
- }
-
- public function getPath(): ?string
- {
- return $this->path;
- }
-
- /**
- * @return int
- */
- public function getPort()
- {
- return $this->port;
- }
-
- protected function getCurlRetryException(array $request, array $response): ElasticsearchException
- {
- $exception = null;
- $message = $response['error']->getMessage();
- $exception = new MaxRetriesException($message);
- switch ($response['curl']['errno']) {
- case 6:
- $exception = new CouldNotResolveHostException($message, 0, $exception);
- break;
- case 7:
- $exception = new CouldNotConnectToHost($message, 0, $exception);
- break;
- case 28:
- $exception = new OperationTimeoutException($message, 0, $exception);
- break;
- }
-
- return $exception;
- }
-
- /**
- * Get the x-elastic-client-meta header
- *
- * The header format is specified by the following regex:
- * ^[a-z]{1,}=[a-z0-9\.\-]{1,}(?:,[a-z]{1,}=[a-z0-9\.\-]+)*$
- */
- private function getElasticMetaHeader(array $connectionParams): string
- {
- $phpSemVersion = sprintf("%d.%d.%d", PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION);
- // Reduce the size in case of '-snapshot' version
- $clientVersion = str_replace('-snapshot', '-s', strtolower(Client::VERSION));
- $clientMeta = sprintf(
- "es=%s,php=%s,t=%s,a=%d",
- $clientVersion,
- $phpSemVersion,
- $clientVersion,
- isset($connectionParams['client']['future']) && $connectionParams['client']['future'] === 'lazy' ? 1 : 0
- );
- if (function_exists('curl_version')) {
- $curlVersion = curl_version();
- if (isset($curlVersion['version'])) {
- $clientMeta .= sprintf(",cu=%s", $curlVersion['version']); // cu = curl library
- }
- }
- return $clientMeta;
- }
-
- /**
- * Get the OS version using php_uname if available
- * otherwise it returns an empty string
- *
- * @see https://github.com/elastic/elasticsearch-php/issues/922
- */
- private function getOSVersion(): string
- {
- if ($this->OSVersion === null) {
- $this->OSVersion = strpos(strtolower(ini_get('disable_functions')), 'php_uname') !== false
- ? ''
- : php_uname("r");
- }
- return $this->OSVersion;
- }
-
- /**
- * Add the port value in the URL if not present
- */
- private function addPortInUrl(string $uri, int $port): string
- {
- if (strpos($uri, ':', 7) !== false) {
- return $uri;
- }
- return preg_replace('#([^/])/([^/])#', sprintf("$1:%s/$2", $port), $uri, 1);
- }
-
- /**
- * Construct a string cURL command
- */
- private function buildCurlCommand(string $method, string $url, ?string $body): string
- {
- if (strpos($url, '?') === false) {
- $url .= '?pretty=true';
- } else {
- str_replace('?', '?pretty=true', $url);
- }
-
- $curlCommand = 'curl -X' . strtoupper($method);
- $curlCommand .= " '" . $url . "'";
-
- if (isset($body) === true && $body !== '') {
- $curlCommand .= " -d '" . $body . "'";
- }
-
- return $curlCommand;
- }
-
- private function process4xxError(array $request, array $response, array $ignore): ?ElasticsearchException
- {
- $statusCode = $response['status'];
-
- /**
- * @var \Exception $exception
-*/
- $exception = $this->tryDeserialize400Error($response);
-
- if (array_search($response['status'], $ignore) !== false) {
- return null;
- }
-
- $responseBody = $this->convertBodyToString($response['body'], $statusCode, $exception);
- if ($statusCode === 401) {
- $exception = new Unauthorized401Exception($responseBody, $statusCode);
- } elseif ($statusCode === 403) {
- $exception = new Forbidden403Exception($responseBody, $statusCode);
- } elseif ($statusCode === 404) {
- $exception = new Missing404Exception($responseBody, $statusCode);
- } elseif ($statusCode === 409) {
- $exception = new Conflict409Exception($responseBody, $statusCode);
- } elseif ($statusCode === 400 && strpos($responseBody, 'script_lang not supported') !== false) {
- $exception = new ScriptLangNotSupportedException($responseBody. $statusCode);
- } elseif ($statusCode === 408) {
- $exception = new RequestTimeout408Exception($responseBody, $statusCode);
- } else {
- $exception = new BadRequest400Exception($responseBody, $statusCode);
- }
-
- $this->logRequestFail($request, $response, $exception);
-
- throw $exception;
- }
-
- private function process5xxError(array $request, array $response, array $ignore): ?ElasticsearchException
- {
- $statusCode = (int) $response['status'];
- $responseBody = $response['body'];
-
- /**
- * @var \Exception $exception
-*/
- $exception = $this->tryDeserialize500Error($response);
-
- $exceptionText = "[$statusCode Server Exception] ".$exception->getMessage();
- $this->log->error($exceptionText);
- $this->log->error($exception->getTraceAsString());
-
- if (array_search($statusCode, $ignore) !== false) {
- return null;
- }
-
- if ($statusCode === 500 && strpos($responseBody, "RoutingMissingException") !== false) {
- $exception = new RoutingMissingException($exception->getMessage(), $statusCode, $exception);
- } elseif ($statusCode === 500 && preg_match('/ActionRequestValidationException.+ no documents to get/', $responseBody) === 1) {
- $exception = new NoDocumentsToGetException($exception->getMessage(), $statusCode, $exception);
- } elseif ($statusCode === 500 && strpos($responseBody, 'NoShardAvailableActionException') !== false) {
- $exception = new NoShardAvailableException($exception->getMessage(), $statusCode, $exception);
- } else {
- $exception = new ServerErrorResponseException(
- $this->convertBodyToString($responseBody, $statusCode, $exception),
- $statusCode
- );
- }
-
- $this->logRequestFail($request, $response, $exception);
-
- throw $exception;
- }
-
- private function convertBodyToString($body, int $statusCode, Exception $exception) : string
- {
- if (empty($body)) {
- return sprintf(
- "Unknown %d error from Elasticsearch %s",
- $statusCode,
- $exception->getMessage()
- );
- }
- // if body is not string, we convert it so it can be used as Exception message
- if (!is_string($body)) {
- return json_encode($body);
- }
- return $body;
- }
-
- private function tryDeserialize400Error(array $response): ElasticsearchException
- {
- return $this->tryDeserializeError($response, BadRequest400Exception::class);
- }
-
- private function tryDeserialize500Error(array $response): ElasticsearchException
- {
- return $this->tryDeserializeError($response, ServerErrorResponseException::class);
- }
-
- private function tryDeserializeError(array $response, string $errorClass): ElasticsearchException
- {
- $error = $this->serializer->deserialize($response['body'], $response['transfer_stats']);
- if (is_array($error) === true) {
- if (isset($error['error']) === false) {
- // <2.0 "i just blew up" nonstructured exception
- // $error is an array but we don't know the format, reuse the response body instead
- // added json_encode to convert into a string
- return new $errorClass(json_encode($response['body']), (int) $response['status']);
- }
-
- // 2.0 structured exceptions
- if (is_array($error['error']) && array_key_exists('reason', $error['error']) === true) {
- // Try to use root cause first (only grabs the first root cause)
- $root = $error['error']['root_cause'];
- if (isset($root) && isset($root[0])) {
- $cause = $root[0]['reason'];
- $type = $root[0]['type'];
- } else {
- $cause = $error['error']['reason'];
- $type = $error['error']['type'];
- }
- // added json_encode to convert into a string
- $original = new $errorClass(json_encode($response['body']), $response['status']);
-
- return new $errorClass("$type: $cause", (int) $response['status'], $original);
- }
- // <2.0 semi-structured exceptions
- // added json_encode to convert into a string
- $original = new $errorClass(json_encode($response['body']), $response['status']);
-
- $errorEncoded = $error['error'];
- if (is_array($errorEncoded)) {
- $errorEncoded = json_encode($errorEncoded);
- }
- return new $errorClass($errorEncoded, (int) $response['status'], $original);
- }
-
- // if responseBody is not string, we convert it so it can be used as Exception message
- $responseBody = $response['body'];
- if (!is_string($responseBody)) {
- $responseBody = json_encode($responseBody);
- }
-
- // <2.0 "i just blew up" nonstructured exception
- return new $errorClass($responseBody);
- }
-}
diff --git a/src/Elasticsearch/Connections/ConnectionFactory.php b/src/Elasticsearch/Connections/ConnectionFactory.php
deleted file mode 100644
index a5a15c4b8..000000000
--- a/src/Elasticsearch/Connections/ConnectionFactory.php
+++ /dev/null
@@ -1,71 +0,0 @@
-handler = $handler;
- $this->connectionParams = $connectionParams;
- $this->logger = $logger;
- $this->tracer = $tracer;
- $this->serializer = $serializer;
- }
-
- public function create(array $hostDetails): ConnectionInterface
- {
- return new Connection(
- $this->handler,
- $hostDetails,
- $this->connectionParams,
- $this->serializer,
- $this->logger,
- $this->tracer
- );
- }
-}
diff --git a/src/Elasticsearch/Connections/ConnectionFactoryInterface.php b/src/Elasticsearch/Connections/ConnectionFactoryInterface.php
deleted file mode 100644
index 7f0471ce4..000000000
--- a/src/Elasticsearch/Connections/ConnectionFactoryInterface.php
+++ /dev/null
@@ -1,24 +0,0 @@
-extractOptions($params);
- $this->checkUserParams($params);
- $params = $this->convertCustom($params);
- $this->params = $this->convertArraysToStrings($params);
-
- return $this;
- }
-
- public function getParams(): array
- {
- return $this->params;
- }
-
- public function getOptions(): array
- {
- return $this->options;
- }
-
- public function getIndex(): ?string
- {
- return $this->index;
- }
-
- /**
- * @return $this
- */
- public function setIndex($index)
- {
- if ($index === null) {
- return $this;
- }
-
- if (is_array($index) === true) {
- $index = array_map('trim', $index);
- $index = implode(",", $index);
- }
-
- $this->index = urlencode($index);
-
- return $this;
- }
-
- /**
- * @deprecated
- */
- public function getType(): ?string
- {
- return $this->type;
- }
-
- /**
- * @deprecated
- * @return $this
- */
- public function setType(?string $type)
- {
- if ($type === null) {
- return $this;
- }
-
- if (is_array($type) === true) {
- $type = array_map('trim', $type);
- $type = implode(",", $type);
- }
-
- $this->type = urlencode($type);
-
- return $this;
- }
-
- /**
- * @param int|string $docID
- *
- * @return $this
- */
- public function setId($docID)
- {
- if ($docID === null) {
- return $this;
- }
-
- if (is_int($docID)) {
- $docID = (string) $docID;
- }
-
- $this->id = urlencode($docID);
-
- return $this;
- }
-
- /**
- * @return array|string
- */
- public function getBody()
- {
- return $this->body;
- }
-
- protected function getOptionalURI(string $endpoint): string
- {
- $uri = [];
- $uri[] = $this->getOptionalIndex();
- $uri[] = $this->getOptionalType();
- $uri[] = $endpoint;
- $uri = array_filter($uri);
-
- return '/' . implode('/', $uri);
- }
-
- private function getOptionalIndex(): string
- {
- if (isset($this->index) === true) {
- return $this->index;
- } else {
- return '_all';
- }
- }
-
- private function getOptionalType(): string
- {
- if (isset($this->type) === true) {
- return $this->type;
- } else {
- return '';
- }
- }
-
- /**
- * @param array $params
- *
- * @throws UnexpectedValueException
- */
- private function checkUserParams(array $params)
- {
- if (empty($params)) {
- return; //no params, just return.
- }
-
- $whitelist = array_merge(
- $this->getParamWhitelist(),
- [ 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'opaqueId' ]
- );
-
- $invalid = array_diff(array_keys($params), $whitelist);
- if (count($invalid) > 0) {
- sort($invalid);
- sort($whitelist);
- throw new UnexpectedValueException(
- sprintf(
- (count($invalid) > 1 ? '"%s" are not valid parameters.' : '"%s" is not a valid parameter.').' Allowed parameters are "%s"',
- implode('", "', $invalid),
- implode('", "', $whitelist)
- )
- );
- }
- }
-
- /**
- * @param array $params Note: this is passed by-reference!
- */
- private function extractOptions(&$params)
- {
- // Extract out client options, then start transforming
- if (isset($params['client']) === true) {
- // Check if the opaqueId is populated and add the header
- if (isset($params['client']['opaqueId']) === true) {
- if (isset($params['client']['headers']) === false) {
- $params['client']['headers'] = [];
- }
- $params['client']['headers']['x-opaque-id'] = [trim($params['client']['opaqueId'])];
- unset($params['client']['opaqueId']);
- }
-
- $this->options['client'] = $params['client'];
- unset($params['client']);
- }
- $ignore = isset($this->options['client']['ignore']) ? $this->options['client']['ignore'] : null;
- if (isset($ignore) === true) {
- if (is_string($ignore)) {
- $this->options['client']['ignore'] = explode(",", $ignore);
- } elseif (is_array($ignore)) {
- $this->options['client']['ignore'] = $ignore;
- } else {
- $this->options['client']['ignore'] = [$ignore];
- }
- }
- }
-
- private function convertCustom(array $params): array
- {
- if (isset($params['custom']) === true) {
- foreach ($params['custom'] as $k => $v) {
- $params[$k] = $v;
- }
- unset($params['custom']);
- }
-
- return $params;
- }
-
- private function convertArraysToStrings(array $params): array
- {
- foreach ($params as $key => &$value) {
- if (!($key === 'client' || $key == 'custom') && is_array($value) === true) {
- if ($this->isNestedArray($value) !== true) {
- $value = implode(",", $value);
- }
- }
- }
-
- return $params;
- }
-
- private function isNestedArray(array $a): bool
- {
- foreach ($a as $v) {
- if (is_array($v)) {
- return true;
- }
- }
-
- return false;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/AsyncSearch/Delete.php b/src/Elasticsearch/Endpoints/AsyncSearch/Delete.php
deleted file mode 100644
index b105bdac6..000000000
--- a/src/Elasticsearch/Endpoints/AsyncSearch/Delete.php
+++ /dev/null
@@ -1,51 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_async_search/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint async_search.delete');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/AsyncSearch/Get.php b/src/Elasticsearch/Endpoints/AsyncSearch/Get.php
deleted file mode 100644
index 28e00b452..000000000
--- a/src/Elasticsearch/Endpoints/AsyncSearch/Get.php
+++ /dev/null
@@ -1,55 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_async_search/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint async_search.get');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_completion_timeout',
- 'keep_alive',
- 'typed_keys'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/AsyncSearch/Status.php b/src/Elasticsearch/Endpoints/AsyncSearch/Status.php
deleted file mode 100644
index 6c3660145..000000000
--- a/src/Elasticsearch/Endpoints/AsyncSearch/Status.php
+++ /dev/null
@@ -1,51 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_async_search/status/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint async_search.status');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/AsyncSearch/Submit.php b/src/Elasticsearch/Endpoints/AsyncSearch/Submit.php
deleted file mode 100644
index 839fbe494..000000000
--- a/src/Elasticsearch/Endpoints/AsyncSearch/Submit.php
+++ /dev/null
@@ -1,102 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_async_search";
- }
- return "/_async_search";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_completion_timeout',
- 'keep_on_completion',
- 'keep_alive',
- 'batched_reduce_size',
- 'request_cache',
- 'analyzer',
- 'analyze_wildcard',
- 'default_operator',
- 'df',
- 'explain',
- 'stored_fields',
- 'docvalue_fields',
- 'from',
- 'ignore_unavailable',
- 'ignore_throttled',
- 'allow_no_indices',
- 'expand_wildcards',
- 'lenient',
- 'preference',
- 'q',
- 'routing',
- 'search_type',
- 'size',
- 'sort',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'terminate_after',
- 'stats',
- 'suggest_field',
- 'suggest_mode',
- 'suggest_size',
- 'suggest_text',
- 'timeout',
- 'track_scores',
- 'track_total_hits',
- 'allow_partial_search_results',
- 'typed_keys',
- 'version',
- 'seq_no_primary_term',
- 'max_concurrent_shard_requests'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): Submit
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Autoscaling/DeleteAutoscalingPolicy.php b/src/Elasticsearch/Endpoints/Autoscaling/DeleteAutoscalingPolicy.php
deleted file mode 100644
index 4bd7315d0..000000000
--- a/src/Elasticsearch/Endpoints/Autoscaling/DeleteAutoscalingPolicy.php
+++ /dev/null
@@ -1,62 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_autoscaling/policy/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint autoscaling.delete_autoscaling_policy');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeleteAutoscalingPolicy
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingCapacity.php b/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingCapacity.php
deleted file mode 100644
index 9127b190c..000000000
--- a/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingCapacity.php
+++ /dev/null
@@ -1,46 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_autoscaling/policy/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint autoscaling.get_autoscaling_policy');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetAutoscalingPolicy
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Autoscaling/PutAutoscalingPolicy.php b/src/Elasticsearch/Endpoints/Autoscaling/PutAutoscalingPolicy.php
deleted file mode 100644
index 9d1111a84..000000000
--- a/src/Elasticsearch/Endpoints/Autoscaling/PutAutoscalingPolicy.php
+++ /dev/null
@@ -1,72 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_autoscaling/policy/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint autoscaling.put_autoscaling_policy');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutAutoscalingPolicy
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): PutAutoscalingPolicy
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Bulk.php b/src/Elasticsearch/Endpoints/Bulk.php
deleted file mode 100644
index 3adde3f23..000000000
--- a/src/Elasticsearch/Endpoints/Bulk.php
+++ /dev/null
@@ -1,96 +0,0 @@
-serializer = $serializer;
- }
-
- public function getURI(): string
- {
- $index = $this->index ?? null;
- $type = $this->type ?? null;
- if (isset($type)) {
- @trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
- }
-
- if (isset($index) && isset($type)) {
- return "/$index/$type/_bulk";
- }
- if (isset($index)) {
- return "/$index/_bulk";
- }
- return "/_bulk";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_active_shards',
- 'refresh',
- 'routing',
- 'timeout',
- 'type',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'pipeline',
- 'require_alias'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): Bulk
- {
- if (isset($body) !== true) {
- return $this;
- }
- if (is_array($body) === true || $body instanceof Traversable) {
- foreach ($body as $item) {
- $this->body .= $this->serializer->serialize($item) . "\n";
- }
- } elseif (is_string($body)) {
- $this->body = $body;
- if (substr($body, -1) != "\n") {
- $this->body .= "\n";
- }
- } else {
- throw new InvalidArgumentException("Body must be an array, traversable object or string");
- }
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Aliases.php b/src/Elasticsearch/Endpoints/Cat/Aliases.php
deleted file mode 100644
index 18553f714..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Aliases.php
+++ /dev/null
@@ -1,72 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_cat/aliases/$name";
- }
- return "/_cat/aliases";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'local',
- 'h',
- 'help',
- 's',
- 'v',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): Aliases
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Allocation.php b/src/Elasticsearch/Endpoints/Cat/Allocation.php
deleted file mode 100644
index e90d03a6c..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Allocation.php
+++ /dev/null
@@ -1,73 +0,0 @@
-node_id ?? null;
-
- if (isset($node_id)) {
- return "/_cat/allocation/$node_id";
- }
- return "/_cat/allocation";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'bytes',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNodeId($node_id): Allocation
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Count.php b/src/Elasticsearch/Endpoints/Cat/Count.php
deleted file mode 100644
index 9a821947b..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Count.php
+++ /dev/null
@@ -1,56 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/_cat/count/$index";
- }
- return "/_cat/count";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'h',
- 'help',
- 's',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Fielddata.php b/src/Elasticsearch/Endpoints/Cat/Fielddata.php
deleted file mode 100644
index 46b86510a..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Fielddata.php
+++ /dev/null
@@ -1,72 +0,0 @@
-fields ?? null;
-
- if (isset($fields)) {
- return "/_cat/fielddata/$fields";
- }
- return "/_cat/fielddata";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'bytes',
- 'h',
- 'help',
- 's',
- 'v',
- 'fields'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setFields($fields): Fielddata
- {
- if (isset($fields) !== true) {
- return $this;
- }
- if (is_array($fields) === true) {
- $fields = implode(",", $fields);
- }
- $this->fields = $fields;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Health.php b/src/Elasticsearch/Endpoints/Cat/Health.php
deleted file mode 100644
index 2b353bc80..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Health.php
+++ /dev/null
@@ -1,54 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/_cat/indices/$index";
- }
- return "/_cat/indices";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'bytes',
- 'master_timeout',
- 'h',
- 'health',
- 'help',
- 'pri',
- 's',
- 'time',
- 'v',
- 'include_unloaded_segments',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Master.php b/src/Elasticsearch/Endpoints/Cat/Master.php
deleted file mode 100644
index eb0371daa..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Master.php
+++ /dev/null
@@ -1,54 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_cat/ml/data_frame/analytics/$id";
- }
- return "/_cat/ml/data_frame/analytics";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'bytes',
- 'format',
- 'h',
- 'help',
- 's',
- 'time',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/MlDatafeeds.php b/src/Elasticsearch/Endpoints/Cat/MlDatafeeds.php
deleted file mode 100644
index 8b2592388..000000000
--- a/src/Elasticsearch/Endpoints/Cat/MlDatafeeds.php
+++ /dev/null
@@ -1,70 +0,0 @@
-datafeed_id ?? null;
-
- if (isset($datafeed_id)) {
- return "/_cat/ml/datafeeds/$datafeed_id";
- }
- return "/_cat/ml/datafeeds";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'allow_no_datafeeds',
- 'format',
- 'h',
- 'help',
- 's',
- 'time',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setDatafeedId($datafeed_id): MlDatafeeds
- {
- if (isset($datafeed_id) !== true) {
- return $this;
- }
- $this->datafeed_id = $datafeed_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/MlJobs.php b/src/Elasticsearch/Endpoints/Cat/MlJobs.php
deleted file mode 100644
index db5b84d36..000000000
--- a/src/Elasticsearch/Endpoints/Cat/MlJobs.php
+++ /dev/null
@@ -1,71 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_cat/ml/anomaly_detectors/$job_id";
- }
- return "/_cat/ml/anomaly_detectors";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'allow_no_jobs',
- 'bytes',
- 'format',
- 'h',
- 'help',
- 's',
- 'time',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setJobId($job_id): MlJobs
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/MlTrainedModels.php b/src/Elasticsearch/Endpoints/Cat/MlTrainedModels.php
deleted file mode 100644
index 499cf4266..000000000
--- a/src/Elasticsearch/Endpoints/Cat/MlTrainedModels.php
+++ /dev/null
@@ -1,72 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_cat/ml/trained_models/$model_id";
- }
- return "/_cat/ml/trained_models";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'from',
- 'size',
- 'bytes',
- 'format',
- 'h',
- 'help',
- 's',
- 'time',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setModelId($model_id): MlTrainedModels
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php b/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php
deleted file mode 100644
index 360af4691..000000000
--- a/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php
+++ /dev/null
@@ -1,54 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/_cat/recovery/$index";
- }
- return "/_cat/recovery";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'active_only',
- 'bytes',
- 'detailed',
- 'h',
- 'help',
- 'index',
- 's',
- 'time',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Repositories.php b/src/Elasticsearch/Endpoints/Cat/Repositories.php
deleted file mode 100644
index d7374c970..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Repositories.php
+++ /dev/null
@@ -1,54 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/_cat/segments/$index";
- }
- return "/_cat/segments";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'bytes',
- 'h',
- 'help',
- 's',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Shards.php b/src/Elasticsearch/Endpoints/Cat/Shards.php
deleted file mode 100644
index 7f8f37e41..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Shards.php
+++ /dev/null
@@ -1,59 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/_cat/shards/$index";
- }
- return "/_cat/shards";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'bytes',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'time',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Snapshots.php b/src/Elasticsearch/Endpoints/Cat/Snapshots.php
deleted file mode 100644
index 75415621a..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Snapshots.php
+++ /dev/null
@@ -1,73 +0,0 @@
-repository ?? null;
-
- if (isset($repository)) {
- return "/_cat/snapshots/$repository";
- }
- return "/_cat/snapshots";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'ignore_unavailable',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'time',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setRepository($repository): Snapshots
- {
- if (isset($repository) !== true) {
- return $this;
- }
- if (is_array($repository) === true) {
- $repository = implode(",", $repository);
- }
- $this->repository = $repository;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Tasks.php b/src/Elasticsearch/Endpoints/Cat/Tasks.php
deleted file mode 100644
index b478296a6..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Tasks.php
+++ /dev/null
@@ -1,57 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_cat/templates/$name";
- }
- return "/_cat/templates";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): Templates
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/ThreadPool.php b/src/Elasticsearch/Endpoints/Cat/ThreadPool.php
deleted file mode 100644
index 0bc03397f..000000000
--- a/src/Elasticsearch/Endpoints/Cat/ThreadPool.php
+++ /dev/null
@@ -1,73 +0,0 @@
-thread_pool_patterns ?? null;
-
- if (isset($thread_pool_patterns)) {
- return "/_cat/thread_pool/$thread_pool_patterns";
- }
- return "/_cat/thread_pool";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'format',
- 'time',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setThreadPoolPatterns($thread_pool_patterns): ThreadPool
- {
- if (isset($thread_pool_patterns) !== true) {
- return $this;
- }
- if (is_array($thread_pool_patterns) === true) {
- $thread_pool_patterns = implode(",", $thread_pool_patterns);
- }
- $this->thread_pool_patterns = $thread_pool_patterns;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cat/Transforms.php b/src/Elasticsearch/Endpoints/Cat/Transforms.php
deleted file mode 100644
index c84d3a056..000000000
--- a/src/Elasticsearch/Endpoints/Cat/Transforms.php
+++ /dev/null
@@ -1,71 +0,0 @@
-transform_id ?? null;
-
- if (isset($transform_id)) {
- return "/_cat/transforms/$transform_id";
- }
- return "/_cat/transforms";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'from',
- 'size',
- 'allow_no_match',
- 'format',
- 'h',
- 'help',
- 's',
- 'time',
- 'v'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setTransformId($transform_id): Transforms
- {
- if (isset($transform_id) !== true) {
- return $this;
- }
- $this->transform_id = $transform_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php
deleted file mode 100644
index 858511c7f..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php
+++ /dev/null
@@ -1,62 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_ccr/auto_follow/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.delete_auto_follow_pattern');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeleteAutoFollowPattern
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/Follow.php b/src/Elasticsearch/Endpoints/Ccr/Follow.php
deleted file mode 100644
index f8604e006..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/Follow.php
+++ /dev/null
@@ -1,63 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ccr/follow";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.follow');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_active_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): Follow
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php b/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php
deleted file mode 100644
index 91e4da154..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php
+++ /dev/null
@@ -1,51 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ccr/info";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.follow_info');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/FollowStats.php b/src/Elasticsearch/Endpoints/Ccr/FollowStats.php
deleted file mode 100644
index 3f012719e..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/FollowStats.php
+++ /dev/null
@@ -1,51 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ccr/stats";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.follow_stats');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php b/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php
deleted file mode 100644
index 567434e24..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php
+++ /dev/null
@@ -1,61 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ccr/forget_follower";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.forget_follower');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): ForgetFollower
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php
deleted file mode 100644
index ac1d0b2ac..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php
+++ /dev/null
@@ -1,61 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_ccr/auto_follow/$name";
- }
- return "/_ccr/auto_follow";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetAutoFollowPattern
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/PauseAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/PauseAutoFollowPattern.php
deleted file mode 100644
index b58611427..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/PauseAutoFollowPattern.php
+++ /dev/null
@@ -1,62 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_ccr/auto_follow/$name/pause";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.pause_auto_follow_pattern');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setName($name): PauseAutoFollowPattern
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php b/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php
deleted file mode 100644
index 9c652507f..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php
+++ /dev/null
@@ -1,51 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ccr/pause_follow";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.pause_follow');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php
deleted file mode 100644
index 3ea1cc4cb..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php
+++ /dev/null
@@ -1,72 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_ccr/auto_follow/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.put_auto_follow_pattern');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutAutoFollowPattern
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): PutAutoFollowPattern
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/ResumeAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/ResumeAutoFollowPattern.php
deleted file mode 100644
index 101feced5..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/ResumeAutoFollowPattern.php
+++ /dev/null
@@ -1,62 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_ccr/auto_follow/$name/resume";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.resume_auto_follow_pattern');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setName($name): ResumeAutoFollowPattern
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php b/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php
deleted file mode 100644
index a55074c1a..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php
+++ /dev/null
@@ -1,61 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ccr/resume_follow";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.resume_follow');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): ResumeFollow
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ccr/Stats.php b/src/Elasticsearch/Endpoints/Ccr/Stats.php
deleted file mode 100644
index 6b8922cbd..000000000
--- a/src/Elasticsearch/Endpoints/Ccr/Stats.php
+++ /dev/null
@@ -1,46 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ccr/unfollow";
- }
- throw new RuntimeException('Missing parameter for the endpoint ccr.unfollow');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/ClearScroll.php b/src/Elasticsearch/Endpoints/ClearScroll.php
deleted file mode 100644
index 0c28af8c6..000000000
--- a/src/Elasticsearch/Endpoints/ClearScroll.php
+++ /dev/null
@@ -1,79 +0,0 @@
-scroll_id ?? null;
- if (isset($scroll_id)) {
- @trigger_error('A scroll id can be quite large and should be specified as part of the body', E_USER_DEPRECATED);
- }
-
- if (isset($scroll_id)) {
- return "/_search/scroll/$scroll_id";
- }
- return "/_search/scroll";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setBody($body): ClearScroll
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setScrollId($scroll_id): ClearScroll
- {
- if (isset($scroll_id) !== true) {
- return $this;
- }
- if (is_array($scroll_id) === true) {
- $scroll_id = implode(",", $scroll_id);
- }
- $this->scroll_id = $scroll_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/ClosePointInTime.php b/src/Elasticsearch/Endpoints/ClosePointInTime.php
deleted file mode 100644
index d5532881f..000000000
--- a/src/Elasticsearch/Endpoints/ClosePointInTime.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php b/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php
deleted file mode 100644
index b98f768a9..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php
+++ /dev/null
@@ -1,59 +0,0 @@
-body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): AllocationExplain
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/DeleteComponentTemplate.php b/src/Elasticsearch/Endpoints/Cluster/DeleteComponentTemplate.php
deleted file mode 100644
index aba6dde78..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/DeleteComponentTemplate.php
+++ /dev/null
@@ -1,65 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_component_template/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint cluster.delete_component_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeleteComponentTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/DeleteVotingConfigExclusions.php b/src/Elasticsearch/Endpoints/Cluster/DeleteVotingConfigExclusions.php
deleted file mode 100644
index 8a6ece3cb..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/DeleteVotingConfigExclusions.php
+++ /dev/null
@@ -1,48 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_component_template/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint cluster.exists_component_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'HEAD';
- }
-
- public function setName($name): ExistsComponentTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/GetComponentTemplate.php b/src/Elasticsearch/Endpoints/Cluster/GetComponentTemplate.php
deleted file mode 100644
index b5ed2e63b..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/GetComponentTemplate.php
+++ /dev/null
@@ -1,67 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_component_template/$name";
- }
- return "/_component_template";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetComponentTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/GetSettings.php b/src/Elasticsearch/Endpoints/Cluster/GetSettings.php
deleted file mode 100644
index 3ce321416..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/GetSettings.php
+++ /dev/null
@@ -1,51 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/_cluster/health/$index";
- }
- return "/_cluster/health";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'expand_wildcards',
- 'level',
- 'local',
- 'master_timeout',
- 'timeout',
- 'wait_for_active_shards',
- 'wait_for_nodes',
- 'wait_for_events',
- 'wait_for_no_relocating_shards',
- 'wait_for_no_initializing_shards',
- 'wait_for_status',
- 'return_200_for_cluster_health_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php b/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php
deleted file mode 100644
index 44ee2548c..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php
+++ /dev/null
@@ -1,49 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_component_template/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint cluster.put_component_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'create',
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutComponentTemplate
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): PutComponentTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/PutSettings.php b/src/Elasticsearch/Endpoints/Cluster/PutSettings.php
deleted file mode 100644
index a63fe88d2..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/PutSettings.php
+++ /dev/null
@@ -1,60 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php b/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php
deleted file mode 100644
index 1b292d247..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php
+++ /dev/null
@@ -1,48 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/State.php b/src/Elasticsearch/Endpoints/Cluster/State.php
deleted file mode 100644
index 37fde6d71..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/State.php
+++ /dev/null
@@ -1,77 +0,0 @@
-metric ?? null;
- $index = $this->index ?? null;
-
- if (isset($metric) && isset($index)) {
- return "/_cluster/state/$metric/$index";
- }
- if (isset($metric)) {
- return "/_cluster/state/$metric";
- }
- return "/_cluster/state";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'local',
- 'master_timeout',
- 'flat_settings',
- 'wait_for_metadata_version',
- 'wait_for_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setMetric($metric): State
- {
- if (isset($metric) !== true) {
- return $this;
- }
- if (is_array($metric) === true) {
- $metric = implode(",", $metric);
- }
- $this->metric = $metric;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Cluster/Stats.php b/src/Elasticsearch/Endpoints/Cluster/Stats.php
deleted file mode 100644
index 9586fd6f4..000000000
--- a/src/Elasticsearch/Endpoints/Cluster/Stats.php
+++ /dev/null
@@ -1,67 +0,0 @@
-node_id ?? null;
-
- if (isset($node_id)) {
- return "/_cluster/stats/nodes/$node_id";
- }
- return "/_cluster/stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'flat_settings',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNodeId($node_id): Stats
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Count.php b/src/Elasticsearch/Endpoints/Count.php
deleted file mode 100644
index 8c765b942..000000000
--- a/src/Elasticsearch/Endpoints/Count.php
+++ /dev/null
@@ -1,75 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_count";
- }
- return "/_count";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'ignore_throttled',
- 'allow_no_indices',
- 'expand_wildcards',
- 'min_score',
- 'preference',
- 'routing',
- 'q',
- 'analyzer',
- 'analyze_wildcard',
- 'default_operator',
- 'df',
- 'lenient',
- 'terminate_after'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Count
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Create.php b/src/Elasticsearch/Endpoints/Create.php
deleted file mode 100644
index c925b1efd..000000000
--- a/src/Elasticsearch/Endpoints/Create.php
+++ /dev/null
@@ -1,84 +0,0 @@
-id) !== true) {
- throw new RuntimeException(
- 'id is required for create'
- );
- }
- $id = $this->id;
- if (isset($this->index) !== true) {
- throw new RuntimeException(
- 'index is required for create'
- );
- }
- $index = $this->index;
- $type = $this->type ?? null;
- if (isset($type)) {
- @trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
- }
-
- if (isset($type)) {
- return "/$index/$type/$id/_create";
- }
- return "/$index/_create/$id";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_active_shards',
- 'refresh',
- 'routing',
- 'timeout',
- 'version',
- 'version_type',
- 'pipeline'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): Create
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php b/src/Elasticsearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php
deleted file mode 100644
index 22cf43466..000000000
--- a/src/Elasticsearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php
+++ /dev/null
@@ -1,66 +0,0 @@
-index_uuid ?? null;
-
- if (isset($index_uuid)) {
- return "/_dangling/$index_uuid";
- }
- throw new RuntimeException('Missing parameter for the endpoint dangling_indices.delete_dangling_index');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'accept_data_loss',
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setIndexUuid($index_uuid): DeleteDanglingIndex
- {
- if (isset($index_uuid) !== true) {
- return $this;
- }
- $this->index_uuid = $index_uuid;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/DanglingIndices/ImportDanglingIndex.php b/src/Elasticsearch/Endpoints/DanglingIndices/ImportDanglingIndex.php
deleted file mode 100644
index 6db5a0b05..000000000
--- a/src/Elasticsearch/Endpoints/DanglingIndices/ImportDanglingIndex.php
+++ /dev/null
@@ -1,66 +0,0 @@
-index_uuid ?? null;
-
- if (isset($index_uuid)) {
- return "/_dangling/$index_uuid";
- }
- throw new RuntimeException('Missing parameter for the endpoint dangling_indices.import_dangling_index');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'accept_data_loss',
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setIndexUuid($index_uuid): ImportDanglingIndex
- {
- if (isset($index_uuid) !== true) {
- return $this;
- }
- $this->index_uuid = $index_uuid;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/DanglingIndices/ListDanglingIndices.php b/src/Elasticsearch/Endpoints/DanglingIndices/ListDanglingIndices.php
deleted file mode 100644
index c54a3b1b8..000000000
--- a/src/Elasticsearch/Endpoints/DanglingIndices/ListDanglingIndices.php
+++ /dev/null
@@ -1,48 +0,0 @@
-id) !== true) {
- throw new RuntimeException(
- 'id is required for delete'
- );
- }
- $id = $this->id;
- if (isset($this->index) !== true) {
- throw new RuntimeException(
- 'index is required for delete'
- );
- }
- $index = $this->index;
- $type = $this->type ?? null;
- if (isset($type)) {
- @trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
- }
-
- if (isset($type)) {
- return "/$index/$type/$id";
- }
- return "/$index/_doc/$id";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_active_shards',
- 'refresh',
- 'routing',
- 'timeout',
- 'if_seq_no',
- 'if_primary_term',
- 'version',
- 'version_type'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/DeleteByQuery.php b/src/Elasticsearch/Endpoints/DeleteByQuery.php
deleted file mode 100644
index 6ff0c6df3..000000000
--- a/src/Elasticsearch/Endpoints/DeleteByQuery.php
+++ /dev/null
@@ -1,94 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_delete_by_query";
- }
- throw new RuntimeException('Missing parameter for the endpoint delete_by_query');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'analyzer',
- 'analyze_wildcard',
- 'default_operator',
- 'df',
- 'from',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'conflicts',
- 'expand_wildcards',
- 'lenient',
- 'preference',
- 'q',
- 'routing',
- 'scroll',
- 'search_type',
- 'search_timeout',
- 'max_docs',
- 'sort',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'terminate_after',
- 'stats',
- 'version',
- 'request_cache',
- 'refresh',
- 'timeout',
- 'wait_for_active_shards',
- 'scroll_size',
- 'wait_for_completion',
- 'requests_per_second',
- 'slices'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): DeleteByQuery
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php b/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php
deleted file mode 100644
index e9df4e20c..000000000
--- a/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php
+++ /dev/null
@@ -1,64 +0,0 @@
-task_id ?? null;
-
- if (isset($task_id)) {
- return "/_delete_by_query/$task_id/_rethrottle";
- }
- throw new RuntimeException('Missing parameter for the endpoint delete_by_query_rethrottle');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'requests_per_second'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setTaskId($task_id): DeleteByQueryRethrottle
- {
- if (isset($task_id) !== true) {
- return $this;
- }
- $this->task_id = $task_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/DeleteScript.php b/src/Elasticsearch/Endpoints/DeleteScript.php
deleted file mode 100644
index e9312da47..000000000
--- a/src/Elasticsearch/Endpoints/DeleteScript.php
+++ /dev/null
@@ -1,54 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_scripts/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint delete_script');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Enrich/DeletePolicy.php b/src/Elasticsearch/Endpoints/Enrich/DeletePolicy.php
deleted file mode 100644
index 0990b36eb..000000000
--- a/src/Elasticsearch/Endpoints/Enrich/DeletePolicy.php
+++ /dev/null
@@ -1,62 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_enrich/policy/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint enrich.delete_policy');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeletePolicy
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Enrich/ExecutePolicy.php b/src/Elasticsearch/Endpoints/Enrich/ExecutePolicy.php
deleted file mode 100644
index 7f8aa10bd..000000000
--- a/src/Elasticsearch/Endpoints/Enrich/ExecutePolicy.php
+++ /dev/null
@@ -1,64 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_enrich/policy/$name/_execute";
- }
- throw new RuntimeException('Missing parameter for the endpoint enrich.execute_policy');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_completion'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setName($name): ExecutePolicy
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Enrich/GetPolicy.php b/src/Elasticsearch/Endpoints/Enrich/GetPolicy.php
deleted file mode 100644
index a7687c15a..000000000
--- a/src/Elasticsearch/Endpoints/Enrich/GetPolicy.php
+++ /dev/null
@@ -1,64 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_enrich/policy/$name";
- }
- return "/_enrich/policy";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetPolicy
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Enrich/PutPolicy.php b/src/Elasticsearch/Endpoints/Enrich/PutPolicy.php
deleted file mode 100644
index 45a18b659..000000000
--- a/src/Elasticsearch/Endpoints/Enrich/PutPolicy.php
+++ /dev/null
@@ -1,72 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_enrich/policy/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint enrich.put_policy');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutPolicy
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): PutPolicy
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Enrich/Stats.php b/src/Elasticsearch/Endpoints/Enrich/Stats.php
deleted file mode 100644
index 008f3ed88..000000000
--- a/src/Elasticsearch/Endpoints/Enrich/Stats.php
+++ /dev/null
@@ -1,46 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_eql/search/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint eql.delete');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Eql/Get.php b/src/Elasticsearch/Endpoints/Eql/Get.php
deleted file mode 100644
index 4460ee593..000000000
--- a/src/Elasticsearch/Endpoints/Eql/Get.php
+++ /dev/null
@@ -1,54 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_eql/search/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint eql.get');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_completion_timeout',
- 'keep_alive'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Eql/GetStatus.php b/src/Elasticsearch/Endpoints/Eql/GetStatus.php
deleted file mode 100644
index 3c86f3195..000000000
--- a/src/Elasticsearch/Endpoints/Eql/GetStatus.php
+++ /dev/null
@@ -1,51 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_eql/search/status/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint eql.get_status');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Eql/Search.php b/src/Elasticsearch/Endpoints/Eql/Search.php
deleted file mode 100644
index 233c11f84..000000000
--- a/src/Elasticsearch/Endpoints/Eql/Search.php
+++ /dev/null
@@ -1,65 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_eql/search";
- }
- throw new RuntimeException('Missing parameter for the endpoint eql.search');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_completion_timeout',
- 'keep_on_completion',
- 'keep_alive'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Search
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Exists.php b/src/Elasticsearch/Endpoints/Exists.php
deleted file mode 100644
index 0367c5c11..000000000
--- a/src/Elasticsearch/Endpoints/Exists.php
+++ /dev/null
@@ -1,63 +0,0 @@
-id ?? null;
- $index = $this->index ?? null;
-
- if (isset($index) && isset($id)) {
- return "/$index/_doc/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint exists');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'stored_fields',
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'version',
- 'version_type'
- ];
- }
-
- public function getMethod(): string
- {
- return 'HEAD';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/ExistsSource.php b/src/Elasticsearch/Endpoints/ExistsSource.php
deleted file mode 100644
index 7ecfa3893..000000000
--- a/src/Elasticsearch/Endpoints/ExistsSource.php
+++ /dev/null
@@ -1,76 +0,0 @@
-id) !== true) {
- throw new RuntimeException(
- 'id is required for exists_source'
- );
- }
- $id = $this->id;
- if (isset($this->index) !== true) {
- throw new RuntimeException(
- 'index is required for exists_source'
- );
- }
- $index = $this->index;
- $type = $this->type ?? null;
- if (isset($type)) {
- @trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
- }
-
- if (isset($type)) {
- return "/$index/$type/$id/_source";
- }
- return "/$index/_source/$id";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'version',
- 'version_type'
- ];
- }
-
- public function getMethod(): string
- {
- return 'HEAD';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Explain.php b/src/Elasticsearch/Endpoints/Explain.php
deleted file mode 100644
index 76bc445e8..000000000
--- a/src/Elasticsearch/Endpoints/Explain.php
+++ /dev/null
@@ -1,75 +0,0 @@
-id ?? null;
- $index = $this->index ?? null;
-
- if (isset($index) && isset($id)) {
- return "/$index/_explain/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint explain');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'analyze_wildcard',
- 'analyzer',
- 'default_operator',
- 'df',
- 'stored_fields',
- 'lenient',
- 'preference',
- 'q',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Explain
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Features/GetFeatures.php b/src/Elasticsearch/Endpoints/Features/GetFeatures.php
deleted file mode 100644
index ac0af43f0..000000000
--- a/src/Elasticsearch/Endpoints/Features/GetFeatures.php
+++ /dev/null
@@ -1,48 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_field_caps";
- }
- return "/_field_caps";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'fields',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'include_unmapped'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): FieldCaps
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Fleet/GlobalCheckpoints.php b/src/Elasticsearch/Endpoints/Fleet/GlobalCheckpoints.php
deleted file mode 100644
index 2f32afde6..000000000
--- a/src/Elasticsearch/Endpoints/Fleet/GlobalCheckpoints.php
+++ /dev/null
@@ -1,56 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_fleet/global_checkpoints";
- }
- throw new RuntimeException('Missing parameter for the endpoint fleet.global_checkpoints');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_advance',
- 'wait_for_index',
- 'checkpoints',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Fleet/Msearch.php b/src/Elasticsearch/Endpoints/Fleet/Msearch.php
deleted file mode 100644
index 6e171a35a..000000000
--- a/src/Elasticsearch/Endpoints/Fleet/Msearch.php
+++ /dev/null
@@ -1,80 +0,0 @@
-serializer = $serializer;
- }
-
- public function getURI(): string
- {
- $index = $this->index ?? null;
-
- if (isset($index)) {
- return "/$index/_fleet/_msearch";
- }
- return "/_fleet/_msearch";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Msearch
- {
- if (isset($body) !== true) {
- return $this;
- }
- if (is_array($body) === true || $body instanceof Traversable) {
- foreach ($body as $item) {
- $this->body .= $this->serializer->serialize($item) . "\n";
- }
- } elseif (is_string($body)) {
- $this->body = $body;
- if (substr($body, -1) != "\n") {
- $this->body .= "\n";
- }
- } else {
- throw new InvalidArgumentException("Body must be an array, traversable object or string");
- }
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Fleet/Search.php b/src/Elasticsearch/Endpoints/Fleet/Search.php
deleted file mode 100644
index b412a74c2..000000000
--- a/src/Elasticsearch/Endpoints/Fleet/Search.php
+++ /dev/null
@@ -1,65 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_fleet/_search";
- }
- throw new RuntimeException('Missing parameter for the endpoint fleet.search');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_checkpoints',
- 'wait_for_checkpoints_timeout',
- 'allow_partial_search_results'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Search
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Get.php b/src/Elasticsearch/Endpoints/Get.php
deleted file mode 100644
index 756a2a2c4..000000000
--- a/src/Elasticsearch/Endpoints/Get.php
+++ /dev/null
@@ -1,63 +0,0 @@
-id ?? null;
- $index = $this->index ?? null;
-
- if (isset($index) && isset($id)) {
- return "/$index/_doc/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint get');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'stored_fields',
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'version',
- 'version_type'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/GetScript.php b/src/Elasticsearch/Endpoints/GetScript.php
deleted file mode 100644
index d799bcb76..000000000
--- a/src/Elasticsearch/Endpoints/GetScript.php
+++ /dev/null
@@ -1,53 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_scripts/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint get_script');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/GetScriptContext.php b/src/Elasticsearch/Endpoints/GetScriptContext.php
deleted file mode 100644
index 0c38d4104..000000000
--- a/src/Elasticsearch/Endpoints/GetScriptContext.php
+++ /dev/null
@@ -1,48 +0,0 @@
-id ?? null;
- $index = $this->index ?? null;
-
- if (isset($index) && isset($id)) {
- return "/$index/_source/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint get_source');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'version',
- 'version_type'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Graph/Explore.php b/src/Elasticsearch/Endpoints/Graph/Explore.php
deleted file mode 100644
index 5a21a6ec7..000000000
--- a/src/Elasticsearch/Endpoints/Graph/Explore.php
+++ /dev/null
@@ -1,64 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_graph/explore";
- }
- throw new RuntimeException('Missing parameter for the endpoint graph.explore');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'routing',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Explore
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php b/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php
deleted file mode 100644
index e58092819..000000000
--- a/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php
+++ /dev/null
@@ -1,64 +0,0 @@
-policy ?? null;
-
- if (isset($policy)) {
- return "/_ilm/policy/$policy";
- }
- throw new RuntimeException('Missing parameter for the endpoint ilm.delete_lifecycle');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setPolicy($policy): DeleteLifecycle
- {
- if (isset($policy) !== true) {
- return $this;
- }
- $this->policy = $policy;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php b/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php
deleted file mode 100644
index f44ac2c1f..000000000
--- a/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php
+++ /dev/null
@@ -1,54 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ilm/explain";
- }
- throw new RuntimeException('Missing parameter for the endpoint ilm.explain_lifecycle');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'only_managed',
- 'only_errors'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php b/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php
deleted file mode 100644
index c169aaca4..000000000
--- a/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php
+++ /dev/null
@@ -1,63 +0,0 @@
-policy ?? null;
-
- if (isset($policy)) {
- return "/_ilm/policy/$policy";
- }
- return "/_ilm/policy";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setPolicy($policy): GetLifecycle
- {
- if (isset($policy) !== true) {
- return $this;
- }
- $this->policy = $policy;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ilm/GetStatus.php b/src/Elasticsearch/Endpoints/Ilm/GetStatus.php
deleted file mode 100644
index c990701e5..000000000
--- a/src/Elasticsearch/Endpoints/Ilm/GetStatus.php
+++ /dev/null
@@ -1,48 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ilm/MoveToStep.php b/src/Elasticsearch/Endpoints/Ilm/MoveToStep.php
deleted file mode 100644
index 5862ae768..000000000
--- a/src/Elasticsearch/Endpoints/Ilm/MoveToStep.php
+++ /dev/null
@@ -1,63 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/_ilm/move/$index";
- }
- throw new RuntimeException('Missing parameter for the endpoint ilm.move_to_step');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): MoveToStep
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php b/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php
deleted file mode 100644
index d4bd40f1c..000000000
--- a/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php
+++ /dev/null
@@ -1,74 +0,0 @@
-policy ?? null;
-
- if (isset($policy)) {
- return "/_ilm/policy/$policy";
- }
- throw new RuntimeException('Missing parameter for the endpoint ilm.put_lifecycle');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutLifecycle
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setPolicy($policy): PutLifecycle
- {
- if (isset($policy) !== true) {
- return $this;
- }
- $this->policy = $policy;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php b/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php
deleted file mode 100644
index 73df34bfd..000000000
--- a/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php
+++ /dev/null
@@ -1,53 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ilm/remove";
- }
- throw new RuntimeException('Missing parameter for the endpoint ilm.remove_policy');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ilm/Retry.php b/src/Elasticsearch/Endpoints/Ilm/Retry.php
deleted file mode 100644
index 20609c8fa..000000000
--- a/src/Elasticsearch/Endpoints/Ilm/Retry.php
+++ /dev/null
@@ -1,53 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_ilm/retry";
- }
- throw new RuntimeException('Missing parameter for the endpoint ilm.retry');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ilm/Start.php b/src/Elasticsearch/Endpoints/Ilm/Start.php
deleted file mode 100644
index 7010ebf31..000000000
--- a/src/Elasticsearch/Endpoints/Ilm/Start.php
+++ /dev/null
@@ -1,48 +0,0 @@
-index) !== true) {
- throw new RuntimeException(
- 'index is required for index'
- );
- }
- $index = $this->index;
- $id = $this->id ?? null;
-
- if (isset($id)) {
- return "/$index/_doc/$id";
- }
- return "/$index/_doc";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_active_shards',
- 'op_type',
- 'refresh',
- 'routing',
- 'timeout',
- 'version',
- 'version_type',
- 'if_seq_no',
- 'if_primary_term',
- 'pipeline',
- 'require_alias'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): Index
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/AddBlock.php b/src/Elasticsearch/Endpoints/Indices/AddBlock.php
deleted file mode 100644
index 6e439df1e..000000000
--- a/src/Elasticsearch/Endpoints/Indices/AddBlock.php
+++ /dev/null
@@ -1,69 +0,0 @@
-index ?? null;
- $block = $this->block ?? null;
-
- if (isset($index) && isset($block)) {
- return "/$index/_block/$block";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.add_block');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBlock($block): AddBlock
- {
- if (isset($block) !== true) {
- return $this;
- }
- $this->block = $block;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Analyze.php b/src/Elasticsearch/Endpoints/Indices/Analyze.php
deleted file mode 100644
index 59ced9d04..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Analyze.php
+++ /dev/null
@@ -1,62 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_analyze";
- }
- return "/_analyze";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'index'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Analyze
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ClearCache.php b/src/Elasticsearch/Endpoints/Indices/ClearCache.php
deleted file mode 100644
index e4fac24a6..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ClearCache.php
+++ /dev/null
@@ -1,59 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_cache/clear";
- }
- return "/_cache/clear";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'fielddata',
- 'fields',
- 'query',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'index',
- 'request'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/CloneIndices.php b/src/Elasticsearch/Endpoints/Indices/CloneIndices.php
deleted file mode 100644
index 48d195985..000000000
--- a/src/Elasticsearch/Endpoints/Indices/CloneIndices.php
+++ /dev/null
@@ -1,77 +0,0 @@
-index ?? null;
- $target = $this->target ?? null;
-
- if (isset($index) && isset($target)) {
- return "/$index/_clone/$target";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.clone');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'wait_for_active_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): CloneIndices
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setTarget($target): CloneIndices
- {
- if (isset($target) !== true) {
- return $this;
- }
- $this->target = $target;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Close.php b/src/Elasticsearch/Endpoints/Indices/Close.php
deleted file mode 100644
index 11c4b4329..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Close.php
+++ /dev/null
@@ -1,58 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_close";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.close');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'wait_for_active_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Create.php b/src/Elasticsearch/Endpoints/Indices/Create.php
deleted file mode 100644
index 5106a0967..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Create.php
+++ /dev/null
@@ -1,65 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.create');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_active_shards',
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): Create
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/CreateDataStream.php b/src/Elasticsearch/Endpoints/Indices/CreateDataStream.php
deleted file mode 100644
index 6971f15dc..000000000
--- a/src/Elasticsearch/Endpoints/Indices/CreateDataStream.php
+++ /dev/null
@@ -1,64 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_data_stream/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.create_data_stream');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setName($name): CreateDataStream
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/DataStreamsStats.php b/src/Elasticsearch/Endpoints/Indices/DataStreamsStats.php
deleted file mode 100644
index a4cfcc1d7..000000000
--- a/src/Elasticsearch/Endpoints/Indices/DataStreamsStats.php
+++ /dev/null
@@ -1,64 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_data_stream/$name/_stats";
- }
- return "/_data_stream/_stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): DataStreamsStats
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Delete.php b/src/Elasticsearch/Endpoints/Indices/Delete.php
deleted file mode 100644
index 66ab72331..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Delete.php
+++ /dev/null
@@ -1,57 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.delete');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php b/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php
deleted file mode 100644
index 02c361718..000000000
--- a/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php
+++ /dev/null
@@ -1,76 +0,0 @@
-index) !== true) {
- throw new RuntimeException(
- 'index is required for delete_alias'
- );
- }
- $index = $this->index;
- if (isset($this->name) !== true) {
- throw new RuntimeException(
- 'name is required for delete_alias'
- );
- }
- $name = $this->name;
-
- return "/$index/_alias/$name";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeleteAlias
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/DeleteDataStream.php b/src/Elasticsearch/Endpoints/Indices/DeleteDataStream.php
deleted file mode 100644
index 107703f93..000000000
--- a/src/Elasticsearch/Endpoints/Indices/DeleteDataStream.php
+++ /dev/null
@@ -1,67 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_data_stream/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.delete_data_stream');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeleteDataStream
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/DeleteIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/DeleteIndexTemplate.php
deleted file mode 100644
index 125e0c41f..000000000
--- a/src/Elasticsearch/Endpoints/Indices/DeleteIndexTemplate.php
+++ /dev/null
@@ -1,65 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_index_template/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.delete_index_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeleteIndexTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php b/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php
deleted file mode 100644
index aa9848ca6..000000000
--- a/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php
+++ /dev/null
@@ -1,65 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_template/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.delete_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeleteTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/DiskUsage.php b/src/Elasticsearch/Endpoints/Indices/DiskUsage.php
deleted file mode 100644
index 77e6f4f88..000000000
--- a/src/Elasticsearch/Endpoints/Indices/DiskUsage.php
+++ /dev/null
@@ -1,57 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_disk_usage";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.disk_usage');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'run_expensive_tasks',
- 'flush',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Exists.php b/src/Elasticsearch/Endpoints/Indices/Exists.php
deleted file mode 100644
index 939167c12..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Exists.php
+++ /dev/null
@@ -1,58 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.exists');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'local',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'flat_settings',
- 'include_defaults'
- ];
- }
-
- public function getMethod(): string
- {
- return 'HEAD';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php b/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php
deleted file mode 100644
index f78ce6272..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php
+++ /dev/null
@@ -1,76 +0,0 @@
-name) !== true) {
- throw new RuntimeException(
- 'name is required for exists_alias'
- );
- }
- $name = $this->name;
- $index = $this->index ?? null;
-
- if (isset($index)) {
- return "/$index/_alias/$name";
- }
- return "/_alias/$name";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'HEAD';
- }
-
- public function setName($name): ExistsAlias
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ExistsIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/ExistsIndexTemplate.php
deleted file mode 100644
index 00604c9b1..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ExistsIndexTemplate.php
+++ /dev/null
@@ -1,66 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_index_template/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.exists_index_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'flat_settings',
- 'master_timeout',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'HEAD';
- }
-
- public function setName($name): ExistsIndexTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php b/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php
deleted file mode 100644
index 9c43c9f40..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php
+++ /dev/null
@@ -1,69 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_template/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.exists_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'flat_settings',
- 'master_timeout',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'HEAD';
- }
-
- public function setName($name): ExistsTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ExistsType.php b/src/Elasticsearch/Endpoints/Indices/ExistsType.php
deleted file mode 100644
index 4cb7d930c..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ExistsType.php
+++ /dev/null
@@ -1,60 +0,0 @@
-index ?? null;
- $type = $this->type ?? null;
- if (isset($type)) {
- @trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
- }
-
- if (isset($index) && isset($type)) {
- return "/$index/_mapping/$type";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.exists_type');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'HEAD';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/FieldUsageStats.php b/src/Elasticsearch/Endpoints/Indices/FieldUsageStats.php
deleted file mode 100644
index 09ba56c27..000000000
--- a/src/Elasticsearch/Endpoints/Indices/FieldUsageStats.php
+++ /dev/null
@@ -1,56 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_field_usage_stats";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.field_usage_stats');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'fields',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Flush.php b/src/Elasticsearch/Endpoints/Indices/Flush.php
deleted file mode 100644
index db2d295be..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Flush.php
+++ /dev/null
@@ -1,56 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_flush";
- }
- return "/_flush";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'force',
- 'wait_if_ongoing',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ForceMerge.php b/src/Elasticsearch/Endpoints/Indices/ForceMerge.php
deleted file mode 100644
index 0c0b08e49..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ForceMerge.php
+++ /dev/null
@@ -1,57 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_forcemerge";
- }
- return "/_forcemerge";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'flush',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'max_num_segments',
- 'only_expunge_deletes'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Freeze.php b/src/Elasticsearch/Endpoints/Indices/Freeze.php
deleted file mode 100644
index bd9be2806..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Freeze.php
+++ /dev/null
@@ -1,58 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_freeze";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.freeze');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'wait_for_active_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Get.php b/src/Elasticsearch/Endpoints/Indices/Get.php
deleted file mode 100644
index c7b072421..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Get.php
+++ /dev/null
@@ -1,59 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.get');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'local',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'flat_settings',
- 'include_defaults',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/GetAlias.php b/src/Elasticsearch/Endpoints/Indices/GetAlias.php
deleted file mode 100644
index fbf973bd6..000000000
--- a/src/Elasticsearch/Endpoints/Indices/GetAlias.php
+++ /dev/null
@@ -1,76 +0,0 @@
-name ?? null;
- $index = $this->index ?? null;
-
- if (isset($index) && isset($name)) {
- return "/$index/_alias/$name";
- }
- if (isset($index)) {
- return "/$index/_alias";
- }
- if (isset($name)) {
- return "/_alias/$name";
- }
- return "/_alias";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetAlias
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/GetDataStream.php b/src/Elasticsearch/Endpoints/Indices/GetDataStream.php
deleted file mode 100644
index c527ddf98..000000000
--- a/src/Elasticsearch/Endpoints/Indices/GetDataStream.php
+++ /dev/null
@@ -1,66 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_data_stream/$name";
- }
- return "/_data_stream";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetDataStream
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php b/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php
deleted file mode 100644
index 04b1c9649..000000000
--- a/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php
+++ /dev/null
@@ -1,77 +0,0 @@
-fields) !== true) {
- throw new RuntimeException(
- 'fields is required for get_field_mapping'
- );
- }
- $fields = $this->fields;
- $index = $this->index ?? null;
-
- if (isset($index)) {
- return "/$index/_mapping/field/$fields";
- }
- return "/_mapping/field/$fields";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'include_defaults',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setFields($fields): GetFieldMapping
- {
- if (isset($fields) !== true) {
- return $this;
- }
- if (is_array($fields) === true) {
- $fields = implode(",", $fields);
- }
- $this->fields = $fields;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/GetIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/GetIndexTemplate.php
deleted file mode 100644
index 5b3774a1d..000000000
--- a/src/Elasticsearch/Endpoints/Indices/GetIndexTemplate.php
+++ /dev/null
@@ -1,65 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_index_template/$name";
- }
- return "/_index_template";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'flat_settings',
- 'master_timeout',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetIndexTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/GetMapping.php b/src/Elasticsearch/Endpoints/Indices/GetMapping.php
deleted file mode 100644
index 18e2a2943..000000000
--- a/src/Elasticsearch/Endpoints/Indices/GetMapping.php
+++ /dev/null
@@ -1,56 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_mapping";
- }
- return "/_mapping";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'master_timeout',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/GetSettings.php b/src/Elasticsearch/Endpoints/Indices/GetSettings.php
deleted file mode 100644
index eabd4a242..000000000
--- a/src/Elasticsearch/Endpoints/Indices/GetSettings.php
+++ /dev/null
@@ -1,79 +0,0 @@
-index ?? null;
- $name = $this->name ?? null;
-
- if (isset($index) && isset($name)) {
- return "/$index/_settings/$name";
- }
- if (isset($index)) {
- return "/$index/_settings";
- }
- if (isset($name)) {
- return "/_settings/$name";
- }
- return "/_settings";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'flat_settings',
- 'local',
- 'include_defaults'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetSettings
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/GetTemplate.php b/src/Elasticsearch/Endpoints/Indices/GetTemplate.php
deleted file mode 100644
index f39899c7c..000000000
--- a/src/Elasticsearch/Endpoints/Indices/GetTemplate.php
+++ /dev/null
@@ -1,68 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_template/$name";
- }
- return "/_template";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'flat_settings',
- 'master_timeout',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/MigrateToDataStream.php b/src/Elasticsearch/Endpoints/Indices/MigrateToDataStream.php
deleted file mode 100644
index 2ea47b888..000000000
--- a/src/Elasticsearch/Endpoints/Indices/MigrateToDataStream.php
+++ /dev/null
@@ -1,64 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_data_stream/_migrate/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.migrate_to_data_stream');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setName($name): MigrateToDataStream
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ModifyDataStream.php b/src/Elasticsearch/Endpoints/Indices/ModifyDataStream.php
deleted file mode 100644
index ffa75fab9..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ModifyDataStream.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Open.php b/src/Elasticsearch/Endpoints/Indices/Open.php
deleted file mode 100644
index 28643283b..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Open.php
+++ /dev/null
@@ -1,58 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_open";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.open');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'wait_for_active_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/PromoteDataStream.php b/src/Elasticsearch/Endpoints/Indices/PromoteDataStream.php
deleted file mode 100644
index 13c29027f..000000000
--- a/src/Elasticsearch/Endpoints/Indices/PromoteDataStream.php
+++ /dev/null
@@ -1,64 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_data_stream/_promote/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.promote_data_stream');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setName($name): PromoteDataStream
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/PutAlias.php b/src/Elasticsearch/Endpoints/Indices/PutAlias.php
deleted file mode 100644
index b96fd2dab..000000000
--- a/src/Elasticsearch/Endpoints/Indices/PutAlias.php
+++ /dev/null
@@ -1,83 +0,0 @@
-index) !== true) {
- throw new RuntimeException(
- 'index is required for put_alias'
- );
- }
- $index = $this->index;
- if (isset($this->name) !== true) {
- throw new RuntimeException(
- 'name is required for put_alias'
- );
- }
- $name = $this->name;
-
- return "/$index/_alias/$name";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutAlias
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): PutAlias
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/PutIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/PutIndexTemplate.php
deleted file mode 100644
index 00d2f6664..000000000
--- a/src/Elasticsearch/Endpoints/Indices/PutIndexTemplate.php
+++ /dev/null
@@ -1,76 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_index_template/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.put_index_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'create',
- 'cause',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutIndexTemplate
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): PutIndexTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/PutMapping.php b/src/Elasticsearch/Endpoints/Indices/PutMapping.php
deleted file mode 100644
index 3a85d7dc5..000000000
--- a/src/Elasticsearch/Endpoints/Indices/PutMapping.php
+++ /dev/null
@@ -1,68 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_mapping";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.put_mapping');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'write_index_only'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutMapping
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/PutSettings.php b/src/Elasticsearch/Endpoints/Indices/PutSettings.php
deleted file mode 100644
index 5c92faa0d..000000000
--- a/src/Elasticsearch/Endpoints/Indices/PutSettings.php
+++ /dev/null
@@ -1,68 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_settings";
- }
- return "/_settings";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'timeout',
- 'preserve_existing',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'flat_settings'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutSettings
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/PutTemplate.php b/src/Elasticsearch/Endpoints/Indices/PutTemplate.php
deleted file mode 100644
index e5cade537..000000000
--- a/src/Elasticsearch/Endpoints/Indices/PutTemplate.php
+++ /dev/null
@@ -1,76 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_template/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.put_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'order',
- 'create',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutTemplate
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): PutTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Recovery.php b/src/Elasticsearch/Endpoints/Indices/Recovery.php
deleted file mode 100644
index 98afaabe5..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Recovery.php
+++ /dev/null
@@ -1,53 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_recovery";
- }
- return "/_recovery";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'detailed',
- 'active_only'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Refresh.php b/src/Elasticsearch/Endpoints/Indices/Refresh.php
deleted file mode 100644
index 5dd5f1cad..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Refresh.php
+++ /dev/null
@@ -1,54 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_refresh";
- }
- return "/_refresh";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ReloadSearchAnalyzers.php b/src/Elasticsearch/Endpoints/Indices/ReloadSearchAnalyzers.php
deleted file mode 100644
index 0c10f8944..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ReloadSearchAnalyzers.php
+++ /dev/null
@@ -1,55 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_reload_search_analyzers";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.reload_search_analyzers');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ResolveIndex.php b/src/Elasticsearch/Endpoints/Indices/ResolveIndex.php
deleted file mode 100644
index 27b8c6964..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ResolveIndex.php
+++ /dev/null
@@ -1,67 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_resolve/index/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.resolve_index');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): ResolveIndex
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Rollover.php b/src/Elasticsearch/Endpoints/Indices/Rollover.php
deleted file mode 100644
index ba27c359c..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Rollover.php
+++ /dev/null
@@ -1,94 +0,0 @@
-alias) !== true) {
- throw new RuntimeException(
- 'alias is required for rollover'
- );
- }
- $alias = $this->alias;
- $new_index = $this->new_index ?? null;
-
- if (isset($new_index)) {
- return "/$alias/_rollover/$new_index";
- }
- return "/$alias/_rollover";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'dry_run',
- 'master_timeout',
- 'wait_for_active_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): Rollover
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setAlias($alias): Rollover
- {
- if (isset($alias) !== true) {
- return $this;
- }
- $this->alias = $alias;
-
- return $this;
- }
-
- public function setNewIndex($new_index): Rollover
- {
- if (isset($new_index) !== true) {
- return $this;
- }
- $this->new_index = $new_index;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Segments.php b/src/Elasticsearch/Endpoints/Indices/Segments.php
deleted file mode 100644
index 7cd78ebfe..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Segments.php
+++ /dev/null
@@ -1,55 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_segments";
- }
- return "/_segments";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'verbose'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ShardStores.php b/src/Elasticsearch/Endpoints/Indices/ShardStores.php
deleted file mode 100644
index fdf61b910..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ShardStores.php
+++ /dev/null
@@ -1,55 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_shard_stores";
- }
- return "/_shard_stores";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'status',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Shrink.php b/src/Elasticsearch/Endpoints/Indices/Shrink.php
deleted file mode 100644
index 165ca0716..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Shrink.php
+++ /dev/null
@@ -1,77 +0,0 @@
-index ?? null;
- $target = $this->target ?? null;
-
- if (isset($index) && isset($target)) {
- return "/$index/_shrink/$target";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.shrink');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'wait_for_active_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): Shrink
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setTarget($target): Shrink
- {
- if (isset($target) !== true) {
- return $this;
- }
- $this->target = $target;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/SimulateIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/SimulateIndexTemplate.php
deleted file mode 100644
index 63e2aa940..000000000
--- a/src/Elasticsearch/Endpoints/Indices/SimulateIndexTemplate.php
+++ /dev/null
@@ -1,76 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_index_template/_simulate_index/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.simulate_index_template');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'create',
- 'cause',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): SimulateIndexTemplate
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): SimulateIndexTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/SimulateTemplate.php b/src/Elasticsearch/Endpoints/Indices/SimulateTemplate.php
deleted file mode 100644
index 9019a0574..000000000
--- a/src/Elasticsearch/Endpoints/Indices/SimulateTemplate.php
+++ /dev/null
@@ -1,75 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_index_template/_simulate/$name";
- }
- return "/_index_template/_simulate";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'create',
- 'cause',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): SimulateTemplate
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): SimulateTemplate
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Split.php b/src/Elasticsearch/Endpoints/Indices/Split.php
deleted file mode 100644
index fca6dec0b..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Split.php
+++ /dev/null
@@ -1,77 +0,0 @@
-index ?? null;
- $target = $this->target ?? null;
-
- if (isset($index) && isset($target)) {
- return "/$index/_split/$target";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.split');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'wait_for_active_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): Split
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setTarget($target): Split
- {
- if (isset($target) !== true) {
- return $this;
- }
- $this->target = $target;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Stats.php b/src/Elasticsearch/Endpoints/Indices/Stats.php
deleted file mode 100644
index 98c3a8013..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Stats.php
+++ /dev/null
@@ -1,82 +0,0 @@
-metric ?? null;
- $index = $this->index ?? null;
-
- if (isset($index) && isset($metric)) {
- return "/$index/_stats/$metric";
- }
- if (isset($metric)) {
- return "/_stats/$metric";
- }
- if (isset($index)) {
- return "/$index/_stats";
- }
- return "/_stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'completion_fields',
- 'fielddata_fields',
- 'fields',
- 'groups',
- 'level',
- 'types',
- 'include_segment_file_sizes',
- 'include_unloaded_segments',
- 'expand_wildcards',
- 'forbid_closed_indices'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setMetric($metric): Stats
- {
- if (isset($metric) !== true) {
- return $this;
- }
- if (is_array($metric) === true) {
- $metric = implode(",", $metric);
- }
- $this->metric = $metric;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/Unfreeze.php b/src/Elasticsearch/Endpoints/Indices/Unfreeze.php
deleted file mode 100644
index 7cfc237fc..000000000
--- a/src/Elasticsearch/Endpoints/Indices/Unfreeze.php
+++ /dev/null
@@ -1,58 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_unfreeze";
- }
- throw new RuntimeException('Missing parameter for the endpoint indices.unfreeze');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'wait_for_active_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php b/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php
deleted file mode 100644
index be334e9b6..000000000
--- a/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php
+++ /dev/null
@@ -1,59 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php b/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php
deleted file mode 100644
index c95a7e7f6..000000000
--- a/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php
+++ /dev/null
@@ -1,80 +0,0 @@
-index ?? null;
- $type = $this->type ?? null;
- if (isset($type)) {
- @trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
- }
-
- if (isset($index) && isset($type)) {
- return "/$index/$type/_validate/query";
- }
- if (isset($index)) {
- return "/$index/_validate/query";
- }
- return "/_validate/query";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'explain',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'q',
- 'analyzer',
- 'analyze_wildcard',
- 'default_operator',
- 'df',
- 'lenient',
- 'rewrite',
- 'all_shards'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): ValidateQuery
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Info.php b/src/Elasticsearch/Endpoints/Info.php
deleted file mode 100644
index 208b995c6..000000000
--- a/src/Elasticsearch/Endpoints/Info.php
+++ /dev/null
@@ -1,48 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ingest/pipeline/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ingest.delete_pipeline');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ingest/GeoIpStats.php b/src/Elasticsearch/Endpoints/Ingest/GeoIpStats.php
deleted file mode 100644
index cd6475282..000000000
--- a/src/Elasticsearch/Endpoints/Ingest/GeoIpStats.php
+++ /dev/null
@@ -1,46 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ingest/pipeline/$id";
- }
- return "/_ingest/pipeline";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'summary',
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php b/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php
deleted file mode 100644
index fa8c381e2..000000000
--- a/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php
+++ /dev/null
@@ -1,48 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ingest/pipeline/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ingest.put_pipeline');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'if_version',
- 'master_timeout',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutPipeline
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ingest/Simulate.php b/src/Elasticsearch/Endpoints/Ingest/Simulate.php
deleted file mode 100644
index 23fade528..000000000
--- a/src/Elasticsearch/Endpoints/Ingest/Simulate.php
+++ /dev/null
@@ -1,62 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ingest/pipeline/$id/_simulate";
- }
- return "/_ingest/pipeline/_simulate";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'verbose'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Simulate
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/KnnSearch.php b/src/Elasticsearch/Endpoints/KnnSearch.php
deleted file mode 100644
index d3854eec4..000000000
--- a/src/Elasticsearch/Endpoints/KnnSearch.php
+++ /dev/null
@@ -1,63 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_knn_search";
- }
- throw new RuntimeException('Missing parameter for the endpoint knn_search');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'routing'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): KnnSearch
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/License/Delete.php b/src/Elasticsearch/Endpoints/License/Delete.php
deleted file mode 100644
index 0dab952f9..000000000
--- a/src/Elasticsearch/Endpoints/License/Delete.php
+++ /dev/null
@@ -1,46 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/License/PostStartBasic.php b/src/Elasticsearch/Endpoints/License/PostStartBasic.php
deleted file mode 100644
index 0d9e99609..000000000
--- a/src/Elasticsearch/Endpoints/License/PostStartBasic.php
+++ /dev/null
@@ -1,48 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_logstash/pipeline/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint logstash.delete_pipeline');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Logstash/GetPipeline.php b/src/Elasticsearch/Endpoints/Logstash/GetPipeline.php
deleted file mode 100644
index 0cf10776e..000000000
--- a/src/Elasticsearch/Endpoints/Logstash/GetPipeline.php
+++ /dev/null
@@ -1,53 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_logstash/pipeline/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint logstash.get_pipeline');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Logstash/PutPipeline.php b/src/Elasticsearch/Endpoints/Logstash/PutPipeline.php
deleted file mode 100644
index ed6accf9f..000000000
--- a/src/Elasticsearch/Endpoints/Logstash/PutPipeline.php
+++ /dev/null
@@ -1,63 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_logstash/pipeline/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint logstash.put_pipeline');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutPipeline
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/MTermVectors.php b/src/Elasticsearch/Endpoints/MTermVectors.php
deleted file mode 100644
index 4da3dfa4a..000000000
--- a/src/Elasticsearch/Endpoints/MTermVectors.php
+++ /dev/null
@@ -1,73 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_mtermvectors";
- }
- return "/_mtermvectors";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ids',
- 'term_statistics',
- 'field_statistics',
- 'fields',
- 'offsets',
- 'positions',
- 'payloads',
- 'preference',
- 'routing',
- 'realtime',
- 'version',
- 'version_type'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): MTermVectors
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Mget.php b/src/Elasticsearch/Endpoints/Mget.php
deleted file mode 100644
index 9e59b4c06..000000000
--- a/src/Elasticsearch/Endpoints/Mget.php
+++ /dev/null
@@ -1,69 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_mget";
- }
- return "/_mget";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'stored_fields',
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Mget
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Migration/Deprecations.php b/src/Elasticsearch/Endpoints/Migration/Deprecations.php
deleted file mode 100644
index 8fbc49f13..000000000
--- a/src/Elasticsearch/Endpoints/Migration/Deprecations.php
+++ /dev/null
@@ -1,52 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_migration/deprecations";
- }
- return "/_migration/deprecations";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Migration/GetFeatureUpgradeStatus.php b/src/Elasticsearch/Endpoints/Migration/GetFeatureUpgradeStatus.php
deleted file mode 100644
index c38caebc3..000000000
--- a/src/Elasticsearch/Endpoints/Migration/GetFeatureUpgradeStatus.php
+++ /dev/null
@@ -1,48 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/_close";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.close_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'allow_no_jobs',
- 'force',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): CloseJob
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): CloseJob
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteCalendar.php b/src/Elasticsearch/Endpoints/Ml/DeleteCalendar.php
deleted file mode 100644
index c96246ba9..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteCalendar.php
+++ /dev/null
@@ -1,62 +0,0 @@
-calendar_id ?? null;
-
- if (isset($calendar_id)) {
- return "/_ml/calendars/$calendar_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_calendar');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setCalendarId($calendar_id): DeleteCalendar
- {
- if (isset($calendar_id) !== true) {
- return $this;
- }
- $this->calendar_id = $calendar_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteCalendarEvent.php b/src/Elasticsearch/Endpoints/Ml/DeleteCalendarEvent.php
deleted file mode 100644
index 179311185..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteCalendarEvent.php
+++ /dev/null
@@ -1,74 +0,0 @@
-calendar_id ?? null;
- $event_id = $this->event_id ?? null;
-
- if (isset($calendar_id) && isset($event_id)) {
- return "/_ml/calendars/$calendar_id/events/$event_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_calendar_event');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setCalendarId($calendar_id): DeleteCalendarEvent
- {
- if (isset($calendar_id) !== true) {
- return $this;
- }
- $this->calendar_id = $calendar_id;
-
- return $this;
- }
-
- public function setEventId($event_id): DeleteCalendarEvent
- {
- if (isset($event_id) !== true) {
- return $this;
- }
- $this->event_id = $event_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteCalendarJob.php b/src/Elasticsearch/Endpoints/Ml/DeleteCalendarJob.php
deleted file mode 100644
index 2b77de83d..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteCalendarJob.php
+++ /dev/null
@@ -1,74 +0,0 @@
-calendar_id ?? null;
- $job_id = $this->job_id ?? null;
-
- if (isset($calendar_id) && isset($job_id)) {
- return "/_ml/calendars/$calendar_id/jobs/$job_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_calendar_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setCalendarId($calendar_id): DeleteCalendarJob
- {
- if (isset($calendar_id) !== true) {
- return $this;
- }
- $this->calendar_id = $calendar_id;
-
- return $this;
- }
-
- public function setJobId($job_id): DeleteCalendarJob
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/DeleteDataFrameAnalytics.php
deleted file mode 100644
index 2a4a50fc7..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteDataFrameAnalytics.php
+++ /dev/null
@@ -1,54 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ml/data_frame/analytics/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_data_frame_analytics');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'force',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteDatafeed.php b/src/Elasticsearch/Endpoints/Ml/DeleteDatafeed.php
deleted file mode 100644
index 7d5de9eaf..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteDatafeed.php
+++ /dev/null
@@ -1,64 +0,0 @@
-datafeed_id ?? null;
-
- if (isset($datafeed_id)) {
- return "/_ml/datafeeds/$datafeed_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_datafeed');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'force'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setDatafeedId($datafeed_id): DeleteDatafeed
- {
- if (isset($datafeed_id) !== true) {
- return $this;
- }
- $this->datafeed_id = $datafeed_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteExpiredData.php b/src/Elasticsearch/Endpoints/Ml/DeleteExpiredData.php
deleted file mode 100644
index bb296fe02..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteExpiredData.php
+++ /dev/null
@@ -1,74 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/_delete_expired_data/$job_id";
- }
- return "/_ml/_delete_expired_data";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'requests_per_second',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setBody($body): DeleteExpiredData
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): DeleteExpiredData
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteFilter.php b/src/Elasticsearch/Endpoints/Ml/DeleteFilter.php
deleted file mode 100644
index 8ba815f2e..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteFilter.php
+++ /dev/null
@@ -1,62 +0,0 @@
-filter_id ?? null;
-
- if (isset($filter_id)) {
- return "/_ml/filters/$filter_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_filter');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setFilterId($filter_id): DeleteFilter
- {
- if (isset($filter_id) !== true) {
- return $this;
- }
- $this->filter_id = $filter_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteForecast.php b/src/Elasticsearch/Endpoints/Ml/DeleteForecast.php
deleted file mode 100644
index efe9d76d4..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteForecast.php
+++ /dev/null
@@ -1,82 +0,0 @@
-job_id) !== true) {
- throw new RuntimeException(
- 'job_id is required for delete_forecast'
- );
- }
- $job_id = $this->job_id;
- $forecast_id = $this->forecast_id ?? null;
-
- if (isset($forecast_id)) {
- return "/_ml/anomaly_detectors/$job_id/_forecast/$forecast_id";
- }
- return "/_ml/anomaly_detectors/$job_id/_forecast";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_forecasts',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setJobId($job_id): DeleteForecast
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-
- public function setForecastId($forecast_id): DeleteForecast
- {
- if (isset($forecast_id) !== true) {
- return $this;
- }
- $this->forecast_id = $forecast_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteJob.php b/src/Elasticsearch/Endpoints/Ml/DeleteJob.php
deleted file mode 100644
index f310db2cc..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteJob.php
+++ /dev/null
@@ -1,65 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'force',
- 'wait_for_completion'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setJobId($job_id): DeleteJob
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteModelSnapshot.php b/src/Elasticsearch/Endpoints/Ml/DeleteModelSnapshot.php
deleted file mode 100644
index a2e3835ab..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteModelSnapshot.php
+++ /dev/null
@@ -1,74 +0,0 @@
-job_id ?? null;
- $snapshot_id = $this->snapshot_id ?? null;
-
- if (isset($job_id) && isset($snapshot_id)) {
- return "/_ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_model_snapshot');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setJobId($job_id): DeleteModelSnapshot
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-
- public function setSnapshotId($snapshot_id): DeleteModelSnapshot
- {
- if (isset($snapshot_id) !== true) {
- return $this;
- }
- $this->snapshot_id = $snapshot_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteTrainedModel.php b/src/Elasticsearch/Endpoints/Ml/DeleteTrainedModel.php
deleted file mode 100644
index 40fac75cb..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteTrainedModel.php
+++ /dev/null
@@ -1,62 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_ml/trained_models/$model_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_trained_model');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setModelId($model_id): DeleteTrainedModel
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/DeleteTrainedModelAlias.php b/src/Elasticsearch/Endpoints/Ml/DeleteTrainedModelAlias.php
deleted file mode 100644
index 54b1877bd..000000000
--- a/src/Elasticsearch/Endpoints/Ml/DeleteTrainedModelAlias.php
+++ /dev/null
@@ -1,74 +0,0 @@
-model_alias ?? null;
- $model_id = $this->model_id ?? null;
-
- if (isset($model_id) && isset($model_alias)) {
- return "/_ml/trained_models/$model_id/model_aliases/$model_alias";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.delete_trained_model_alias');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setModelAlias($model_alias): DeleteTrainedModelAlias
- {
- if (isset($model_alias) !== true) {
- return $this;
- }
- $this->model_alias = $model_alias;
-
- return $this;
- }
-
- public function setModelId($model_id): DeleteTrainedModelAlias
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/EstimateModelMemory.php b/src/Elasticsearch/Endpoints/Ml/EstimateModelMemory.php
deleted file mode 100644
index 8f48d6c1f..000000000
--- a/src/Elasticsearch/Endpoints/Ml/EstimateModelMemory.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/EvaluateDataFrame.php b/src/Elasticsearch/Endpoints/Ml/EvaluateDataFrame.php
deleted file mode 100644
index 0673e993d..000000000
--- a/src/Elasticsearch/Endpoints/Ml/EvaluateDataFrame.php
+++ /dev/null
@@ -1,56 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/ExplainDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/ExplainDataFrameAnalytics.php
deleted file mode 100644
index d8bad6462..000000000
--- a/src/Elasticsearch/Endpoints/Ml/ExplainDataFrameAnalytics.php
+++ /dev/null
@@ -1,60 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ml/data_frame/analytics/$id/_explain";
- }
- return "/_ml/data_frame/analytics/_explain";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): ExplainDataFrameAnalytics
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/FlushJob.php b/src/Elasticsearch/Endpoints/Ml/FlushJob.php
deleted file mode 100644
index 19acd6922..000000000
--- a/src/Elasticsearch/Endpoints/Ml/FlushJob.php
+++ /dev/null
@@ -1,78 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/_flush";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.flush_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'calc_interim',
- 'start',
- 'end',
- 'advance_time',
- 'skip_time'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): FlushJob
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): FlushJob
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/Forecast.php b/src/Elasticsearch/Endpoints/Ml/Forecast.php
deleted file mode 100644
index 8cba119d5..000000000
--- a/src/Elasticsearch/Endpoints/Ml/Forecast.php
+++ /dev/null
@@ -1,66 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/_forecast";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.forecast');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'duration',
- 'expires_in',
- 'max_model_memory'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setJobId($job_id): Forecast
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetBuckets.php b/src/Elasticsearch/Endpoints/Ml/GetBuckets.php
deleted file mode 100644
index cba1ae8a7..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetBuckets.php
+++ /dev/null
@@ -1,99 +0,0 @@
-job_id) !== true) {
- throw new RuntimeException(
- 'job_id is required for get_buckets'
- );
- }
- $job_id = $this->job_id;
- $timestamp = $this->timestamp ?? null;
-
- if (isset($timestamp)) {
- return "/_ml/anomaly_detectors/$job_id/results/buckets/$timestamp";
- }
- return "/_ml/anomaly_detectors/$job_id/results/buckets";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'expand',
- 'exclude_interim',
- 'from',
- 'size',
- 'start',
- 'end',
- 'anomaly_score',
- 'sort',
- 'desc'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): GetBuckets
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): GetBuckets
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-
- public function setTimestamp($timestamp): GetBuckets
- {
- if (isset($timestamp) !== true) {
- return $this;
- }
- $this->timestamp = $timestamp;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php b/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php
deleted file mode 100644
index 313b6b7ee..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php
+++ /dev/null
@@ -1,68 +0,0 @@
-calendar_id ?? null;
-
- if (isset($calendar_id)) {
- return "/_ml/calendars/$calendar_id/events";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.get_calendar_events');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'job_id',
- 'start',
- 'end',
- 'from',
- 'size'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setCalendarId($calendar_id): GetCalendarEvents
- {
- if (isset($calendar_id) !== true) {
- return $this;
- }
- $this->calendar_id = $calendar_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetCalendars.php b/src/Elasticsearch/Endpoints/Ml/GetCalendars.php
deleted file mode 100644
index 1bbd479cf..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetCalendars.php
+++ /dev/null
@@ -1,74 +0,0 @@
-calendar_id ?? null;
-
- if (isset($calendar_id)) {
- return "/_ml/calendars/$calendar_id";
- }
- return "/_ml/calendars";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'from',
- 'size'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): GetCalendars
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setCalendarId($calendar_id): GetCalendars
- {
- if (isset($calendar_id) !== true) {
- return $this;
- }
- $this->calendar_id = $calendar_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetCategories.php b/src/Elasticsearch/Endpoints/Ml/GetCategories.php
deleted file mode 100644
index 42a2d9948..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetCategories.php
+++ /dev/null
@@ -1,93 +0,0 @@
-job_id) !== true) {
- throw new RuntimeException(
- 'job_id is required for get_categories'
- );
- }
- $job_id = $this->job_id;
- $category_id = $this->category_id ?? null;
-
- if (isset($category_id)) {
- return "/_ml/anomaly_detectors/$job_id/results/categories/$category_id";
- }
- return "/_ml/anomaly_detectors/$job_id/results/categories/";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'from',
- 'size',
- 'partition_field_value'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): GetCategories
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): GetCategories
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-
- public function setCategoryId($category_id): GetCategories
- {
- if (isset($category_id) !== true) {
- return $this;
- }
- $this->category_id = $category_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalytics.php
deleted file mode 100644
index 15f5f3360..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalytics.php
+++ /dev/null
@@ -1,55 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ml/data_frame/analytics/$id";
- }
- return "/_ml/data_frame/analytics";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'from',
- 'size',
- 'exclude_generated'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalyticsStats.php b/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalyticsStats.php
deleted file mode 100644
index 7d0b69cfd..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalyticsStats.php
+++ /dev/null
@@ -1,55 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ml/data_frame/analytics/$id/_stats";
- }
- return "/_ml/data_frame/analytics/_stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'from',
- 'size',
- 'verbose'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php b/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php
deleted file mode 100644
index 0d0f9fae9..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php
+++ /dev/null
@@ -1,64 +0,0 @@
-datafeed_id ?? null;
-
- if (isset($datafeed_id)) {
- return "/_ml/datafeeds/$datafeed_id/_stats";
- }
- return "/_ml/datafeeds/_stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'allow_no_datafeeds'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setDatafeedId($datafeed_id): GetDatafeedStats
- {
- if (isset($datafeed_id) !== true) {
- return $this;
- }
- $this->datafeed_id = $datafeed_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php b/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php
deleted file mode 100644
index bf689aecc..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php
+++ /dev/null
@@ -1,65 +0,0 @@
-datafeed_id ?? null;
-
- if (isset($datafeed_id)) {
- return "/_ml/datafeeds/$datafeed_id";
- }
- return "/_ml/datafeeds";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'allow_no_datafeeds',
- 'exclude_generated'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setDatafeedId($datafeed_id): GetDatafeeds
- {
- if (isset($datafeed_id) !== true) {
- return $this;
- }
- $this->datafeed_id = $datafeed_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetFilters.php b/src/Elasticsearch/Endpoints/Ml/GetFilters.php
deleted file mode 100644
index 56dc12048..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetFilters.php
+++ /dev/null
@@ -1,64 +0,0 @@
-filter_id ?? null;
-
- if (isset($filter_id)) {
- return "/_ml/filters/$filter_id";
- }
- return "/_ml/filters";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'from',
- 'size'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setFilterId($filter_id): GetFilters
- {
- if (isset($filter_id) !== true) {
- return $this;
- }
- $this->filter_id = $filter_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php b/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php
deleted file mode 100644
index ea6f273df..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php
+++ /dev/null
@@ -1,81 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/results/influencers";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.get_influencers');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'exclude_interim',
- 'from',
- 'size',
- 'start',
- 'end',
- 'influencer_score',
- 'sort',
- 'desc'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): GetInfluencers
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): GetInfluencers
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetJobStats.php b/src/Elasticsearch/Endpoints/Ml/GetJobStats.php
deleted file mode 100644
index dba42070a..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetJobStats.php
+++ /dev/null
@@ -1,64 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/_stats";
- }
- return "/_ml/anomaly_detectors/_stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'allow_no_jobs'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setJobId($job_id): GetJobStats
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetJobs.php b/src/Elasticsearch/Endpoints/Ml/GetJobs.php
deleted file mode 100644
index b206f54a4..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetJobs.php
+++ /dev/null
@@ -1,65 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id";
- }
- return "/_ml/anomaly_detectors";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'allow_no_jobs',
- 'exclude_generated'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setJobId($job_id): GetJobs
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php b/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php
deleted file mode 100644
index 53f0ed82d..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php
+++ /dev/null
@@ -1,96 +0,0 @@
-job_id) !== true) {
- throw new RuntimeException(
- 'job_id is required for get_model_snapshots'
- );
- }
- $job_id = $this->job_id;
- $snapshot_id = $this->snapshot_id ?? null;
-
- if (isset($snapshot_id)) {
- return "/_ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id";
- }
- return "/_ml/anomaly_detectors/$job_id/model_snapshots";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'from',
- 'size',
- 'start',
- 'end',
- 'sort',
- 'desc'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): GetModelSnapshots
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): GetModelSnapshots
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-
- public function setSnapshotId($snapshot_id): GetModelSnapshots
- {
- if (isset($snapshot_id) !== true) {
- return $this;
- }
- $this->snapshot_id = $snapshot_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php b/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php
deleted file mode 100644
index cfd297735..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php
+++ /dev/null
@@ -1,81 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/results/overall_buckets";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.get_overall_buckets');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'top_n',
- 'bucket_span',
- 'overall_score',
- 'exclude_interim',
- 'start',
- 'end',
- 'allow_no_match',
- 'allow_no_jobs'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): GetOverallBuckets
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): GetOverallBuckets
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetRecords.php b/src/Elasticsearch/Endpoints/Ml/GetRecords.php
deleted file mode 100644
index d001daa4c..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetRecords.php
+++ /dev/null
@@ -1,81 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/results/records";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.get_records');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'exclude_interim',
- 'from',
- 'size',
- 'start',
- 'end',
- 'record_score',
- 'sort',
- 'desc'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): GetRecords
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): GetRecords
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetTrainedModelDeploymentStats.php b/src/Elasticsearch/Endpoints/Ml/GetTrainedModelDeploymentStats.php
deleted file mode 100644
index 877e2397a..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetTrainedModelDeploymentStats.php
+++ /dev/null
@@ -1,62 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_ml/trained_models/$model_id/deployment/_stats";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.get_trained_model_deployment_stats');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setModelId($model_id): GetTrainedModelDeploymentStats
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetTrainedModels.php b/src/Elasticsearch/Endpoints/Ml/GetTrainedModels.php
deleted file mode 100644
index f58c767b1..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetTrainedModels.php
+++ /dev/null
@@ -1,70 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_ml/trained_models/$model_id";
- }
- return "/_ml/trained_models";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'include',
- 'include_model_definition',
- 'decompress_definition',
- 'from',
- 'size',
- 'tags',
- 'exclude_generated'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setModelId($model_id): GetTrainedModels
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/GetTrainedModelsStats.php b/src/Elasticsearch/Endpoints/Ml/GetTrainedModelsStats.php
deleted file mode 100644
index 3e9cf5763..000000000
--- a/src/Elasticsearch/Endpoints/Ml/GetTrainedModelsStats.php
+++ /dev/null
@@ -1,65 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_ml/trained_models/$model_id/_stats";
- }
- return "/_ml/trained_models/_stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'from',
- 'size'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setModelId($model_id): GetTrainedModelsStats
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/InferTrainedModelDeployment.php b/src/Elasticsearch/Endpoints/Ml/InferTrainedModelDeployment.php
deleted file mode 100644
index 316f0edcc..000000000
--- a/src/Elasticsearch/Endpoints/Ml/InferTrainedModelDeployment.php
+++ /dev/null
@@ -1,74 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_ml/trained_models/$model_id/deployment/_infer";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.infer_trained_model_deployment');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): InferTrainedModelDeployment
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setModelId($model_id): InferTrainedModelDeployment
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/Info.php b/src/Elasticsearch/Endpoints/Ml/Info.php
deleted file mode 100644
index 15f1f8ac6..000000000
--- a/src/Elasticsearch/Endpoints/Ml/Info.php
+++ /dev/null
@@ -1,46 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/_open";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.open_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setJobId($job_id): OpenJob
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php b/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php
deleted file mode 100644
index 991d50799..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php
+++ /dev/null
@@ -1,72 +0,0 @@
-calendar_id ?? null;
-
- if (isset($calendar_id)) {
- return "/_ml/calendars/$calendar_id/events";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.post_calendar_events');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): PostCalendarEvents
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setCalendarId($calendar_id): PostCalendarEvents
- {
- if (isset($calendar_id) !== true) {
- return $this;
- }
- $this->calendar_id = $calendar_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PostData.php b/src/Elasticsearch/Endpoints/Ml/PostData.php
deleted file mode 100644
index 4cd5446f0..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PostData.php
+++ /dev/null
@@ -1,93 +0,0 @@
-serializer = $serializer;
- }
-
- public function getURI(): string
- {
- $job_id = $this->job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/_data";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.post_data');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'reset_start',
- 'reset_end'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): PostData
- {
- if (isset($body) !== true) {
- return $this;
- }
- if (is_array($body) === true || $body instanceof Traversable) {
- foreach ($body as $item) {
- $this->body .= $this->serializer->serialize($item) . "\n";
- }
- } elseif (is_string($body)) {
- $this->body = $body;
- if (substr($body, -1) != "\n") {
- $this->body .= "\n";
- }
- } else {
- throw new InvalidArgumentException("Body must be an array, traversable object or string");
- }
- return $this;
- }
- public function setJobId($job_id): PostData
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PreviewDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/PreviewDataFrameAnalytics.php
deleted file mode 100644
index dfef9349c..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PreviewDataFrameAnalytics.php
+++ /dev/null
@@ -1,60 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ml/data_frame/analytics/$id/_preview";
- }
- return "/_ml/data_frame/analytics/_preview";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): PreviewDataFrameAnalytics
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php b/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php
deleted file mode 100644
index a5f1c6cd4..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php
+++ /dev/null
@@ -1,71 +0,0 @@
-datafeed_id ?? null;
-
- if (isset($datafeed_id)) {
- return "/_ml/datafeeds/$datafeed_id/_preview";
- }
- return "/_ml/datafeeds/_preview";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): PreviewDatafeed
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setDatafeedId($datafeed_id): PreviewDatafeed
- {
- if (isset($datafeed_id) !== true) {
- return $this;
- }
- $this->datafeed_id = $datafeed_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutCalendar.php b/src/Elasticsearch/Endpoints/Ml/PutCalendar.php
deleted file mode 100644
index 52db11afa..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutCalendar.php
+++ /dev/null
@@ -1,72 +0,0 @@
-calendar_id ?? null;
-
- if (isset($calendar_id)) {
- return "/_ml/calendars/$calendar_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_calendar');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutCalendar
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setCalendarId($calendar_id): PutCalendar
- {
- if (isset($calendar_id) !== true) {
- return $this;
- }
- $this->calendar_id = $calendar_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php b/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php
deleted file mode 100644
index af635b572..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php
+++ /dev/null
@@ -1,74 +0,0 @@
-calendar_id ?? null;
- $job_id = $this->job_id ?? null;
-
- if (isset($calendar_id) && isset($job_id)) {
- return "/_ml/calendars/$calendar_id/jobs/$job_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_calendar_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setCalendarId($calendar_id): PutCalendarJob
- {
- if (isset($calendar_id) !== true) {
- return $this;
- }
- $this->calendar_id = $calendar_id;
-
- return $this;
- }
-
- public function setJobId($job_id): PutCalendarJob
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/PutDataFrameAnalytics.php
deleted file mode 100644
index 9b80702f1..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutDataFrameAnalytics.php
+++ /dev/null
@@ -1,61 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ml/data_frame/analytics/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_data_frame_analytics');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutDataFrameAnalytics
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php b/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php
deleted file mode 100644
index 32fb095df..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php
+++ /dev/null
@@ -1,77 +0,0 @@
-datafeed_id ?? null;
-
- if (isset($datafeed_id)) {
- return "/_ml/datafeeds/$datafeed_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_datafeed');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'ignore_throttled',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutDatafeed
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setDatafeedId($datafeed_id): PutDatafeed
- {
- if (isset($datafeed_id) !== true) {
- return $this;
- }
- $this->datafeed_id = $datafeed_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutFilter.php b/src/Elasticsearch/Endpoints/Ml/PutFilter.php
deleted file mode 100644
index e39631b6b..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutFilter.php
+++ /dev/null
@@ -1,72 +0,0 @@
-filter_id ?? null;
-
- if (isset($filter_id)) {
- return "/_ml/filters/$filter_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_filter');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutFilter
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setFilterId($filter_id): PutFilter
- {
- if (isset($filter_id) !== true) {
- return $this;
- }
- $this->filter_id = $filter_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutJob.php b/src/Elasticsearch/Endpoints/Ml/PutJob.php
deleted file mode 100644
index 16eb8413e..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutJob.php
+++ /dev/null
@@ -1,77 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'ignore_throttled',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutJob
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): PutJob
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutTrainedModel.php b/src/Elasticsearch/Endpoints/Ml/PutTrainedModel.php
deleted file mode 100644
index d9770981c..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutTrainedModel.php
+++ /dev/null
@@ -1,74 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_ml/trained_models/$model_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_trained_model');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'defer_definition_decompression'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutTrainedModel
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setModelId($model_id): PutTrainedModel
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutTrainedModelAlias.php b/src/Elasticsearch/Endpoints/Ml/PutTrainedModelAlias.php
deleted file mode 100644
index 07ed073d8..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutTrainedModelAlias.php
+++ /dev/null
@@ -1,76 +0,0 @@
-model_alias ?? null;
- $model_id = $this->model_id ?? null;
-
- if (isset($model_id) && isset($model_alias)) {
- return "/_ml/trained_models/$model_id/model_aliases/$model_alias";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_trained_model_alias');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'reassign'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setModelAlias($model_alias): PutTrainedModelAlias
- {
- if (isset($model_alias) !== true) {
- return $this;
- }
- $this->model_alias = $model_alias;
-
- return $this;
- }
-
- public function setModelId($model_id): PutTrainedModelAlias
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutTrainedModelDefinitionPart.php b/src/Elasticsearch/Endpoints/Ml/PutTrainedModelDefinitionPart.php
deleted file mode 100644
index d9f09940b..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutTrainedModelDefinitionPart.php
+++ /dev/null
@@ -1,84 +0,0 @@
-model_id ?? null;
- $part = $this->part ?? null;
-
- if (isset($model_id) && isset($part)) {
- return "/_ml/trained_models/$model_id/definition/$part";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_trained_model_definition_part');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutTrainedModelDefinitionPart
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setModelId($model_id): PutTrainedModelDefinitionPart
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-
- public function setPart($part): PutTrainedModelDefinitionPart
- {
- if (isset($part) !== true) {
- return $this;
- }
- $this->part = $part;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/PutTrainedModelVocabulary.php b/src/Elasticsearch/Endpoints/Ml/PutTrainedModelVocabulary.php
deleted file mode 100644
index d095114d3..000000000
--- a/src/Elasticsearch/Endpoints/Ml/PutTrainedModelVocabulary.php
+++ /dev/null
@@ -1,72 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_ml/trained_models/$model_id/vocabulary";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.put_trained_model_vocabulary');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutTrainedModelVocabulary
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setModelId($model_id): PutTrainedModelVocabulary
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/ResetJob.php b/src/Elasticsearch/Endpoints/Ml/ResetJob.php
deleted file mode 100644
index 7d71c3e95..000000000
--- a/src/Elasticsearch/Endpoints/Ml/ResetJob.php
+++ /dev/null
@@ -1,64 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/_reset";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.reset_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_completion'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setJobId($job_id): ResetJob
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php b/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php
deleted file mode 100644
index d6ced82b3..000000000
--- a/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php
+++ /dev/null
@@ -1,86 +0,0 @@
-job_id ?? null;
- $snapshot_id = $this->snapshot_id ?? null;
-
- if (isset($job_id) && isset($snapshot_id)) {
- return "/_ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id/_revert";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.revert_model_snapshot');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'delete_intervening_results'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): RevertModelSnapshot
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): RevertModelSnapshot
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-
- public function setSnapshotId($snapshot_id): RevertModelSnapshot
- {
- if (isset($snapshot_id) !== true) {
- return $this;
- }
- $this->snapshot_id = $snapshot_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php b/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php
deleted file mode 100644
index 477d76b4f..000000000
--- a/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php
+++ /dev/null
@@ -1,49 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ml/data_frame/analytics/$id/_start";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.start_data_frame_analytics');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): StartDataFrameAnalytics
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/StartDatafeed.php b/src/Elasticsearch/Endpoints/Ml/StartDatafeed.php
deleted file mode 100644
index 9930a3a62..000000000
--- a/src/Elasticsearch/Endpoints/Ml/StartDatafeed.php
+++ /dev/null
@@ -1,76 +0,0 @@
-datafeed_id ?? null;
-
- if (isset($datafeed_id)) {
- return "/_ml/datafeeds/$datafeed_id/_start";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.start_datafeed');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'start',
- 'end',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): StartDatafeed
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setDatafeedId($datafeed_id): StartDatafeed
- {
- if (isset($datafeed_id) !== true) {
- return $this;
- }
- $this->datafeed_id = $datafeed_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/StartTrainedModelDeployment.php b/src/Elasticsearch/Endpoints/Ml/StartTrainedModelDeployment.php
deleted file mode 100644
index 358bd6178..000000000
--- a/src/Elasticsearch/Endpoints/Ml/StartTrainedModelDeployment.php
+++ /dev/null
@@ -1,65 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_ml/trained_models/$model_id/deployment/_start";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.start_trained_model_deployment');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'wait_for'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setModelId($model_id): StartTrainedModelDeployment
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/StopDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/StopDataFrameAnalytics.php
deleted file mode 100644
index a76401e45..000000000
--- a/src/Elasticsearch/Endpoints/Ml/StopDataFrameAnalytics.php
+++ /dev/null
@@ -1,65 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ml/data_frame/analytics/$id/_stop";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.stop_data_frame_analytics');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'force',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): StopDataFrameAnalytics
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php b/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php
deleted file mode 100644
index 5be53dc3f..000000000
--- a/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php
+++ /dev/null
@@ -1,77 +0,0 @@
-datafeed_id ?? null;
-
- if (isset($datafeed_id)) {
- return "/_ml/datafeeds/$datafeed_id/_stop";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.stop_datafeed');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'allow_no_match',
- 'allow_no_datafeeds',
- 'force',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): StopDatafeed
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setDatafeedId($datafeed_id): StopDatafeed
- {
- if (isset($datafeed_id) !== true) {
- return $this;
- }
- $this->datafeed_id = $datafeed_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/StopTrainedModelDeployment.php b/src/Elasticsearch/Endpoints/Ml/StopTrainedModelDeployment.php
deleted file mode 100644
index 48571801f..000000000
--- a/src/Elasticsearch/Endpoints/Ml/StopTrainedModelDeployment.php
+++ /dev/null
@@ -1,62 +0,0 @@
-model_id ?? null;
-
- if (isset($model_id)) {
- return "/_ml/trained_models/$model_id/deployment/_stop";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.stop_trained_model_deployment');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setModelId($model_id): StopTrainedModelDeployment
- {
- if (isset($model_id) !== true) {
- return $this;
- }
- $this->model_id = $model_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/UpdateDataFrameAnalytics.php
deleted file mode 100644
index 543aa4097..000000000
--- a/src/Elasticsearch/Endpoints/Ml/UpdateDataFrameAnalytics.php
+++ /dev/null
@@ -1,61 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_ml/data_frame/analytics/$id/_update";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.update_data_frame_analytics');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): UpdateDataFrameAnalytics
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php b/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php
deleted file mode 100644
index 0c88faca2..000000000
--- a/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php
+++ /dev/null
@@ -1,77 +0,0 @@
-datafeed_id ?? null;
-
- if (isset($datafeed_id)) {
- return "/_ml/datafeeds/$datafeed_id/_update";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.update_datafeed');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'ignore_throttled',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): UpdateDatafeed
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setDatafeedId($datafeed_id): UpdateDatafeed
- {
- if (isset($datafeed_id) !== true) {
- return $this;
- }
- $this->datafeed_id = $datafeed_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php b/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php
deleted file mode 100644
index 6ddc7432b..000000000
--- a/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php
+++ /dev/null
@@ -1,72 +0,0 @@
-filter_id ?? null;
-
- if (isset($filter_id)) {
- return "/_ml/filters/$filter_id/_update";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.update_filter');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): UpdateFilter
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setFilterId($filter_id): UpdateFilter
- {
- if (isset($filter_id) !== true) {
- return $this;
- }
- $this->filter_id = $filter_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateJob.php b/src/Elasticsearch/Endpoints/Ml/UpdateJob.php
deleted file mode 100644
index 09855a9c8..000000000
--- a/src/Elasticsearch/Endpoints/Ml/UpdateJob.php
+++ /dev/null
@@ -1,72 +0,0 @@
-job_id ?? null;
-
- if (isset($job_id)) {
- return "/_ml/anomaly_detectors/$job_id/_update";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.update_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): UpdateJob
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): UpdateJob
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php b/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php
deleted file mode 100644
index 4d58a8ee3..000000000
--- a/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php
+++ /dev/null
@@ -1,86 +0,0 @@
-job_id ?? null;
- $snapshot_id = $this->snapshot_id ?? null;
-
- if (isset($job_id) && isset($snapshot_id)) {
- return "/_ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id/_update";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.update_model_snapshot');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): UpdateModelSnapshot
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setJobId($job_id): UpdateModelSnapshot
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-
- public function setSnapshotId($snapshot_id): UpdateModelSnapshot
- {
- if (isset($snapshot_id) !== true) {
- return $this;
- }
- $this->snapshot_id = $snapshot_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/UpgradeJobSnapshot.php b/src/Elasticsearch/Endpoints/Ml/UpgradeJobSnapshot.php
deleted file mode 100644
index 08b356d81..000000000
--- a/src/Elasticsearch/Endpoints/Ml/UpgradeJobSnapshot.php
+++ /dev/null
@@ -1,77 +0,0 @@
-job_id ?? null;
- $snapshot_id = $this->snapshot_id ?? null;
-
- if (isset($job_id) && isset($snapshot_id)) {
- return "/_ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id/_upgrade";
- }
- throw new RuntimeException('Missing parameter for the endpoint ml.upgrade_job_snapshot');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'wait_for_completion'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setJobId($job_id): UpgradeJobSnapshot
- {
- if (isset($job_id) !== true) {
- return $this;
- }
- $this->job_id = $job_id;
-
- return $this;
- }
-
- public function setSnapshotId($snapshot_id): UpgradeJobSnapshot
- {
- if (isset($snapshot_id) !== true) {
- return $this;
- }
- $this->snapshot_id = $snapshot_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/Validate.php b/src/Elasticsearch/Endpoints/Ml/Validate.php
deleted file mode 100644
index 99a39af68..000000000
--- a/src/Elasticsearch/Endpoints/Ml/Validate.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php b/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php
deleted file mode 100644
index 334f74a9a..000000000
--- a/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Monitoring/Bulk.php b/src/Elasticsearch/Endpoints/Monitoring/Bulk.php
deleted file mode 100644
index 17ebecdd1..000000000
--- a/src/Elasticsearch/Endpoints/Monitoring/Bulk.php
+++ /dev/null
@@ -1,85 +0,0 @@
-serializer = $serializer;
- }
-
- public function getURI(): string
- {
- $type = $this->type ?? null;
- if (isset($type)) {
- @trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
- }
-
- if (isset($type)) {
- return "/_monitoring/$type/bulk";
- }
- return "/_monitoring/bulk";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'system_id',
- 'system_api_version',
- 'interval'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): Bulk
- {
- if (isset($body) !== true) {
- return $this;
- }
- if (is_array($body) === true || $body instanceof Traversable) {
- foreach ($body as $item) {
- $this->body .= $this->serializer->serialize($item) . "\n";
- }
- } elseif (is_string($body)) {
- $this->body = $body;
- if (substr($body, -1) != "\n") {
- $this->body .= "\n";
- }
- } else {
- throw new InvalidArgumentException("Body must be an array, traversable object or string");
- }
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Msearch.php b/src/Elasticsearch/Endpoints/Msearch.php
deleted file mode 100644
index a6ab9cea7..000000000
--- a/src/Elasticsearch/Endpoints/Msearch.php
+++ /dev/null
@@ -1,86 +0,0 @@
-serializer = $serializer;
- }
-
- public function getURI(): string
- {
- $index = $this->index ?? null;
-
- if (isset($index)) {
- return "/$index/_msearch";
- }
- return "/_msearch";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'search_type',
- 'max_concurrent_searches',
- 'typed_keys',
- 'pre_filter_shard_size',
- 'max_concurrent_shard_requests',
- 'rest_total_hits_as_int',
- 'ccs_minimize_roundtrips'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Msearch
- {
- if (isset($body) !== true) {
- return $this;
- }
- if (is_array($body) === true || $body instanceof Traversable) {
- foreach ($body as $item) {
- $this->body .= $this->serializer->serialize($item) . "\n";
- }
- } elseif (is_string($body)) {
- $this->body = $body;
- if (substr($body, -1) != "\n") {
- $this->body .= "\n";
- }
- } else {
- throw new InvalidArgumentException("Body must be an array, traversable object or string");
- }
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/MsearchTemplate.php b/src/Elasticsearch/Endpoints/MsearchTemplate.php
deleted file mode 100644
index 1c24608ed..000000000
--- a/src/Elasticsearch/Endpoints/MsearchTemplate.php
+++ /dev/null
@@ -1,84 +0,0 @@
-serializer = $serializer;
- }
-
- public function getURI(): string
- {
- $index = $this->index ?? null;
-
- if (isset($index)) {
- return "/$index/_msearch/template";
- }
- return "/_msearch/template";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'search_type',
- 'typed_keys',
- 'max_concurrent_searches',
- 'rest_total_hits_as_int',
- 'ccs_minimize_roundtrips'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): MsearchTemplate
- {
- if (isset($body) !== true) {
- return $this;
- }
- if (is_array($body) === true || $body instanceof Traversable) {
- foreach ($body as $item) {
- $this->body .= $this->serializer->serialize($item) . "\n";
- }
- } elseif (is_string($body)) {
- $this->body = $body;
- if (substr($body, -1) != "\n") {
- $this->body .= "\n";
- }
- } else {
- throw new InvalidArgumentException("Body must be an array, traversable object or string");
- }
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Nodes/ClearRepositoriesMeteringArchive.php b/src/Elasticsearch/Endpoints/Nodes/ClearRepositoriesMeteringArchive.php
deleted file mode 100644
index af819119f..000000000
--- a/src/Elasticsearch/Endpoints/Nodes/ClearRepositoriesMeteringArchive.php
+++ /dev/null
@@ -1,77 +0,0 @@
-node_id ?? null;
- $max_archive_version = $this->max_archive_version ?? null;
-
- if (isset($node_id) && isset($max_archive_version)) {
- return "/_nodes/$node_id/_repositories_metering/$max_archive_version";
- }
- throw new RuntimeException('Missing parameter for the endpoint nodes.clear_repositories_metering_archive');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setNodeId($node_id): ClearRepositoriesMeteringArchive
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-
- public function setMaxArchiveVersion($max_archive_version): ClearRepositoriesMeteringArchive
- {
- if (isset($max_archive_version) !== true) {
- return $this;
- }
- $this->max_archive_version = $max_archive_version;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Nodes/GetRepositoriesMeteringInfo.php b/src/Elasticsearch/Endpoints/Nodes/GetRepositoriesMeteringInfo.php
deleted file mode 100644
index 6599aa3e8..000000000
--- a/src/Elasticsearch/Endpoints/Nodes/GetRepositoriesMeteringInfo.php
+++ /dev/null
@@ -1,65 +0,0 @@
-node_id ?? null;
-
- if (isset($node_id)) {
- return "/_nodes/$node_id/_repositories_metering";
- }
- throw new RuntimeException('Missing parameter for the endpoint nodes.get_repositories_metering_info');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNodeId($node_id): GetRepositoriesMeteringInfo
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Nodes/HotThreads.php b/src/Elasticsearch/Endpoints/Nodes/HotThreads.php
deleted file mode 100644
index a5b436fc3..000000000
--- a/src/Elasticsearch/Endpoints/Nodes/HotThreads.php
+++ /dev/null
@@ -1,71 +0,0 @@
-node_id ?? null;
-
- if (isset($node_id)) {
- return "/_nodes/$node_id/hot_threads";
- }
- return "/_nodes/hot_threads";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'interval',
- 'snapshots',
- 'threads',
- 'ignore_idle_threads',
- 'type',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNodeId($node_id): HotThreads
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Nodes/Info.php b/src/Elasticsearch/Endpoints/Nodes/Info.php
deleted file mode 100644
index 37a2c2af2..000000000
--- a/src/Elasticsearch/Endpoints/Nodes/Info.php
+++ /dev/null
@@ -1,88 +0,0 @@
-node_id ?? null;
- $metric = $this->metric ?? null;
-
- if (isset($node_id) && isset($metric)) {
- return "/_nodes/$node_id/$metric";
- }
- if (isset($node_id)) {
- return "/_nodes/$node_id";
- }
- if (isset($metric)) {
- return "/_nodes/$metric";
- }
- return "/_nodes";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'flat_settings',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNodeId($node_id): Info
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-
- public function setMetric($metric): Info
- {
- if (isset($metric) !== true) {
- return $this;
- }
- if (is_array($metric) === true) {
- $metric = implode(",", $metric);
- }
- $this->metric = $metric;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php b/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php
deleted file mode 100644
index cf29af4be..000000000
--- a/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php
+++ /dev/null
@@ -1,76 +0,0 @@
-node_id ?? null;
-
- if (isset($node_id)) {
- return "/_nodes/$node_id/reload_secure_settings";
- }
- return "/_nodes/reload_secure_settings";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): ReloadSecureSettings
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setNodeId($node_id): ReloadSecureSettings
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Nodes/Stats.php b/src/Elasticsearch/Endpoints/Nodes/Stats.php
deleted file mode 100644
index ebc8eba46..000000000
--- a/src/Elasticsearch/Endpoints/Nodes/Stats.php
+++ /dev/null
@@ -1,116 +0,0 @@
-node_id ?? null;
- $metric = $this->metric ?? null;
- $index_metric = $this->index_metric ?? null;
-
- if (isset($node_id) && isset($metric) && isset($index_metric)) {
- return "/_nodes/$node_id/stats/$metric/$index_metric";
- }
- if (isset($metric) && isset($index_metric)) {
- return "/_nodes/stats/$metric/$index_metric";
- }
- if (isset($node_id) && isset($metric)) {
- return "/_nodes/$node_id/stats/$metric";
- }
- if (isset($node_id)) {
- return "/_nodes/$node_id/stats";
- }
- if (isset($metric)) {
- return "/_nodes/stats/$metric";
- }
- return "/_nodes/stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'completion_fields',
- 'fielddata_fields',
- 'fields',
- 'groups',
- 'level',
- 'types',
- 'timeout',
- 'include_segment_file_sizes',
- 'include_unloaded_segments'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNodeId($node_id): Stats
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-
- public function setMetric($metric): Stats
- {
- if (isset($metric) !== true) {
- return $this;
- }
- if (is_array($metric) === true) {
- $metric = implode(",", $metric);
- }
- $this->metric = $metric;
-
- return $this;
- }
-
- public function setIndexMetric($index_metric): Stats
- {
- if (isset($index_metric) !== true) {
- return $this;
- }
- if (is_array($index_metric) === true) {
- $index_metric = implode(",", $index_metric);
- }
- $this->index_metric = $index_metric;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Nodes/Usage.php b/src/Elasticsearch/Endpoints/Nodes/Usage.php
deleted file mode 100644
index 0744fbbda..000000000
--- a/src/Elasticsearch/Endpoints/Nodes/Usage.php
+++ /dev/null
@@ -1,87 +0,0 @@
-node_id ?? null;
- $metric = $this->metric ?? null;
-
- if (isset($node_id) && isset($metric)) {
- return "/_nodes/$node_id/usage/$metric";
- }
- if (isset($node_id)) {
- return "/_nodes/$node_id/usage";
- }
- if (isset($metric)) {
- return "/_nodes/usage/$metric";
- }
- return "/_nodes/usage";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNodeId($node_id): Usage
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-
- public function setMetric($metric): Usage
- {
- if (isset($metric) !== true) {
- return $this;
- }
- if (is_array($metric) === true) {
- $metric = implode(",", $metric);
- }
- $this->metric = $metric;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/OpenPointInTime.php b/src/Elasticsearch/Endpoints/OpenPointInTime.php
deleted file mode 100644
index 160f117e3..000000000
--- a/src/Elasticsearch/Endpoints/OpenPointInTime.php
+++ /dev/null
@@ -1,57 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_pit";
- }
- throw new RuntimeException('Missing parameter for the endpoint open_point_in_time');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'preference',
- 'routing',
- 'ignore_unavailable',
- 'expand_wildcards',
- 'keep_alive'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ping.php b/src/Elasticsearch/Endpoints/Ping.php
deleted file mode 100644
index 6e05a7726..000000000
--- a/src/Elasticsearch/Endpoints/Ping.php
+++ /dev/null
@@ -1,48 +0,0 @@
-id) !== true) {
- throw new RuntimeException(
- 'id is required for put_script'
- );
- }
- $id = $this->id;
- $context = $this->context ?? null;
-
- if (isset($context)) {
- return "/_scripts/$id/$context";
- }
- return "/_scripts/$id";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout',
- 'master_timeout',
- 'context'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutScript
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setContext($context): PutScript
- {
- if (isset($context) !== true) {
- return $this;
- }
- $this->context = $context;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/RankEval.php b/src/Elasticsearch/Endpoints/RankEval.php
deleted file mode 100644
index 61537eeac..000000000
--- a/src/Elasticsearch/Endpoints/RankEval.php
+++ /dev/null
@@ -1,65 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_rank_eval";
- }
- return "/_rank_eval";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'search_type'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): RankEval
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Reindex.php b/src/Elasticsearch/Endpoints/Reindex.php
deleted file mode 100644
index 4b6b60f3f..000000000
--- a/src/Elasticsearch/Endpoints/Reindex.php
+++ /dev/null
@@ -1,65 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/ReindexRethrottle.php b/src/Elasticsearch/Endpoints/ReindexRethrottle.php
deleted file mode 100644
index ce51a6a59..000000000
--- a/src/Elasticsearch/Endpoints/ReindexRethrottle.php
+++ /dev/null
@@ -1,64 +0,0 @@
-task_id ?? null;
-
- if (isset($task_id)) {
- return "/_reindex/$task_id/_rethrottle";
- }
- throw new RuntimeException('Missing parameter for the endpoint reindex_rethrottle');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'requests_per_second'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setTaskId($task_id): ReindexRethrottle
- {
- if (isset($task_id) !== true) {
- return $this;
- }
- $this->task_id = $task_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/RenderSearchTemplate.php b/src/Elasticsearch/Endpoints/RenderSearchTemplate.php
deleted file mode 100644
index 7d324fd8e..000000000
--- a/src/Elasticsearch/Endpoints/RenderSearchTemplate.php
+++ /dev/null
@@ -1,60 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_render/template/$id";
- }
- return "/_render/template";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): RenderSearchTemplate
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php b/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php
deleted file mode 100644
index e803acd13..000000000
--- a/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php
+++ /dev/null
@@ -1,51 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_rollup/job/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint rollup.delete_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Rollup/GetJobs.php b/src/Elasticsearch/Endpoints/Rollup/GetJobs.php
deleted file mode 100644
index a15b71d3f..000000000
--- a/src/Elasticsearch/Endpoints/Rollup/GetJobs.php
+++ /dev/null
@@ -1,50 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_rollup/job/$id";
- }
- return "/_rollup/job/";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php b/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php
deleted file mode 100644
index 2af2fa672..000000000
--- a/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php
+++ /dev/null
@@ -1,50 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_rollup/data/$id";
- }
- return "/_rollup/data/";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php b/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php
deleted file mode 100644
index aebd4de35..000000000
--- a/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php
+++ /dev/null
@@ -1,51 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_rollup/data";
- }
- throw new RuntimeException('Missing parameter for the endpoint rollup.get_rollup_index_caps');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Rollup/PutJob.php b/src/Elasticsearch/Endpoints/Rollup/PutJob.php
deleted file mode 100644
index 4206e6a33..000000000
--- a/src/Elasticsearch/Endpoints/Rollup/PutJob.php
+++ /dev/null
@@ -1,61 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_rollup/job/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint rollup.put_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutJob
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Rollup/Rollup.php b/src/Elasticsearch/Endpoints/Rollup/Rollup.php
deleted file mode 100644
index efb22f062..000000000
--- a/src/Elasticsearch/Endpoints/Rollup/Rollup.php
+++ /dev/null
@@ -1,75 +0,0 @@
-index ?? null;
- $rollup_index = $this->rollup_index ?? null;
-
- if (isset($index) && isset($rollup_index)) {
- return "/$index/_rollup/$rollup_index";
- }
- throw new RuntimeException('Missing parameter for the endpoint rollup.rollup');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): Rollup
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setRollupIndex($rollup_index): Rollup
- {
- if (isset($rollup_index) !== true) {
- return $this;
- }
- $this->rollup_index = $rollup_index;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php b/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php
deleted file mode 100644
index d3177942d..000000000
--- a/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php
+++ /dev/null
@@ -1,73 +0,0 @@
-index) !== true) {
- throw new RuntimeException(
- 'index is required for rollup_search'
- );
- }
- $index = $this->index;
- $type = $this->type ?? null;
- if (isset($type)) {
- @trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
- }
-
- if (isset($type)) {
- return "/$index/$type/_rollup_search";
- }
- return "/$index/_rollup_search";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'typed_keys',
- 'rest_total_hits_as_int'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): RollupSearch
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Rollup/StartJob.php b/src/Elasticsearch/Endpoints/Rollup/StartJob.php
deleted file mode 100644
index 87888987e..000000000
--- a/src/Elasticsearch/Endpoints/Rollup/StartJob.php
+++ /dev/null
@@ -1,51 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_rollup/job/$id/_start";
- }
- throw new RuntimeException('Missing parameter for the endpoint rollup.start_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Rollup/StopJob.php b/src/Elasticsearch/Endpoints/Rollup/StopJob.php
deleted file mode 100644
index cbee52dd9..000000000
--- a/src/Elasticsearch/Endpoints/Rollup/StopJob.php
+++ /dev/null
@@ -1,54 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_rollup/job/$id/_stop";
- }
- throw new RuntimeException('Missing parameter for the endpoint rollup.stop_job');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_completion',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php b/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php
deleted file mode 100644
index 4c6dc3371..000000000
--- a/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): ScriptsPainlessExecute
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Scroll.php b/src/Elasticsearch/Endpoints/Scroll.php
deleted file mode 100644
index eecdb732f..000000000
--- a/src/Elasticsearch/Endpoints/Scroll.php
+++ /dev/null
@@ -1,78 +0,0 @@
-scroll_id ?? null;
- if (isset($scroll_id)) {
- @trigger_error('A scroll id can be quite large and should be specified as part of the body', E_USER_DEPRECATED);
- }
-
- if (isset($scroll_id)) {
- return "/_search/scroll/$scroll_id";
- }
- return "/_search/scroll";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'scroll',
- 'scroll_id',
- 'rest_total_hits_as_int'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Scroll
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setScrollId($scroll_id): Scroll
- {
- if (isset($scroll_id) !== true) {
- return $this;
- }
- $this->scroll_id = $scroll_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Search.php b/src/Elasticsearch/Endpoints/Search.php
deleted file mode 100644
index 9f8b80b3b..000000000
--- a/src/Elasticsearch/Endpoints/Search.php
+++ /dev/null
@@ -1,104 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_search";
- }
- return "/_search";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'analyzer',
- 'analyze_wildcard',
- 'ccs_minimize_roundtrips',
- 'default_operator',
- 'df',
- 'explain',
- 'stored_fields',
- 'docvalue_fields',
- 'from',
- 'ignore_unavailable',
- 'ignore_throttled',
- 'allow_no_indices',
- 'expand_wildcards',
- 'lenient',
- 'preference',
- 'q',
- 'routing',
- 'scroll',
- 'search_type',
- 'size',
- 'sort',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'terminate_after',
- 'stats',
- 'suggest_field',
- 'suggest_mode',
- 'suggest_size',
- 'suggest_text',
- 'timeout',
- 'track_scores',
- 'track_total_hits',
- 'allow_partial_search_results',
- 'typed_keys',
- 'version',
- 'seq_no_primary_term',
- 'request_cache',
- 'batched_reduce_size',
- 'max_concurrent_shard_requests',
- 'pre_filter_shard_size',
- 'rest_total_hits_as_int',
- 'min_compatible_shard_node'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Search
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/SearchMvt.php b/src/Elasticsearch/Endpoints/SearchMvt.php
deleted file mode 100644
index 74c349300..000000000
--- a/src/Elasticsearch/Endpoints/SearchMvt.php
+++ /dev/null
@@ -1,116 +0,0 @@
-index ?? null;
- $field = $this->field ?? null;
- $zoom = $this->zoom ?? null;
- $x = $this->x ?? null;
- $y = $this->y ?? null;
-
- if (isset($index) && isset($field) && isset($zoom) && isset($x) && isset($y)) {
- return "/$index/_mvt/$field/$zoom/$x/$y";
- }
- throw new RuntimeException('Missing parameter for the endpoint search_mvt');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'exact_bounds',
- 'extent',
- 'grid_precision',
- 'grid_type',
- 'size',
- 'track_total_hits'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): SearchMvt
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setField($field): SearchMvt
- {
- if (isset($field) !== true) {
- return $this;
- }
- $this->field = $field;
-
- return $this;
- }
-
- public function setZoom($zoom): SearchMvt
- {
- if (isset($zoom) !== true) {
- return $this;
- }
- $this->zoom = $zoom;
-
- return $this;
- }
-
- public function setX($x): SearchMvt
- {
- if (isset($x) !== true) {
- return $this;
- }
- $this->x = $x;
-
- return $this;
- }
-
- public function setY($y): SearchMvt
- {
- if (isset($y) !== true) {
- return $this;
- }
- $this->y = $y;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/SearchShards.php b/src/Elasticsearch/Endpoints/SearchShards.php
deleted file mode 100644
index 7deff5e54..000000000
--- a/src/Elasticsearch/Endpoints/SearchShards.php
+++ /dev/null
@@ -1,57 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_search_shards";
- }
- return "/_search_shards";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'preference',
- 'routing',
- 'local',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/SearchTemplate.php b/src/Elasticsearch/Endpoints/SearchTemplate.php
deleted file mode 100644
index d20806e9a..000000000
--- a/src/Elasticsearch/Endpoints/SearchTemplate.php
+++ /dev/null
@@ -1,74 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_search/template";
- }
- return "/_search/template";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'ignore_throttled',
- 'allow_no_indices',
- 'expand_wildcards',
- 'preference',
- 'routing',
- 'scroll',
- 'search_type',
- 'explain',
- 'profile',
- 'typed_keys',
- 'rest_total_hits_as_int',
- 'ccs_minimize_roundtrips'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): SearchTemplate
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/SearchableSnapshots/CacheStats.php b/src/Elasticsearch/Endpoints/SearchableSnapshots/CacheStats.php
deleted file mode 100644
index 5f816836e..000000000
--- a/src/Elasticsearch/Endpoints/SearchableSnapshots/CacheStats.php
+++ /dev/null
@@ -1,64 +0,0 @@
-node_id ?? null;
-
- if (isset($node_id)) {
- return "/_searchable_snapshots/$node_id/cache/stats";
- }
- return "/_searchable_snapshots/cache/stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNodeId($node_id): CacheStats
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- if (is_array($node_id) === true) {
- $node_id = implode(",", $node_id);
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/SearchableSnapshots/ClearCache.php b/src/Elasticsearch/Endpoints/SearchableSnapshots/ClearCache.php
deleted file mode 100644
index 05cc58a1c..000000000
--- a/src/Elasticsearch/Endpoints/SearchableSnapshots/ClearCache.php
+++ /dev/null
@@ -1,55 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_searchable_snapshots/cache/clear";
- }
- return "/_searchable_snapshots/cache/clear";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'index'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/SearchableSnapshots/Mount.php b/src/Elasticsearch/Endpoints/SearchableSnapshots/Mount.php
deleted file mode 100644
index f0c84b278..000000000
--- a/src/Elasticsearch/Endpoints/SearchableSnapshots/Mount.php
+++ /dev/null
@@ -1,88 +0,0 @@
-repository ?? null;
- $snapshot = $this->snapshot ?? null;
-
- if (isset($repository) && isset($snapshot)) {
- return "/_snapshot/$repository/$snapshot/_mount";
- }
- throw new RuntimeException('Missing parameter for the endpoint searchable_snapshots.mount');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'wait_for_completion',
- 'storage'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): Mount
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setRepository($repository): Mount
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-
- public function setSnapshot($snapshot): Mount
- {
- if (isset($snapshot) !== true) {
- return $this;
- }
- $this->snapshot = $snapshot;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/SearchableSnapshots/Stats.php b/src/Elasticsearch/Endpoints/SearchableSnapshots/Stats.php
deleted file mode 100644
index 6cf70cec8..000000000
--- a/src/Elasticsearch/Endpoints/SearchableSnapshots/Stats.php
+++ /dev/null
@@ -1,52 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_searchable_snapshots/stats";
- }
- return "/_searchable_snapshots/stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'level'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/Authenticate.php b/src/Elasticsearch/Endpoints/Security/Authenticate.php
deleted file mode 100644
index 3256d52db..000000000
--- a/src/Elasticsearch/Endpoints/Security/Authenticate.php
+++ /dev/null
@@ -1,48 +0,0 @@
-username ?? null;
-
- if (isset($username)) {
- return "/_security/user/$username/_password";
- }
- return "/_security/user/_password";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): ChangePassword
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setUsername($username): ChangePassword
- {
- if (isset($username) !== true) {
- return $this;
- }
- $this->username = $username;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/ClearApiKeyCache.php b/src/Elasticsearch/Endpoints/Security/ClearApiKeyCache.php
deleted file mode 100644
index 4fa6f833e..000000000
--- a/src/Elasticsearch/Endpoints/Security/ClearApiKeyCache.php
+++ /dev/null
@@ -1,67 +0,0 @@
-ids ?? null;
-
- if (isset($ids)) {
- return "/_security/api_key/$ids/_clear_cache";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.clear_api_key_cache');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setIds($ids): ClearApiKeyCache
- {
- if (isset($ids) !== true) {
- return $this;
- }
- if (is_array($ids) === true) {
- $ids = implode(",", $ids);
- }
- $this->ids = $ids;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/ClearCachedPrivileges.php b/src/Elasticsearch/Endpoints/Security/ClearCachedPrivileges.php
deleted file mode 100644
index 180261f1b..000000000
--- a/src/Elasticsearch/Endpoints/Security/ClearCachedPrivileges.php
+++ /dev/null
@@ -1,67 +0,0 @@
-application ?? null;
-
- if (isset($application)) {
- return "/_security/privilege/$application/_clear_cache";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.clear_cached_privileges');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setApplication($application): ClearCachedPrivileges
- {
- if (isset($application) !== true) {
- return $this;
- }
- if (is_array($application) === true) {
- $application = implode(",", $application);
- }
- $this->application = $application;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php b/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php
deleted file mode 100644
index 7d7b975d7..000000000
--- a/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php
+++ /dev/null
@@ -1,67 +0,0 @@
-realms ?? null;
-
- if (isset($realms)) {
- return "/_security/realm/$realms/_clear_cache";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.clear_cached_realms');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'usernames'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setRealms($realms): ClearCachedRealms
- {
- if (isset($realms) !== true) {
- return $this;
- }
- if (is_array($realms) === true) {
- $realms = implode(",", $realms);
- }
- $this->realms = $realms;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php b/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php
deleted file mode 100644
index efa9fefb2..000000000
--- a/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php
+++ /dev/null
@@ -1,67 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_security/role/$name/_clear_cache";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.clear_cached_roles');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setName($name): ClearCachedRoles
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/ClearCachedServiceTokens.php b/src/Elasticsearch/Endpoints/Security/ClearCachedServiceTokens.php
deleted file mode 100644
index e36adca7f..000000000
--- a/src/Elasticsearch/Endpoints/Security/ClearCachedServiceTokens.php
+++ /dev/null
@@ -1,91 +0,0 @@
-namespace ?? null;
- $service = $this->service ?? null;
- $name = $this->name ?? null;
-
- if (isset($namespace) && isset($service) && isset($name)) {
- return "/_security/service/$namespace/$service/credential/token/$name/_clear_cache";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.clear_cached_service_tokens');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setNamespace($namespace): ClearCachedServiceTokens
- {
- if (isset($namespace) !== true) {
- return $this;
- }
- $this->namespace = $namespace;
-
- return $this;
- }
-
- public function setService($service): ClearCachedServiceTokens
- {
- if (isset($service) !== true) {
- return $this;
- }
- $this->service = $service;
-
- return $this;
- }
-
- public function setName($name): ClearCachedServiceTokens
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/CreateApiKey.php b/src/Elasticsearch/Endpoints/Security/CreateApiKey.php
deleted file mode 100644
index 9eb17da30..000000000
--- a/src/Elasticsearch/Endpoints/Security/CreateApiKey.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/CreateServiceToken.php b/src/Elasticsearch/Endpoints/Security/CreateServiceToken.php
deleted file mode 100644
index 050d55784..000000000
--- a/src/Elasticsearch/Endpoints/Security/CreateServiceToken.php
+++ /dev/null
@@ -1,98 +0,0 @@
-namespace) !== true) {
- throw new RuntimeException(
- 'namespace is required for create_service_token'
- );
- }
- $namespace = $this->namespace;
- if (isset($this->service) !== true) {
- throw new RuntimeException(
- 'service is required for create_service_token'
- );
- }
- $service = $this->service;
- $name = $this->name ?? null;
-
- if (isset($name)) {
- return "/_security/service/$namespace/$service/credential/token/$name";
- }
- return "/_security/service/$namespace/$service/credential/token";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setNamespace($namespace): CreateServiceToken
- {
- if (isset($namespace) !== true) {
- return $this;
- }
- $this->namespace = $namespace;
-
- return $this;
- }
-
- public function setService($service): CreateServiceToken
- {
- if (isset($service) !== true) {
- return $this;
- }
- $this->service = $service;
-
- return $this;
- }
-
- public function setName($name): CreateServiceToken
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php b/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php
deleted file mode 100644
index 9a4356515..000000000
--- a/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php
+++ /dev/null
@@ -1,76 +0,0 @@
-application ?? null;
- $name = $this->name ?? null;
-
- if (isset($application) && isset($name)) {
- return "/_security/privilege/$application/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.delete_privileges');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setApplication($application): DeletePrivileges
- {
- if (isset($application) !== true) {
- return $this;
- }
- $this->application = $application;
-
- return $this;
- }
-
- public function setName($name): DeletePrivileges
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/DeleteRole.php b/src/Elasticsearch/Endpoints/Security/DeleteRole.php
deleted file mode 100644
index ea3ea6a87..000000000
--- a/src/Elasticsearch/Endpoints/Security/DeleteRole.php
+++ /dev/null
@@ -1,64 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_security/role/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.delete_role');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeleteRole
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php b/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php
deleted file mode 100644
index 6aea004a0..000000000
--- a/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php
+++ /dev/null
@@ -1,64 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_security/role_mapping/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.delete_role_mapping');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setName($name): DeleteRoleMapping
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/DeleteServiceToken.php b/src/Elasticsearch/Endpoints/Security/DeleteServiceToken.php
deleted file mode 100644
index 4c5ceb20e..000000000
--- a/src/Elasticsearch/Endpoints/Security/DeleteServiceToken.php
+++ /dev/null
@@ -1,88 +0,0 @@
-namespace ?? null;
- $service = $this->service ?? null;
- $name = $this->name ?? null;
-
- if (isset($namespace) && isset($service) && isset($name)) {
- return "/_security/service/$namespace/$service/credential/token/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.delete_service_token');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setNamespace($namespace): DeleteServiceToken
- {
- if (isset($namespace) !== true) {
- return $this;
- }
- $this->namespace = $namespace;
-
- return $this;
- }
-
- public function setService($service): DeleteServiceToken
- {
- if (isset($service) !== true) {
- return $this;
- }
- $this->service = $service;
-
- return $this;
- }
-
- public function setName($name): DeleteServiceToken
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/DeleteUser.php b/src/Elasticsearch/Endpoints/Security/DeleteUser.php
deleted file mode 100644
index ad2eac2d5..000000000
--- a/src/Elasticsearch/Endpoints/Security/DeleteUser.php
+++ /dev/null
@@ -1,64 +0,0 @@
-username ?? null;
-
- if (isset($username)) {
- return "/_security/user/$username";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.delete_user');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setUsername($username): DeleteUser
- {
- if (isset($username) !== true) {
- return $this;
- }
- $this->username = $username;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/DisableUser.php b/src/Elasticsearch/Endpoints/Security/DisableUser.php
deleted file mode 100644
index ec7bcb763..000000000
--- a/src/Elasticsearch/Endpoints/Security/DisableUser.php
+++ /dev/null
@@ -1,64 +0,0 @@
-username ?? null;
-
- if (isset($username)) {
- return "/_security/user/$username/_disable";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.disable_user');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setUsername($username): DisableUser
- {
- if (isset($username) !== true) {
- return $this;
- }
- $this->username = $username;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/EnableUser.php b/src/Elasticsearch/Endpoints/Security/EnableUser.php
deleted file mode 100644
index 32dc1e4fb..000000000
--- a/src/Elasticsearch/Endpoints/Security/EnableUser.php
+++ /dev/null
@@ -1,64 +0,0 @@
-username ?? null;
-
- if (isset($username)) {
- return "/_security/user/$username/_enable";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.enable_user');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setUsername($username): EnableUser
- {
- if (isset($username) !== true) {
- return $this;
- }
- $this->username = $username;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/EnrollKibana.php b/src/Elasticsearch/Endpoints/Security/EnrollKibana.php
deleted file mode 100644
index 8e71a20ee..000000000
--- a/src/Elasticsearch/Endpoints/Security/EnrollKibana.php
+++ /dev/null
@@ -1,46 +0,0 @@
-application ?? null;
- $name = $this->name ?? null;
-
- if (isset($application) && isset($name)) {
- return "/_security/privilege/$application/$name";
- }
- if (isset($application)) {
- return "/_security/privilege/$application";
- }
- return "/_security/privilege";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setApplication($application): GetPrivileges
- {
- if (isset($application) !== true) {
- return $this;
- }
- $this->application = $application;
-
- return $this;
- }
-
- public function setName($name): GetPrivileges
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/GetRole.php b/src/Elasticsearch/Endpoints/Security/GetRole.php
deleted file mode 100644
index 629c3f3d8..000000000
--- a/src/Elasticsearch/Endpoints/Security/GetRole.php
+++ /dev/null
@@ -1,66 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_security/role/$name";
- }
- return "/_security/role";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetRole
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php b/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php
deleted file mode 100644
index 6780e897a..000000000
--- a/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php
+++ /dev/null
@@ -1,66 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_security/role_mapping/$name";
- }
- return "/_security/role_mapping";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setName($name): GetRoleMapping
- {
- if (isset($name) !== true) {
- return $this;
- }
- if (is_array($name) === true) {
- $name = implode(",", $name);
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/GetServiceAccounts.php b/src/Elasticsearch/Endpoints/Security/GetServiceAccounts.php
deleted file mode 100644
index ffa52f879..000000000
--- a/src/Elasticsearch/Endpoints/Security/GetServiceAccounts.php
+++ /dev/null
@@ -1,78 +0,0 @@
-namespace ?? null;
- $service = $this->service ?? null;
-
- if (isset($namespace) && isset($service)) {
- return "/_security/service/$namespace/$service";
- }
- if (isset($namespace)) {
- return "/_security/service/$namespace";
- }
- return "/_security/service";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNamespace($namespace): GetServiceAccounts
- {
- if (isset($namespace) !== true) {
- return $this;
- }
- $this->namespace = $namespace;
-
- return $this;
- }
-
- public function setService($service): GetServiceAccounts
- {
- if (isset($service) !== true) {
- return $this;
- }
- $this->service = $service;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/GetServiceCredentials.php b/src/Elasticsearch/Endpoints/Security/GetServiceCredentials.php
deleted file mode 100644
index 9910bb808..000000000
--- a/src/Elasticsearch/Endpoints/Security/GetServiceCredentials.php
+++ /dev/null
@@ -1,76 +0,0 @@
-namespace ?? null;
- $service = $this->service ?? null;
-
- if (isset($namespace) && isset($service)) {
- return "/_security/service/$namespace/$service/credential";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.get_service_credentials');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNamespace($namespace): GetServiceCredentials
- {
- if (isset($namespace) !== true) {
- return $this;
- }
- $this->namespace = $namespace;
-
- return $this;
- }
-
- public function setService($service): GetServiceCredentials
- {
- if (isset($service) !== true) {
- return $this;
- }
- $this->service = $service;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/GetToken.php b/src/Elasticsearch/Endpoints/Security/GetToken.php
deleted file mode 100644
index fb26bee6b..000000000
--- a/src/Elasticsearch/Endpoints/Security/GetToken.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/GetUser.php b/src/Elasticsearch/Endpoints/Security/GetUser.php
deleted file mode 100644
index 9d54e0e6d..000000000
--- a/src/Elasticsearch/Endpoints/Security/GetUser.php
+++ /dev/null
@@ -1,66 +0,0 @@
-username ?? null;
-
- if (isset($username)) {
- return "/_security/user/$username";
- }
- return "/_security/user";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setUsername($username): GetUser
- {
- if (isset($username) !== true) {
- return $this;
- }
- if (is_array($username) === true) {
- $username = implode(",", $username);
- }
- $this->username = $username;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php b/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php
deleted file mode 100644
index 22ba5a034..000000000
--- a/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php
+++ /dev/null
@@ -1,48 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/HasPrivileges.php b/src/Elasticsearch/Endpoints/Security/HasPrivileges.php
deleted file mode 100644
index 783815a03..000000000
--- a/src/Elasticsearch/Endpoints/Security/HasPrivileges.php
+++ /dev/null
@@ -1,73 +0,0 @@
-user ?? null;
-
- if (isset($user)) {
- return "/_security/user/$user/_has_privileges";
- }
- return "/_security/user/_has_privileges";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): HasPrivileges
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setUser($user): HasPrivileges
- {
- if (isset($user) !== true) {
- return $this;
- }
- $this->user = $user;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php b/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php
deleted file mode 100644
index 9377934e4..000000000
--- a/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php
+++ /dev/null
@@ -1,56 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/InvalidateToken.php b/src/Elasticsearch/Endpoints/Security/InvalidateToken.php
deleted file mode 100644
index beb53ad7c..000000000
--- a/src/Elasticsearch/Endpoints/Security/InvalidateToken.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/PutPrivileges.php b/src/Elasticsearch/Endpoints/Security/PutPrivileges.php
deleted file mode 100644
index 1c808618f..000000000
--- a/src/Elasticsearch/Endpoints/Security/PutPrivileges.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/PutRole.php b/src/Elasticsearch/Endpoints/Security/PutRole.php
deleted file mode 100644
index 77a42ad2b..000000000
--- a/src/Elasticsearch/Endpoints/Security/PutRole.php
+++ /dev/null
@@ -1,74 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_security/role/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.put_role');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutRole
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): PutRole
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php b/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php
deleted file mode 100644
index f5b845ed6..000000000
--- a/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php
+++ /dev/null
@@ -1,74 +0,0 @@
-name ?? null;
-
- if (isset($name)) {
- return "/_security/role_mapping/$name";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.put_role_mapping');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutRoleMapping
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setName($name): PutRoleMapping
- {
- if (isset($name) !== true) {
- return $this;
- }
- $this->name = $name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/PutUser.php b/src/Elasticsearch/Endpoints/Security/PutUser.php
deleted file mode 100644
index bd36b5217..000000000
--- a/src/Elasticsearch/Endpoints/Security/PutUser.php
+++ /dev/null
@@ -1,74 +0,0 @@
-username ?? null;
-
- if (isset($username)) {
- return "/_security/user/$username";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.put_user');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'refresh'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutUser
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setUsername($username): PutUser
- {
- if (isset($username) !== true) {
- return $this;
- }
- $this->username = $username;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/QueryApiKeys.php b/src/Elasticsearch/Endpoints/Security/QueryApiKeys.php
deleted file mode 100644
index 6356ca010..000000000
--- a/src/Elasticsearch/Endpoints/Security/QueryApiKeys.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): QueryApiKeys
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/SamlAuthenticate.php b/src/Elasticsearch/Endpoints/Security/SamlAuthenticate.php
deleted file mode 100644
index 5d5ef05e9..000000000
--- a/src/Elasticsearch/Endpoints/Security/SamlAuthenticate.php
+++ /dev/null
@@ -1,56 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/SamlCompleteLogout.php b/src/Elasticsearch/Endpoints/Security/SamlCompleteLogout.php
deleted file mode 100644
index 67a4d0822..000000000
--- a/src/Elasticsearch/Endpoints/Security/SamlCompleteLogout.php
+++ /dev/null
@@ -1,56 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/SamlInvalidate.php b/src/Elasticsearch/Endpoints/Security/SamlInvalidate.php
deleted file mode 100644
index 8f0401594..000000000
--- a/src/Elasticsearch/Endpoints/Security/SamlInvalidate.php
+++ /dev/null
@@ -1,56 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/SamlLogout.php b/src/Elasticsearch/Endpoints/Security/SamlLogout.php
deleted file mode 100644
index 4c6ec27e2..000000000
--- a/src/Elasticsearch/Endpoints/Security/SamlLogout.php
+++ /dev/null
@@ -1,56 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/SamlPrepareAuthentication.php b/src/Elasticsearch/Endpoints/Security/SamlPrepareAuthentication.php
deleted file mode 100644
index edc9126f0..000000000
--- a/src/Elasticsearch/Endpoints/Security/SamlPrepareAuthentication.php
+++ /dev/null
@@ -1,56 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Security/SamlServiceProviderMetadata.php b/src/Elasticsearch/Endpoints/Security/SamlServiceProviderMetadata.php
deleted file mode 100644
index 9151c8a60..000000000
--- a/src/Elasticsearch/Endpoints/Security/SamlServiceProviderMetadata.php
+++ /dev/null
@@ -1,62 +0,0 @@
-realm_name ?? null;
-
- if (isset($realm_name)) {
- return "/_security/saml/metadata/$realm_name";
- }
- throw new RuntimeException('Missing parameter for the endpoint security.saml_service_provider_metadata');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setRealmName($realm_name): SamlServiceProviderMetadata
- {
- if (isset($realm_name) !== true) {
- return $this;
- }
- $this->realm_name = $realm_name;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Shutdown/DeleteNode.php b/src/Elasticsearch/Endpoints/Shutdown/DeleteNode.php
deleted file mode 100644
index 4f43c28bf..000000000
--- a/src/Elasticsearch/Endpoints/Shutdown/DeleteNode.php
+++ /dev/null
@@ -1,64 +0,0 @@
-node_id ?? null;
-
- if (isset($node_id)) {
- return "/_nodes/$node_id/shutdown";
- }
- throw new RuntimeException('Missing parameter for the endpoint shutdown.delete_node');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setNodeId($node_id): DeleteNode
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Shutdown/GetNode.php b/src/Elasticsearch/Endpoints/Shutdown/GetNode.php
deleted file mode 100644
index c8a23c175..000000000
--- a/src/Elasticsearch/Endpoints/Shutdown/GetNode.php
+++ /dev/null
@@ -1,63 +0,0 @@
-node_id ?? null;
-
- if (isset($node_id)) {
- return "/_nodes/$node_id/shutdown";
- }
- return "/_nodes/shutdown";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setNodeId($node_id): GetNode
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Shutdown/PutNode.php b/src/Elasticsearch/Endpoints/Shutdown/PutNode.php
deleted file mode 100644
index f2747d5ab..000000000
--- a/src/Elasticsearch/Endpoints/Shutdown/PutNode.php
+++ /dev/null
@@ -1,74 +0,0 @@
-node_id ?? null;
-
- if (isset($node_id)) {
- return "/_nodes/$node_id/shutdown";
- }
- throw new RuntimeException('Missing parameter for the endpoint shutdown.put_node');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutNode
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setNodeId($node_id): PutNode
- {
- if (isset($node_id) !== true) {
- return $this;
- }
- $this->node_id = $node_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Slm/DeleteLifecycle.php b/src/Elasticsearch/Endpoints/Slm/DeleteLifecycle.php
deleted file mode 100644
index 1a764e9fb..000000000
--- a/src/Elasticsearch/Endpoints/Slm/DeleteLifecycle.php
+++ /dev/null
@@ -1,64 +0,0 @@
-policy_id ?? null;
-
- if (isset($policy_id)) {
- return "/_slm/policy/$policy_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint slm.delete_lifecycle');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setPolicyId($policy_id): DeleteLifecycle
- {
- if (isset($policy_id) !== true) {
- return $this;
- }
- $this->policy_id = $policy_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Slm/ExecuteLifecycle.php b/src/Elasticsearch/Endpoints/Slm/ExecuteLifecycle.php
deleted file mode 100644
index d6441ee1c..000000000
--- a/src/Elasticsearch/Endpoints/Slm/ExecuteLifecycle.php
+++ /dev/null
@@ -1,64 +0,0 @@
-policy_id ?? null;
-
- if (isset($policy_id)) {
- return "/_slm/policy/$policy_id/_execute";
- }
- throw new RuntimeException('Missing parameter for the endpoint slm.execute_lifecycle');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setPolicyId($policy_id): ExecuteLifecycle
- {
- if (isset($policy_id) !== true) {
- return $this;
- }
- $this->policy_id = $policy_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Slm/ExecuteRetention.php b/src/Elasticsearch/Endpoints/Slm/ExecuteRetention.php
deleted file mode 100644
index e4bb1b495..000000000
--- a/src/Elasticsearch/Endpoints/Slm/ExecuteRetention.php
+++ /dev/null
@@ -1,48 +0,0 @@
-policy_id ?? null;
-
- if (isset($policy_id)) {
- return "/_slm/policy/$policy_id";
- }
- return "/_slm/policy";
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setPolicyId($policy_id): GetLifecycle
- {
- if (isset($policy_id) !== true) {
- return $this;
- }
- if (is_array($policy_id) === true) {
- $policy_id = implode(",", $policy_id);
- }
- $this->policy_id = $policy_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Slm/GetStats.php b/src/Elasticsearch/Endpoints/Slm/GetStats.php
deleted file mode 100644
index e7de93ad8..000000000
--- a/src/Elasticsearch/Endpoints/Slm/GetStats.php
+++ /dev/null
@@ -1,48 +0,0 @@
-policy_id ?? null;
-
- if (isset($policy_id)) {
- return "/_slm/policy/$policy_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint slm.put_lifecycle');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutLifecycle
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setPolicyId($policy_id): PutLifecycle
- {
- if (isset($policy_id) !== true) {
- return $this;
- }
- $this->policy_id = $policy_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Slm/Start.php b/src/Elasticsearch/Endpoints/Slm/Start.php
deleted file mode 100644
index 1c81547af..000000000
--- a/src/Elasticsearch/Endpoints/Slm/Start.php
+++ /dev/null
@@ -1,48 +0,0 @@
-repository ?? null;
-
- if (isset($repository)) {
- return "/_snapshot/$repository/_cleanup";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.cleanup_repository');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setRepository($repository): CleanupRepository
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/CloneSnapshot.php b/src/Elasticsearch/Endpoints/Snapshot/CloneSnapshot.php
deleted file mode 100644
index e44c71511..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/CloneSnapshot.php
+++ /dev/null
@@ -1,98 +0,0 @@
-repository ?? null;
- $snapshot = $this->snapshot ?? null;
- $target_snapshot = $this->target_snapshot ?? null;
-
- if (isset($repository) && isset($snapshot) && isset($target_snapshot)) {
- return "/_snapshot/$repository/$snapshot/_clone/$target_snapshot";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.clone');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): CloneSnapshot
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setRepository($repository): CloneSnapshot
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-
- public function setSnapshot($snapshot): CloneSnapshot
- {
- if (isset($snapshot) !== true) {
- return $this;
- }
- $this->snapshot = $snapshot;
-
- return $this;
- }
-
- public function setTargetSnapshot($target_snapshot): CloneSnapshot
- {
- if (isset($target_snapshot) !== true) {
- return $this;
- }
- $this->target_snapshot = $target_snapshot;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/Create.php b/src/Elasticsearch/Endpoints/Snapshot/Create.php
deleted file mode 100644
index 0f8d09f98..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/Create.php
+++ /dev/null
@@ -1,87 +0,0 @@
-repository ?? null;
- $snapshot = $this->snapshot ?? null;
-
- if (isset($repository) && isset($snapshot)) {
- return "/_snapshot/$repository/$snapshot";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.create');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'wait_for_completion'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): Create
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setRepository($repository): Create
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-
- public function setSnapshot($snapshot): Create
- {
- if (isset($snapshot) !== true) {
- return $this;
- }
- $this->snapshot = $snapshot;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php b/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php
deleted file mode 100644
index 4043c94e8..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php
+++ /dev/null
@@ -1,76 +0,0 @@
-repository ?? null;
-
- if (isset($repository)) {
- return "/_snapshot/$repository";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.create_repository');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'timeout',
- 'verify'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): CreateRepository
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setRepository($repository): CreateRepository
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/Delete.php b/src/Elasticsearch/Endpoints/Snapshot/Delete.php
deleted file mode 100644
index 9616222a0..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/Delete.php
+++ /dev/null
@@ -1,79 +0,0 @@
-repository ?? null;
- $snapshot = $this->snapshot ?? null;
-
- if (isset($repository) && isset($snapshot)) {
- return "/_snapshot/$repository/$snapshot";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.delete');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setRepository($repository): Delete
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-
- public function setSnapshot($snapshot): Delete
- {
- if (isset($snapshot) !== true) {
- return $this;
- }
- if (is_array($snapshot) === true) {
- $snapshot = implode(",", $snapshot);
- }
- $this->snapshot = $snapshot;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php b/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php
deleted file mode 100644
index d70d7bdc3..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php
+++ /dev/null
@@ -1,68 +0,0 @@
-repository ?? null;
-
- if (isset($repository)) {
- return "/_snapshot/$repository";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.delete_repository');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setRepository($repository): DeleteRepository
- {
- if (isset($repository) !== true) {
- return $this;
- }
- if (is_array($repository) === true) {
- $repository = implode(",", $repository);
- }
- $this->repository = $repository;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/Get.php b/src/Elasticsearch/Endpoints/Snapshot/Get.php
deleted file mode 100644
index 5c39fd952..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/Get.php
+++ /dev/null
@@ -1,83 +0,0 @@
-repository ?? null;
- $snapshot = $this->snapshot ?? null;
-
- if (isset($repository) && isset($snapshot)) {
- return "/_snapshot/$repository/$snapshot";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.get');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'ignore_unavailable',
- 'index_details',
- 'include_repository',
- 'verbose'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setRepository($repository): Get
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-
- public function setSnapshot($snapshot): Get
- {
- if (isset($snapshot) !== true) {
- return $this;
- }
- if (is_array($snapshot) === true) {
- $snapshot = implode(",", $snapshot);
- }
- $this->snapshot = $snapshot;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php b/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php
deleted file mode 100644
index 4c7e93965..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php
+++ /dev/null
@@ -1,67 +0,0 @@
-repository ?? null;
-
- if (isset($repository)) {
- return "/_snapshot/$repository";
- }
- return "/_snapshot";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'local'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setRepository($repository): GetRepository
- {
- if (isset($repository) !== true) {
- return $this;
- }
- if (is_array($repository) === true) {
- $repository = implode(",", $repository);
- }
- $this->repository = $repository;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/RepositoryAnalyze.php b/src/Elasticsearch/Endpoints/Snapshot/RepositoryAnalyze.php
deleted file mode 100644
index 3d729df45..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/RepositoryAnalyze.php
+++ /dev/null
@@ -1,74 +0,0 @@
-repository ?? null;
-
- if (isset($repository)) {
- return "/_snapshot/$repository/_analyze";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.repository_analyze');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'blob_count',
- 'concurrency',
- 'read_node_count',
- 'early_read_node_count',
- 'seed',
- 'rare_action_probability',
- 'max_blob_size',
- 'max_total_data_size',
- 'timeout',
- 'detailed',
- 'rarely_abort_writes'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setRepository($repository): RepositoryAnalyze
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/Restore.php b/src/Elasticsearch/Endpoints/Snapshot/Restore.php
deleted file mode 100644
index 633b2b2f1..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/Restore.php
+++ /dev/null
@@ -1,87 +0,0 @@
-repository ?? null;
- $snapshot = $this->snapshot ?? null;
-
- if (isset($repository) && isset($snapshot)) {
- return "/_snapshot/$repository/$snapshot/_restore";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.restore');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'wait_for_completion'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): Restore
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setRepository($repository): Restore
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-
- public function setSnapshot($snapshot): Restore
- {
- if (isset($snapshot) !== true) {
- return $this;
- }
- $this->snapshot = $snapshot;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/Status.php b/src/Elasticsearch/Endpoints/Snapshot/Status.php
deleted file mode 100644
index 8420181b7..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/Status.php
+++ /dev/null
@@ -1,82 +0,0 @@
-repository ?? null;
- $snapshot = $this->snapshot ?? null;
-
- if (isset($repository) && isset($snapshot)) {
- return "/_snapshot/$repository/$snapshot/_status";
- }
- if (isset($repository)) {
- return "/_snapshot/$repository/_status";
- }
- return "/_snapshot/_status";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'ignore_unavailable'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setRepository($repository): Status
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-
- public function setSnapshot($snapshot): Status
- {
- if (isset($snapshot) !== true) {
- return $this;
- }
- if (is_array($snapshot) === true) {
- $snapshot = implode(",", $snapshot);
- }
- $this->snapshot = $snapshot;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php b/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php
deleted file mode 100644
index 31f49fed3..000000000
--- a/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php
+++ /dev/null
@@ -1,65 +0,0 @@
-repository ?? null;
-
- if (isset($repository)) {
- return "/_snapshot/$repository/_verify";
- }
- throw new RuntimeException('Missing parameter for the endpoint snapshot.verify_repository');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'master_timeout',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setRepository($repository): VerifyRepository
- {
- if (isset($repository) !== true) {
- return $this;
- }
- $this->repository = $repository;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Sql/ClearCursor.php b/src/Elasticsearch/Endpoints/Sql/ClearCursor.php
deleted file mode 100644
index 959a28a9e..000000000
--- a/src/Elasticsearch/Endpoints/Sql/ClearCursor.php
+++ /dev/null
@@ -1,56 +0,0 @@
-body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Sql/DeleteAsync.php b/src/Elasticsearch/Endpoints/Sql/DeleteAsync.php
deleted file mode 100644
index 455032245..000000000
--- a/src/Elasticsearch/Endpoints/Sql/DeleteAsync.php
+++ /dev/null
@@ -1,51 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_sql/async/delete/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint sql.delete_async');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Sql/GetAsync.php b/src/Elasticsearch/Endpoints/Sql/GetAsync.php
deleted file mode 100644
index 91f03a71d..000000000
--- a/src/Elasticsearch/Endpoints/Sql/GetAsync.php
+++ /dev/null
@@ -1,56 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_sql/async/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint sql.get_async');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'delimiter',
- 'format',
- 'keep_alive',
- 'wait_for_completion_timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Sql/GetAsyncStatus.php b/src/Elasticsearch/Endpoints/Sql/GetAsyncStatus.php
deleted file mode 100644
index e72d893ab..000000000
--- a/src/Elasticsearch/Endpoints/Sql/GetAsyncStatus.php
+++ /dev/null
@@ -1,51 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_sql/async/status/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint sql.get_async_status');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Sql/Query.php b/src/Elasticsearch/Endpoints/Sql/Query.php
deleted file mode 100644
index 651095880..000000000
--- a/src/Elasticsearch/Endpoints/Sql/Query.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Query
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Sql/Translate.php b/src/Elasticsearch/Endpoints/Sql/Translate.php
deleted file mode 100644
index 3c6509fa4..000000000
--- a/src/Elasticsearch/Endpoints/Sql/Translate.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): Translate
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Ssl/Certificates.php b/src/Elasticsearch/Endpoints/Ssl/Certificates.php
deleted file mode 100644
index 38b2c9e57..000000000
--- a/src/Elasticsearch/Endpoints/Ssl/Certificates.php
+++ /dev/null
@@ -1,48 +0,0 @@
-task_id ?? null;
-
- if (isset($task_id)) {
- return "/_tasks/$task_id/_cancel";
- }
- return "/_tasks/_cancel";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'nodes',
- 'actions',
- 'parent_task_id',
- 'wait_for_completion'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setTaskId($task_id): Cancel
- {
- if (isset($task_id) !== true) {
- return $this;
- }
- $this->task_id = $task_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Tasks/Get.php b/src/Elasticsearch/Endpoints/Tasks/Get.php
deleted file mode 100644
index 2648c182f..000000000
--- a/src/Elasticsearch/Endpoints/Tasks/Get.php
+++ /dev/null
@@ -1,65 +0,0 @@
-task_id ?? null;
-
- if (isset($task_id)) {
- return "/_tasks/$task_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint tasks.get');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_completion',
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setTaskId($task_id): Get
- {
- if (isset($task_id) !== true) {
- return $this;
- }
- $this->task_id = $task_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Tasks/ListTasks.php b/src/Elasticsearch/Endpoints/Tasks/ListTasks.php
deleted file mode 100644
index 1bfd2a98d..000000000
--- a/src/Elasticsearch/Endpoints/Tasks/ListTasks.php
+++ /dev/null
@@ -1,54 +0,0 @@
-index) !== true) {
- throw new RuntimeException(
- 'index is required for termvectors'
- );
- }
- $index = $this->index;
- $id = $this->id ?? null;
-
- if (isset($id)) {
- return "/$index/_termvectors/$id";
- }
- return "/$index/_termvectors";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'term_statistics',
- 'field_statistics',
- 'fields',
- 'offsets',
- 'positions',
- 'payloads',
- 'preference',
- 'routing',
- 'realtime',
- 'version',
- 'version_type'
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): TermVectors
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/TermsEnum.php b/src/Elasticsearch/Endpoints/TermsEnum.php
deleted file mode 100644
index 36e537f31..000000000
--- a/src/Elasticsearch/Endpoints/TermsEnum.php
+++ /dev/null
@@ -1,63 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_terms_enum";
- }
- throw new RuntimeException('Missing parameter for the endpoint terms_enum');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): TermsEnum
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/TextStructure/FindStructure.php b/src/Elasticsearch/Endpoints/TextStructure/FindStructure.php
deleted file mode 100644
index 5a8c425b9..000000000
--- a/src/Elasticsearch/Endpoints/TextStructure/FindStructure.php
+++ /dev/null
@@ -1,89 +0,0 @@
-serializer = $serializer;
- }
-
- public function getURI(): string
- {
-
- return "/_text_structure/find_structure";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'lines_to_sample',
- 'line_merge_size_limit',
- 'timeout',
- 'charset',
- 'format',
- 'has_header_row',
- 'column_names',
- 'delimiter',
- 'quote',
- 'should_trim_fields',
- 'grok_pattern',
- 'timestamp_field',
- 'timestamp_format',
- 'explain'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): FindStructure
- {
- if (isset($body) !== true) {
- return $this;
- }
- if (is_array($body) === true || $body instanceof Traversable) {
- foreach ($body as $item) {
- $this->body .= $this->serializer->serialize($item) . "\n";
- }
- } elseif (is_string($body)) {
- $this->body = $body;
- if (substr($body, -1) != "\n") {
- $this->body .= "\n";
- }
- } else {
- throw new InvalidArgumentException("Body must be an array, traversable object or string");
- }
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Transform/DeleteTransform.php b/src/Elasticsearch/Endpoints/Transform/DeleteTransform.php
deleted file mode 100644
index a1fc08f69..000000000
--- a/src/Elasticsearch/Endpoints/Transform/DeleteTransform.php
+++ /dev/null
@@ -1,64 +0,0 @@
-transform_id ?? null;
-
- if (isset($transform_id)) {
- return "/_transform/$transform_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint transform.delete_transform');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'force'
- ];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-
- public function setTransformId($transform_id): DeleteTransform
- {
- if (isset($transform_id) !== true) {
- return $this;
- }
- $this->transform_id = $transform_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Transform/GetTransform.php b/src/Elasticsearch/Endpoints/Transform/GetTransform.php
deleted file mode 100644
index 37ccdb5c5..000000000
--- a/src/Elasticsearch/Endpoints/Transform/GetTransform.php
+++ /dev/null
@@ -1,66 +0,0 @@
-transform_id ?? null;
-
- if (isset($transform_id)) {
- return "/_transform/$transform_id";
- }
- return "/_transform";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'from',
- 'size',
- 'allow_no_match',
- 'exclude_generated'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setTransformId($transform_id): GetTransform
- {
- if (isset($transform_id) !== true) {
- return $this;
- }
- $this->transform_id = $transform_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Transform/GetTransformStats.php b/src/Elasticsearch/Endpoints/Transform/GetTransformStats.php
deleted file mode 100644
index 83bf69932..000000000
--- a/src/Elasticsearch/Endpoints/Transform/GetTransformStats.php
+++ /dev/null
@@ -1,66 +0,0 @@
-transform_id ?? null;
-
- if (isset($transform_id)) {
- return "/_transform/$transform_id/_stats";
- }
- throw new RuntimeException('Missing parameter for the endpoint transform.get_transform_stats');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'from',
- 'size',
- 'allow_no_match'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setTransformId($transform_id): GetTransformStats
- {
- if (isset($transform_id) !== true) {
- return $this;
- }
- $this->transform_id = $transform_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Transform/PreviewTransform.php b/src/Elasticsearch/Endpoints/Transform/PreviewTransform.php
deleted file mode 100644
index 00406b07a..000000000
--- a/src/Elasticsearch/Endpoints/Transform/PreviewTransform.php
+++ /dev/null
@@ -1,71 +0,0 @@
-transform_id ?? null;
-
- if (isset($transform_id)) {
- return "/_transform/$transform_id/_preview";
- }
- return "/_transform/_preview";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return isset($this->body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): PreviewTransform
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setTransformId($transform_id): PreviewTransform
- {
- if (isset($transform_id) !== true) {
- return $this;
- }
- $this->transform_id = $transform_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Transform/PutTransform.php b/src/Elasticsearch/Endpoints/Transform/PutTransform.php
deleted file mode 100644
index d64795e0c..000000000
--- a/src/Elasticsearch/Endpoints/Transform/PutTransform.php
+++ /dev/null
@@ -1,74 +0,0 @@
-transform_id ?? null;
-
- if (isset($transform_id)) {
- return "/_transform/$transform_id";
- }
- throw new RuntimeException('Missing parameter for the endpoint transform.put_transform');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'defer_validation'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutTransform
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setTransformId($transform_id): PutTransform
- {
- if (isset($transform_id) !== true) {
- return $this;
- }
- $this->transform_id = $transform_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Transform/StartTransform.php b/src/Elasticsearch/Endpoints/Transform/StartTransform.php
deleted file mode 100644
index 66ae1e606..000000000
--- a/src/Elasticsearch/Endpoints/Transform/StartTransform.php
+++ /dev/null
@@ -1,64 +0,0 @@
-transform_id ?? null;
-
- if (isset($transform_id)) {
- return "/_transform/$transform_id/_start";
- }
- throw new RuntimeException('Missing parameter for the endpoint transform.start_transform');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'timeout'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setTransformId($transform_id): StartTransform
- {
- if (isset($transform_id) !== true) {
- return $this;
- }
- $this->transform_id = $transform_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Transform/StopTransform.php b/src/Elasticsearch/Endpoints/Transform/StopTransform.php
deleted file mode 100644
index d2c43e4b9..000000000
--- a/src/Elasticsearch/Endpoints/Transform/StopTransform.php
+++ /dev/null
@@ -1,68 +0,0 @@
-transform_id ?? null;
-
- if (isset($transform_id)) {
- return "/_transform/$transform_id/_stop";
- }
- throw new RuntimeException('Missing parameter for the endpoint transform.stop_transform');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'force',
- 'wait_for_completion',
- 'timeout',
- 'allow_no_match',
- 'wait_for_checkpoint'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setTransformId($transform_id): StopTransform
- {
- if (isset($transform_id) !== true) {
- return $this;
- }
- $this->transform_id = $transform_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Transform/UpdateTransform.php b/src/Elasticsearch/Endpoints/Transform/UpdateTransform.php
deleted file mode 100644
index 091219b7d..000000000
--- a/src/Elasticsearch/Endpoints/Transform/UpdateTransform.php
+++ /dev/null
@@ -1,74 +0,0 @@
-transform_id ?? null;
-
- if (isset($transform_id)) {
- return "/_transform/$transform_id/_update";
- }
- throw new RuntimeException('Missing parameter for the endpoint transform.update_transform');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'defer_validation'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): UpdateTransform
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-
- public function setTransformId($transform_id): UpdateTransform
- {
- if (isset($transform_id) !== true) {
- return $this;
- }
- $this->transform_id = $transform_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Transform/UpgradeTransforms.php b/src/Elasticsearch/Endpoints/Transform/UpgradeTransforms.php
deleted file mode 100644
index ee6d6735b..000000000
--- a/src/Elasticsearch/Endpoints/Transform/UpgradeTransforms.php
+++ /dev/null
@@ -1,48 +0,0 @@
-id) !== true) {
- throw new RuntimeException(
- 'id is required for update'
- );
- }
- $id = $this->id;
- if (isset($this->index) !== true) {
- throw new RuntimeException(
- 'index is required for update'
- );
- }
- $index = $this->index;
- $type = $this->type ?? null;
- if (isset($type)) {
- @trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
- }
-
- if (isset($type)) {
- return "/$index/$type/$id/_update";
- }
- return "/$index/_update/$id";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'wait_for_active_shards',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'lang',
- 'refresh',
- 'retry_on_conflict',
- 'routing',
- 'timeout',
- 'if_seq_no',
- 'if_primary_term',
- 'require_alias'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): Update
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/UpdateByQuery.php b/src/Elasticsearch/Endpoints/UpdateByQuery.php
deleted file mode 100644
index 2364d80cc..000000000
--- a/src/Elasticsearch/Endpoints/UpdateByQuery.php
+++ /dev/null
@@ -1,96 +0,0 @@
-index ?? null;
-
- if (isset($index)) {
- return "/$index/_update_by_query";
- }
- throw new RuntimeException('Missing parameter for the endpoint update_by_query');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'analyzer',
- 'analyze_wildcard',
- 'default_operator',
- 'df',
- 'from',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'conflicts',
- 'expand_wildcards',
- 'lenient',
- 'pipeline',
- 'preference',
- 'q',
- 'routing',
- 'scroll',
- 'search_type',
- 'search_timeout',
- 'max_docs',
- 'sort',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'terminate_after',
- 'stats',
- 'version',
- 'version_type',
- 'request_cache',
- 'refresh',
- 'timeout',
- 'wait_for_active_shards',
- 'scroll_size',
- 'wait_for_completion',
- 'requests_per_second',
- 'slices'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setBody($body): UpdateByQuery
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/UpdateByQueryRethrottle.php b/src/Elasticsearch/Endpoints/UpdateByQueryRethrottle.php
deleted file mode 100644
index f441bd586..000000000
--- a/src/Elasticsearch/Endpoints/UpdateByQueryRethrottle.php
+++ /dev/null
@@ -1,64 +0,0 @@
-task_id ?? null;
-
- if (isset($task_id)) {
- return "/_update_by_query/$task_id/_rethrottle";
- }
- throw new RuntimeException('Missing parameter for the endpoint update_by_query_rethrottle');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'requests_per_second'
- ];
- }
-
- public function getMethod(): string
- {
- return 'POST';
- }
-
- public function setTaskId($task_id): UpdateByQueryRethrottle
- {
- if (isset($task_id) !== true) {
- return $this;
- }
- $this->task_id = $task_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/AckWatch.php b/src/Elasticsearch/Endpoints/Watcher/AckWatch.php
deleted file mode 100644
index 467db2669..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/AckWatch.php
+++ /dev/null
@@ -1,82 +0,0 @@
-watch_id) !== true) {
- throw new RuntimeException(
- 'watch_id is required for ack_watch'
- );
- }
- $watch_id = $this->watch_id;
- $action_id = $this->action_id ?? null;
-
- if (isset($action_id)) {
- return "/_watcher/watch/$watch_id/_ack/$action_id";
- }
- return "/_watcher/watch/$watch_id/_ack";
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setWatchId($watch_id): AckWatch
- {
- if (isset($watch_id) !== true) {
- return $this;
- }
- $this->watch_id = $watch_id;
-
- return $this;
- }
-
- public function setActionId($action_id): AckWatch
- {
- if (isset($action_id) !== true) {
- return $this;
- }
- if (is_array($action_id) === true) {
- $action_id = implode(",", $action_id);
- }
- $this->action_id = $action_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/ActivateWatch.php b/src/Elasticsearch/Endpoints/Watcher/ActivateWatch.php
deleted file mode 100644
index 42507f24b..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/ActivateWatch.php
+++ /dev/null
@@ -1,62 +0,0 @@
-watch_id ?? null;
-
- if (isset($watch_id)) {
- return "/_watcher/watch/$watch_id/_activate";
- }
- throw new RuntimeException('Missing parameter for the endpoint watcher.activate_watch');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setWatchId($watch_id): ActivateWatch
- {
- if (isset($watch_id) !== true) {
- return $this;
- }
- $this->watch_id = $watch_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/DeactivateWatch.php b/src/Elasticsearch/Endpoints/Watcher/DeactivateWatch.php
deleted file mode 100644
index e07274b93..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/DeactivateWatch.php
+++ /dev/null
@@ -1,62 +0,0 @@
-watch_id ?? null;
-
- if (isset($watch_id)) {
- return "/_watcher/watch/$watch_id/_deactivate";
- }
- throw new RuntimeException('Missing parameter for the endpoint watcher.deactivate_watch');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setWatchId($watch_id): DeactivateWatch
- {
- if (isset($watch_id) !== true) {
- return $this;
- }
- $this->watch_id = $watch_id;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/DeleteWatch.php b/src/Elasticsearch/Endpoints/Watcher/DeleteWatch.php
deleted file mode 100644
index c1338ed65..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/DeleteWatch.php
+++ /dev/null
@@ -1,51 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_watcher/watch/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint watcher.delete_watch');
- }
-
- public function getParamWhitelist(): array
- {
- return [];
- }
-
- public function getMethod(): string
- {
- return 'DELETE';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/ExecuteWatch.php b/src/Elasticsearch/Endpoints/Watcher/ExecuteWatch.php
deleted file mode 100644
index 435585e28..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/ExecuteWatch.php
+++ /dev/null
@@ -1,62 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_watcher/watch/$id/_execute";
- }
- return "/_watcher/watch/_execute";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'debug'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): ExecuteWatch
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/GetWatch.php b/src/Elasticsearch/Endpoints/Watcher/GetWatch.php
deleted file mode 100644
index 8a57a25cf..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/GetWatch.php
+++ /dev/null
@@ -1,53 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_watcher/watch/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint watcher.get_watch');
- }
-
- public function getParamWhitelist(): array
- {
- return [
-
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/PutWatch.php b/src/Elasticsearch/Endpoints/Watcher/PutWatch.php
deleted file mode 100644
index fd2ed42b2..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/PutWatch.php
+++ /dev/null
@@ -1,66 +0,0 @@
-id ?? null;
-
- if (isset($id)) {
- return "/_watcher/watch/$id";
- }
- throw new RuntimeException('Missing parameter for the endpoint watcher.put_watch');
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'active',
- 'version',
- 'if_seq_no',
- 'if_primary_term'
- ];
- }
-
- public function getMethod(): string
- {
- return 'PUT';
- }
-
- public function setBody($body): PutWatch
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/QueryWatches.php b/src/Elasticsearch/Endpoints/Watcher/QueryWatches.php
deleted file mode 100644
index 4ee214bfa..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/QueryWatches.php
+++ /dev/null
@@ -1,58 +0,0 @@
-body) ? 'POST' : 'GET';
- }
-
- public function setBody($body): QueryWatches
- {
- if (isset($body) !== true) {
- return $this;
- }
- $this->body = $body;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/Start.php b/src/Elasticsearch/Endpoints/Watcher/Start.php
deleted file mode 100644
index ddb0c87b0..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/Start.php
+++ /dev/null
@@ -1,48 +0,0 @@
-metric ?? null;
-
- if (isset($metric)) {
- return "/_watcher/stats/$metric";
- }
- return "/_watcher/stats";
- }
-
- public function getParamWhitelist(): array
- {
- return [
- 'metric',
- 'emit_stacktraces'
- ];
- }
-
- public function getMethod(): string
- {
- return 'GET';
- }
-
- public function setMetric($metric): Stats
- {
- if (isset($metric) !== true) {
- return $this;
- }
- if (is_array($metric) === true) {
- $metric = implode(",", $metric);
- }
- $this->metric = $metric;
-
- return $this;
- }
-}
diff --git a/src/Elasticsearch/Endpoints/Watcher/Stop.php b/src/Elasticsearch/Endpoints/Watcher/Stop.php
deleted file mode 100644
index b5be5e7c3..000000000
--- a/src/Elasticsearch/Endpoints/Watcher/Stop.php
+++ /dev/null
@@ -1,48 +0,0 @@
-search_responses = $search_responses;
- }
-
- /**
- * Rewinds the internal SearchResponseIterator and itself
- *
- * @return void
- * @see Iterator::rewind()
- */
- public function rewind(): void
- {
- $this->current_key = 0;
- $this->search_responses->rewind();
-
- // The first page may be empty. In that case, the next page is fetched.
- $current_page = $this->search_responses->current();
- if ($this->search_responses->valid() && empty($current_page['hits']['hits'])) {
- $this->search_responses->next();
- }
-
- $this->count = 0;
- if (isset($current_page['hits']) && isset($current_page['hits']['total'])) {
- $this->count = $current_page['hits']['total'];
- }
-
- $this->readPageData();
- }
-
- /**
- * Advances pointer of the current hit to the next one in the current page. If there
- * isn't a next hit in the current page, then it advances the current page and moves the
- * pointer to the first hit in the page.
- *
- * @return void
- * @see Iterator::next()
- */
- public function next(): void
- {
- $this->current_key++;
- $this->current_hit_index++;
- $current_page = $this->search_responses->current();
- if (isset($current_page['hits']['hits'][$this->current_hit_index])) {
- $this->current_hit_data = $current_page['hits']['hits'][$this->current_hit_index];
- } else {
- $this->search_responses->next();
- $this->readPageData();
- }
- }
-
- /**
- * Returns a boolean indicating whether or not the current pointer has valid data
- *
- * @return bool
- * @see Iterator::valid()
- */
- public function valid(): bool
- {
- return is_array($this->current_hit_data);
- }
-
- /**
- * Returns the current hit
- *
- * @return array
- * @see Iterator::current()
- */
- public function current(): array
- {
- return $this->current_hit_data;
- }
-
- /**
- * Returns the current hit index. The hit index spans all pages.
- *
- * @return int
- * @see Iterator::key()
- */
- public function key(): int
- {
- return $this->current_key;
- }
-
- /**
- * Advances the internal SearchResponseIterator and resets the current_hit_index to 0
- *
- * @internal
- */
- private function readPageData(): void
- {
- if ($this->search_responses->valid()) {
- $current_page = $this->search_responses->current();
- $this->current_hit_index = 0;
- $this->current_hit_data = $current_page['hits']['hits'][$this->current_hit_index];
- } else {
- $this->current_hit_data = null;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public function count(): int
- {
- return $this->count;
- }
-}
diff --git a/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php b/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php
deleted file mode 100644
index d8fe694f1..000000000
--- a/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php
+++ /dev/null
@@ -1,178 +0,0 @@
-client = $client;
- $this->params = $search_params;
-
- if (isset($search_params['scroll'])) {
- $this->scroll_ttl = $search_params['scroll'];
- }
- }
-
- /**
- * Destructor
- */
- public function __destruct()
- {
- $this->clearScroll();
- }
-
- /**
- * Sets the time to live duration of a scroll window
- *
- * @param string $time_to_live
- * @return $this
- */
- public function setScrollTimeout(string $time_to_live): SearchResponseIterator
- {
- $this->scroll_ttl = $time_to_live;
- return $this;
- }
-
- /**
- * Clears the current scroll window if there is a scroll_id stored
- *
- * @return void
- */
- private function clearScroll(): void
- {
- if (!empty($this->scroll_id)) {
- $this->client->clearScroll(
- array(
- 'scroll_id' => $this->scroll_id,
- 'client' => array(
- 'ignore' => 404
- )
- )
- );
- $this->scroll_id = null;
- }
- }
-
- /**
- * Rewinds the iterator by performing the initial search.
- *
- * @return void
- * @see Iterator::rewind()
- */
- public function rewind(): void
- {
- $this->clearScroll();
- $this->current_key = 0;
- $this->current_scrolled_response = $this->client->search($this->params);
- $this->scroll_id = $this->current_scrolled_response['_scroll_id'];
- }
-
- /**
- * Fetches every "page" after the first one using the lastest "scroll_id"
- *
- * @return void
- * @see Iterator::next()
- */
- public function next(): void
- {
- $this->current_scrolled_response = $this->client->scroll(
- [
- 'scroll_id' => $this->scroll_id,
- 'scroll' => $this->scroll_ttl
- ]
- );
- $this->scroll_id = $this->current_scrolled_response['_scroll_id'];
- $this->current_key++;
- }
-
- /**
- * Returns a boolean value indicating if the current page is valid or not
- *
- * @return bool
- * @see Iterator::valid()
- */
- public function valid(): bool
- {
- return isset($this->current_scrolled_response['hits']['hits'][0]);
- }
-
- /**
- * Returns the current "page"
- *
- * @return array
- * @see Iterator::current()
- */
- public function current(): array
- {
- return $this->current_scrolled_response;
- }
-
- /**
- * Returns the current "page number" of the current "page"
- *
- * @return int
- * @see Iterator::key()
- */
- public function key(): int
- {
- return $this->current_key;
- }
-}
diff --git a/src/Elasticsearch/Namespaces/AbstractNamespace.php b/src/Elasticsearch/Namespaces/AbstractNamespace.php
deleted file mode 100644
index e55715e88..000000000
--- a/src/Elasticsearch/Namespaces/AbstractNamespace.php
+++ /dev/null
@@ -1,68 +0,0 @@
-transport = $transport;
- $this->endpoints = $endpoints;
- }
-
- /**
- * @return null|mixed
- */
- public function extractArgument(array &$params, string $arg)
- {
- if (array_key_exists($arg, $params) === true) {
- $val = $params[$arg];
- unset($params[$arg]);
- return $val;
- } else {
- return null;
- }
- }
-
- protected function performRequest(AbstractEndpoint $endpoint)
- {
- $response = $this->transport->performRequest(
- $endpoint->getMethod(),
- $endpoint->getURI(),
- $endpoint->getParams(),
- $endpoint->getBody(),
- $endpoint->getOptions()
- );
-
- return $this->transport->resultOrFuture($response, $endpoint->getOptions());
- }
-}
diff --git a/src/Elasticsearch/Namespaces/AsyncSearchNamespace.php b/src/Elasticsearch/Namespaces/AsyncSearchNamespace.php
deleted file mode 100644
index a6646885f..000000000
--- a/src/Elasticsearch/Namespaces/AsyncSearchNamespace.php
+++ /dev/null
@@ -1,157 +0,0 @@
-extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('AsyncSearch\Delete');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves the results of a previously submitted async search request given its ID.
- *
- * $params['id'] = (string) The async search ID
- * $params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response
- * $params['keep_alive'] = (time) Specify the time interval in which the results (partial or final) for this search will be available
- * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
- */
- public function get(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('AsyncSearch\Get');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves the status of a previously submitted async search request given its ID.
- *
- * $params['id'] = (string) The async search ID
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
- */
- public function status(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('AsyncSearch\Status');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Executes a search request asynchronously.
- *
- * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
- * $params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response (Default = 1s)
- * $params['keep_on_completion'] = (boolean) Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) (Default = false)
- * $params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d)
- * $params['batched_reduce_size'] = (number) The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available. (Default = 5)
- * $params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to true
- * $params['analyzer'] = (string) The analyzer to use for the query string
- * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
- * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
- * $params['df'] = (string) The field to use as default where no field prefix is given in the query string
- * $params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit
- * $params['stored_fields'] = (list) A comma-separated list of stored fields to return as part of a hit
- * $params['docvalue_fields'] = (list) A comma-separated list of fields to return as the docvalue representation of a field for each hit
- * $params['from'] = (number) Starting offset (default: 0)
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
- * $params['q'] = (string) Query in the Lucene query string syntax
- * $params['routing'] = (list) A comma-separated list of specific routing values
- * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
- * $params['size'] = (number) Number of hits to return (default: 10)
- * $params['sort'] = (list) A comma-separated list of : pairs
- * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
- * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
- * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field
- * $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
- * $params['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes
- * $params['suggest_field'] = (string) Specify which field to use for suggestions
- * $params['suggest_mode'] = (enum) Specify suggest mode (Options = missing,popular,always) (Default = missing)
- * $params['suggest_size'] = (number) How many suggestions to return in response
- * $params['suggest_text'] = (string) The source text for which the suggestions should be returned
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['track_scores'] = (boolean) Whether to calculate and return scores even if they are not used for sorting
- * $params['track_total_hits'] = (boolean|long) Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
- * $params['allow_partial_search_results'] = (boolean) Indicate if an error should be returned if there is a partial search failure or timeout (Default = true)
- * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- * $params['version'] = (boolean) Specify whether to return document version as part of a hit
- * $params['seq_no_primary_term'] = (boolean) Specify whether to return sequence number and primary term of the last modification of each hit
- * $params['max_concurrent_shard_requests'] = (number) The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests (Default = 5)
- * $params['body'] = (array) The search definition using the Query DSL
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
- */
- public function submit(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('AsyncSearch\Submit');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/AutoscalingNamespace.php b/src/Elasticsearch/Namespaces/AutoscalingNamespace.php
deleted file mode 100644
index 714e7625c..000000000
--- a/src/Elasticsearch/Namespaces/AutoscalingNamespace.php
+++ /dev/null
@@ -1,110 +0,0 @@
-extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Autoscaling\DeleteAutoscalingPolicy');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
- */
- public function getAutoscalingCapacity(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Autoscaling\GetAutoscalingCapacity');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
- *
- * $params['name'] = (string) the name of the autoscaling policy
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html
- */
- public function getAutoscalingPolicy(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Autoscaling\GetAutoscalingPolicy');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
- *
- * $params['name'] = (string) the name of the autoscaling policy
- * $params['body'] = (array) the specification of the autoscaling policy (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html
- */
- public function putAutoscalingPolicy(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Autoscaling\PutAutoscalingPolicy');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php b/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php
deleted file mode 100644
index 856dcf2a2..000000000
--- a/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php
+++ /dev/null
@@ -1,63 +0,0 @@
-performRequest(
- $endpoint->getMethod(),
- $endpoint->getURI(),
- $endpoint->getParams(),
- $endpoint->getBody(),
- $endpoint->getOptions()
- );
-
- $response = $transport->resultOrFuture($response, $endpoint->getOptions());
- if (!($response instanceof FutureArrayInterface)) {
- if ($response['status'] === 200) {
- return true;
- } else {
- return false;
- }
- } else {
- // async mode, can't easily resolve this...punt to user
- return $response;
- }
- } catch (Missing404Exception $exception) {
- return false;
- } catch (RoutingMissingException $exception) {
- return false;
- }
- }
-}
diff --git a/src/Elasticsearch/Namespaces/CatNamespace.php b/src/Elasticsearch/Namespaces/CatNamespace.php
deleted file mode 100644
index 061c8df9e..000000000
--- a/src/Elasticsearch/Namespaces/CatNamespace.php
+++ /dev/null
@@ -1,700 +0,0 @@
-extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Aliases');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
- *
- * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html
- */
- public function allocation(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Allocation');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Provides quick access to the document count of the entire cluster, or individual indices.
- *
- * $params['index'] = (list) A comma-separated list of index names to limit the returned information
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html
- */
- public function count(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Count');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Shows how much heap memory is currently being used by fielddata on every data node in the cluster.
- *
- * $params['fields'] = (list) A comma-separated list of fields to return the fielddata size
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html
- */
- public function fielddata(array $params = [])
- {
- $fields = $this->extractArgument($params, 'fields');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Fielddata');
- $endpoint->setParams($params);
- $endpoint->setFields($fields);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns a concise representation of the cluster health.
- *
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['ts'] = (boolean) Set to false to disable timestamping (Default = true)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html
- */
- public function health(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Health');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns help for the Cat APIs.
- *
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html
- */
- public function help(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Help');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about indices: number of primaries and replicas, document counts, disk size, ...
- *
- * $params['index'] = (list) A comma-separated list of index names to limit the returned information
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['health'] = (enum) A health status ("green", "yellow", or "red" to filter only indices matching the specified health status (Options = green,yellow,red)
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['pri'] = (boolean) Set to true to return stats only for primary shards (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- * $params['include_unloaded_segments'] = (boolean) If set to true segment stats will include stats for segments that are not currently loaded into memory (Default = false)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html
- */
- public function indices(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Indices');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about the master node.
- *
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html
- */
- public function master(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Master');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets configuration and usage information about data frame analytics jobs.
- *
- * $params['id'] = (string) The ID of the data frame analytics to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html
- */
- public function mlDataFrameAnalytics(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\MlDataFrameAnalytics');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets configuration and usage information about datafeeds.
- *
- * $params['datafeed_id'] = (string) The ID of the datafeeds stats to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
- * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html
- */
- public function mlDatafeeds(array $params = [])
- {
- $datafeed_id = $this->extractArgument($params, 'datafeed_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\MlDatafeeds');
- $endpoint->setParams($params);
- $endpoint->setDatafeedId($datafeed_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets configuration and usage information about anomaly detection jobs.
- *
- * $params['job_id'] = (string) The ID of the jobs stats to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
- * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html
- */
- public function mlJobs(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\MlJobs');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets configuration and usage information about inference trained models.
- *
- * $params['model_id'] = (string) The ID of the trained models stats to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true)
- * $params['from'] = (int) skips a number of trained models (Default = 0)
- * $params['size'] = (int) specifies a max number of trained models to get (Default = 100)
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html
- */
- public function mlTrainedModels(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\MlTrainedModels');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about custom node attributes.
- *
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html
- */
- public function nodeattrs(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\NodeAttrs');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns basic statistics about performance of cluster nodes.
- *
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['full_id'] = (boolean) Return the full node ID instead of the shortened version (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- * $params['include_unloaded_segments'] = (boolean) If set to true segment stats will include stats for segments that are not currently loaded into memory (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html
- */
- public function nodes(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Nodes');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns a concise representation of the cluster pending tasks.
- *
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
- */
- public function pendingTasks(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\PendingTasks');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about installed plugins across nodes node.
- *
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['include_bootstrap'] = (boolean) Include bootstrap plugins in the response (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html
- */
- public function plugins(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Plugins');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about index shard recoveries, both on-going completed.
- *
- * $params['index'] = (list) Comma-separated list or wildcard expression of index names to limit the returned information
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['active_only'] = (boolean) If `true`, the response only includes ongoing shard recoveries (Default = false)
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['detailed'] = (boolean) If `true`, the response includes detailed information about shard recoveries (Default = false)
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html
- */
- public function recovery(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Recovery');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about snapshot repositories registered in the cluster.
- *
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (Default = false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html
- */
- public function repositories(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Repositories');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Provides low-level information about the segments in the shards of an index.
- *
- * $params['index'] = (list) A comma-separated list of index names to limit the returned information
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
- */
- public function segments(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Segments');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Provides a detailed view of shard allocation on nodes.
- *
- * $params['index'] = (list) A comma-separated list of index names to limit the returned information
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html
- */
- public function shards(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Shards');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns all snapshots in a specific repository.
- *
- * $params['repository'] = (list) Name of repository from which to fetch the snapshot information
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['ignore_unavailable'] = (boolean) Set to true to ignore unavailable snapshots (Default = false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html
- */
- public function snapshots(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Snapshots');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about the tasks currently executing on one or more nodes in the cluster.
- *
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * $params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all.
- * $params['detailed'] = (boolean) Return detailed task information (default: false)
- * $params['parent_task_id'] = (string) Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function tasks(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Tasks');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about existing templates.
- *
- * $params['name'] = (string) A pattern that returned template names must match
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html
- */
- public function templates(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Templates');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns cluster-wide thread pool statistics per node.By default the active, queue and rejected statistics are returned for all thread pools.
- *
- * $params['thread_pool_patterns'] = (list) A comma-separated list of regular-expressions to filter the thread pools in the output
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html
- */
- public function threadPool(array $params = [])
- {
- $thread_pool_patterns = $this->extractArgument($params, 'thread_pool_patterns');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\ThreadPool');
- $endpoint->setParams($params);
- $endpoint->setThreadPoolPatterns($thread_pool_patterns);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets configuration and usage information about transforms.
- *
- * $params['transform_id'] = (string) The id of the transform for which to get stats. '_all' or '*' implies all transforms
- * $params['from'] = (int) skips a number of transform configs, defaults to 0
- * $params['size'] = (int) specifies a max number of transforms to get, defaults to 100
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['h'] = (list) Comma-separated list of column names to display
- * $params['help'] = (boolean) Return help information (Default = false)
- * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
- * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos)
- * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html
- */
- public function transforms(array $params = [])
- {
- $transform_id = $this->extractArgument($params, 'transform_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cat\Transforms');
- $endpoint->setParams($params);
- $endpoint->setTransformId($transform_id);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/CcrNamespace.php b/src/Elasticsearch/Namespaces/CcrNamespace.php
deleted file mode 100644
index 60c1d7941..000000000
--- a/src/Elasticsearch/Namespaces/CcrNamespace.php
+++ /dev/null
@@ -1,300 +0,0 @@
-extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\DeleteAutoFollowPattern');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a new follower index configured to follow the referenced leader index.
- *
- * $params['index'] = (string) The name of the follower index
- * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) (Default = 0)
- * $params['body'] = (array) The name of the leader index and other optional ccr related parameters (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
- */
- public function follow(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\Follow');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information about all follower indices, including parameters and status for each follower index
- *
- * $params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html
- */
- public function followInfo(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\FollowInfo');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices.
- *
- * $params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
- */
- public function followStats(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\FollowStats');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Removes the follower retention leases from the leader.
- *
- * $params['index'] = (string) the name of the leader index for which specified follower retention leases should be removed
- * $params['body'] = (array) the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html
- */
- public function forgetFollower(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\ForgetFollower');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection.
- *
- * $params['name'] = (string) The name of the auto follow pattern.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
- */
- public function getAutoFollowPattern(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\GetAutoFollowPattern');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Pauses an auto-follow pattern
- *
- * $params['name'] = (string) The name of the auto follow pattern that should pause discovering new indices to follow.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html
- */
- public function pauseAutoFollowPattern(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\PauseAutoFollowPattern');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Pauses a follower index. The follower index will not fetch any additional operations from the leader index.
- *
- * $params['index'] = (string) The name of the follower index that should pause following its leader index.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
- */
- public function pauseFollow(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\PauseFollow');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices.
- *
- * $params['name'] = (string) The name of the auto follow pattern.
- * $params['body'] = (array) The specification of the auto follow pattern (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
- */
- public function putAutoFollowPattern(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\PutAutoFollowPattern');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Resumes an auto-follow pattern that has been paused
- *
- * $params['name'] = (string) The name of the auto follow pattern to resume discovering new indices to follow.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html
- */
- public function resumeAutoFollowPattern(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\ResumeAutoFollowPattern');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Resumes a follower index that has been paused
- *
- * $params['index'] = (string) The name of the follow index to resume following.
- * $params['body'] = (array) The name of the leader index and other optional ccr related parameters
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
- */
- public function resumeFollow(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\ResumeFollow');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets all stats related to cross-cluster replication.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html
- */
- public function stats(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\Stats');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.
- *
- * $params['index'] = (string) The name of the follower index that should be turned into a regular index.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html
- */
- public function unfollow(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ccr\Unfollow');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/ClusterNamespace.php b/src/Elasticsearch/Namespaces/ClusterNamespace.php
deleted file mode 100644
index 9cb5bae41..000000000
--- a/src/Elasticsearch/Namespaces/ClusterNamespace.php
+++ /dev/null
@@ -1,376 +0,0 @@
-extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\AllocationExplain');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes a component template
- *
- * $params['name'] = (string) The name of the template
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
- */
- public function deleteComponentTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\DeleteComponentTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Clears cluster voting config exclusions.
- *
- * $params['wait_for_removal'] = (boolean) Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. (Default = true)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html
- */
- public function deleteVotingConfigExclusions(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\DeleteVotingConfigExclusions');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about whether a particular component template exist
- *
- * $params['name'] = (string) The name of the template
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return bool
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
- */
- public function existsComponentTemplate(array $params = []): bool
- {
- $name = $this->extractArgument($params, 'name');
-
- // manually make this verbose so we can check status code
- $params['client']['verbose'] = true;
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\ExistsComponentTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
- }
- /**
- * Returns one or more component templates
- *
- * $params['name'] = (list) The comma separated names of the component templates
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
- */
- public function getComponentTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\GetComponentTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns cluster settings.
- *
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['include_defaults'] = (boolean) Whether to return all default clusters setting. (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html
- */
- public function getSettings(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\GetSettings');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns basic information about the health of the cluster.
- *
- * $params['index'] = (list) Limit the information returned to a specific index
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all)
- * $params['level'] = (enum) Specify the level of detail for returned information (Options = cluster,indices,shards) (Default = cluster)
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['wait_for_active_shards'] = (string) Wait until the specified number of shards is active
- * $params['wait_for_nodes'] = (string) Wait until the specified number of nodes is available
- * $params['wait_for_events'] = (enum) Wait until all currently queued events with the given priority are processed (Options = immediate,urgent,high,normal,low,languid)
- * $params['wait_for_no_relocating_shards'] = (boolean) Whether to wait until there are no relocating shards in the cluster
- * $params['wait_for_no_initializing_shards'] = (boolean) Whether to wait until there are no initializing shards in the cluster
- * $params['wait_for_status'] = (enum) Wait until cluster is in a specific state (Options = green,yellow,red)
- * $params['return_200_for_cluster_health_timeout'] = (boolean) Whether to return HTTP 200 instead of 408 in case of a cluster health timeout from the server side
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html
- */
- public function health(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\Health');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns a list of any cluster-level changes (e.g. create index, update mapping,allocate or fail shard) which have not yet been executed.
- *
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html
- */
- public function pendingTasks(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\PendingTasks');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates the cluster voting config exclusions by node ids or node names.
- *
- * $params['node_ids'] = (string) A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names.
- * $params['node_names'] = (string) A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_ids.
- * $params['timeout'] = (time) Explicit operation timeout (Default = 30s)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html
- */
- public function postVotingConfigExclusions(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\PostVotingConfigExclusions');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates or updates a component template
- *
- * $params['name'] = (string) The name of the template
- * $params['create'] = (boolean) Whether the index template should only be added if new or can also replace an existing one (Default = false)
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['body'] = (array) The template definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
- */
- public function putComponentTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\PutComponentTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates the cluster settings.
- *
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['body'] = (array) The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
- */
- public function putSettings(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\PutSettings');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the information about configured remote clusters.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html
- */
- public function remoteInfo(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\RemoteInfo');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to manually change the allocation of individual shards in the cluster.
- *
- * $params['dry_run'] = (boolean) Simulate the operation only and return the resulting state
- * $params['explain'] = (boolean) Return an explanation of why the commands can or cannot be executed
- * $params['retry_failed'] = (boolean) Retries allocation of shards that are blocked due to too many subsequent allocation failures
- * $params['metric'] = (list) Limit the information returned to the specified metrics. Defaults to all but metadata (Options = _all,blocks,metadata,nodes,routing_table,master_node,version)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['body'] = (array) The definition of `commands` to perform (`move`, `cancel`, `allocate`)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html
- */
- public function reroute(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\Reroute');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns a comprehensive information about the state of the cluster.
- *
- * $params['metric'] = (list) Limit the information returned to the specified metrics
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['wait_for_metadata_version'] = (number) Wait for the metadata version to be equal or greater than the specified metadata version
- * $params['wait_for_timeout'] = (time) The maximum time to wait for wait_for_metadata_version before timing out
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html
- */
- public function state(array $params = [])
- {
- $metric = $this->extractArgument($params, 'metric');
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\State');
- $endpoint->setParams($params);
- $endpoint->setMetric($metric);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns high-level overview of cluster statistics.
- *
- * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['timeout'] = (time) Explicit operation timeout
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html
- */
- public function stats(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Cluster\Stats');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/DanglingIndicesNamespace.php b/src/Elasticsearch/Namespaces/DanglingIndicesNamespace.php
deleted file mode 100644
index 59642f550..000000000
--- a/src/Elasticsearch/Namespaces/DanglingIndicesNamespace.php
+++ /dev/null
@@ -1,93 +0,0 @@
-extractArgument($params, 'index_uuid');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('DanglingIndices\DeleteDanglingIndex');
- $endpoint->setParams($params);
- $endpoint->setIndexUuid($index_uuid);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Imports the specified dangling index
- *
- * $params['index_uuid'] = (string) The UUID of the dangling index
- * $params['accept_data_loss'] = (boolean) Must be set to true in order to import the dangling index
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
- */
- public function importDanglingIndex(array $params = [])
- {
- $index_uuid = $this->extractArgument($params, 'index_uuid');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('DanglingIndices\ImportDanglingIndex');
- $endpoint->setParams($params);
- $endpoint->setIndexUuid($index_uuid);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns all dangling indices.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
- */
- public function listDanglingIndices(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('DanglingIndices\ListDanglingIndices');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/EnrichNamespace.php b/src/Elasticsearch/Namespaces/EnrichNamespace.php
deleted file mode 100644
index 5300384b8..000000000
--- a/src/Elasticsearch/Namespaces/EnrichNamespace.php
+++ /dev/null
@@ -1,131 +0,0 @@
-extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Enrich\DeletePolicy');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates the enrich index for an existing enrich policy.
- *
- * $params['name'] = (string) The name of the enrich policy
- * $params['wait_for_completion'] = (boolean) Should the request should block until the execution is complete. (Default = true)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html
- */
- public function executePolicy(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Enrich\ExecutePolicy');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets information about an enrich policy.
- *
- * $params['name'] = (list) A comma-separated list of enrich policy names
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html
- */
- public function getPolicy(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Enrich\GetPolicy');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a new enrich policy.
- *
- * $params['name'] = (string) The name of the enrich policy
- * $params['body'] = (array) The enrich policy to register (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html
- */
- public function putPolicy(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Enrich\PutPolicy');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Gets enrich coordinator statistics and information about enrich policies that are currently executing.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html
- */
- public function stats(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Enrich\Stats');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/EqlNamespace.php b/src/Elasticsearch/Namespaces/EqlNamespace.php
deleted file mode 100644
index c6d6ecbb3..000000000
--- a/src/Elasticsearch/Namespaces/EqlNamespace.php
+++ /dev/null
@@ -1,118 +0,0 @@
-extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Eql\Delete');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns async results from previously executed Event Query Language (EQL) search
- *
- * $params['id'] = (string) The async search ID
- * $params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response
- * $params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html
- */
- public function get(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Eql\Get');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the status of a previously submitted async or stored Event Query Language (EQL) search
- *
- * $params['id'] = (string) The async search ID
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html
- */
- public function getStatus(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Eql\GetStatus');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns results matching a query expressed in Event Query Language (EQL)
- *
- * $params['index'] = (string) The name of the index to scope the operation
- * $params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response
- * $params['keep_on_completion'] = (boolean) Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) (Default = false)
- * $params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d)
- * $params['body'] = (array) Eql request body. Use the `query` to limit the query scope. (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html
- */
- public function search(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Eql\Search');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/FeaturesNamespace.php b/src/Elasticsearch/Namespaces/FeaturesNamespace.php
deleted file mode 100644
index 3176080a5..000000000
--- a/src/Elasticsearch/Namespaces/FeaturesNamespace.php
+++ /dev/null
@@ -1,68 +0,0 @@
-endpoints;
- $endpoint = $endpointBuilder('Features\GetFeatures');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Resets the internal state of features, usually by deleting system indices
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function resetFeatures(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Features\ResetFeatures');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/FleetNamespace.php b/src/Elasticsearch/Namespaces/FleetNamespace.php
deleted file mode 100644
index 14124d9bc..000000000
--- a/src/Elasticsearch/Namespaces/FleetNamespace.php
+++ /dev/null
@@ -1,107 +0,0 @@
-extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Fleet\GlobalCheckpoints');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project.
- *
- * $params['index'] = (string) The index name to use as the default
- * $params['body'] = (array) The request definitions (metadata-fleet search request definition pairs), separated by newlines (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function msearch(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Fleet\Msearch');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project.
- *
- * $params['index'] = (string) The index name to search.
- * $params['wait_for_checkpoints'] = (list) Comma separated list of checkpoints, one per shard (Default = )
- * $params['wait_for_checkpoints_timeout'] = (time) Explicit wait_for_checkpoints timeout
- * $params['allow_partial_search_results'] = (boolean) Indicate if an error should be returned if there is a partial search failure or timeout (Default = true)
- * $params['body'] = (array) The search definition using the Query DSL
- *
- * @param array $params Associative array of parameters
- * @return array
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function search(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Fleet\Search');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/GraphNamespace.php b/src/Elasticsearch/Namespaces/GraphNamespace.php
deleted file mode 100644
index d827952b5..000000000
--- a/src/Elasticsearch/Namespaces/GraphNamespace.php
+++ /dev/null
@@ -1,55 +0,0 @@
-extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Graph\Explore');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/IlmNamespace.php b/src/Elasticsearch/Namespaces/IlmNamespace.php
deleted file mode 100644
index 68fa927d2..000000000
--- a/src/Elasticsearch/Namespaces/IlmNamespace.php
+++ /dev/null
@@ -1,250 +0,0 @@
-extractArgument($params, 'policy');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\DeleteLifecycle');
- $endpoint->setParams($params);
- $endpoint->setPolicy($policy);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step.
- *
- * $params['index'] = (string) The name of the index to explain
- * $params['only_managed'] = (boolean) filters the indices included in the response to ones managed by ILM
- * $params['only_errors'] = (boolean) filters the indices included in the response to ones in an ILM error state, implies only_managed
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html
- */
- public function explainLifecycle(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\ExplainLifecycle');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the specified policy definition. Includes the policy version and last modified date.
- *
- * $params['policy'] = (string) The name of the index lifecycle policy
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html
- */
- public function getLifecycle(array $params = [])
- {
- $policy = $this->extractArgument($params, 'policy');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\GetLifecycle');
- $endpoint->setParams($params);
- $endpoint->setPolicy($policy);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves the current index lifecycle management (ILM) status.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html
- */
- public function getStatus(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\GetStatus');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing
- *
- * $params['dry_run'] = (boolean) If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false
- * $params['body'] = (array) Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data")
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html
- */
- public function migrateToDataTiers(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\MigrateToDataTiers');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Manually moves an index into the specified step and executes that step.
- *
- * $params['index'] = (string) The name of the index whose lifecycle step is to change
- * $params['body'] = (array) The new lifecycle step to move to
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html
- */
- public function moveToStep(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\MoveToStep');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a lifecycle policy
- *
- * $params['policy'] = (string) The name of the index lifecycle policy
- * $params['body'] = (array) The lifecycle policy definition to register
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html
- */
- public function putLifecycle(array $params = [])
- {
- $policy = $this->extractArgument($params, 'policy');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\PutLifecycle');
- $endpoint->setParams($params);
- $endpoint->setPolicy($policy);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Removes the assigned lifecycle policy and stops managing the specified index
- *
- * $params['index'] = (string) The name of the index to remove policy on
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html
- */
- public function removePolicy(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\RemovePolicy');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retries executing the policy for an index that is in the ERROR step.
- *
- * $params['index'] = (string) The name of the indices (comma-separated) whose failed lifecycle step is to be retry
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html
- */
- public function retry(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\Retry');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Start the index lifecycle management (ILM) plugin.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html
- */
- public function start(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\Start');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html
- */
- public function stop(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ilm\Stop');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/IndicesNamespace.php b/src/Elasticsearch/Namespaces/IndicesNamespace.php
deleted file mode 100644
index bcefe68b7..000000000
--- a/src/Elasticsearch/Namespaces/IndicesNamespace.php
+++ /dev/null
@@ -1,1452 +0,0 @@
-extractArgument($params, 'index');
- $block = $this->extractArgument($params, 'block');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\AddBlock');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBlock($block);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Performs the analysis process on a text and return the tokens breakdown of the text.
- *
- * $params['index'] = (string) The name of the index to scope the operation
- * $params['body'] = (array) Define analyzer/tokenizer parameters and the text on which the analysis should be performed
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
- */
- public function analyze(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Analyze');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Clears all or specific caches for one or more indices.
- *
- * $params['index'] = (list) A comma-separated list of index name to limit the operation
- * $params['fielddata'] = (boolean) Clear field data
- * $params['fields'] = (list) A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)
- * $params['query'] = (boolean) Clear query caches
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['request'] = (boolean) Clear request cache
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html
- */
- public function clearCache(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ClearCache');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Clones an index
- *
- * $params['index'] = (string) The name of the source index to clone
- * $params['target'] = (string) The name of the target index to clone into
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the cloned index before the operation returns.
- * $params['body'] = (array) The configuration for the target index (`settings` and `aliases`)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html
- */
- public function clone(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $target = $this->extractArgument($params, 'target');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\CloneIndices');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setTarget($target);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Closes an index.
- *
- * $params['index'] = (list) A comma separated list of indices to close
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
- */
- public function close(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Close');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates an index with optional settings and mappings.
- *
- * $params['index'] = (string) The name of the index
- * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for before the operation returns.
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['body'] = (array) The configuration for the index (`settings` and `mappings`)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html
- */
- public function create(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Create');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a data stream
- *
- * $params['name'] = (string) The name of the data stream
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
- */
- public function createDataStream(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\CreateDataStream');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Provides statistics on operations happening in a data stream.
- *
- * $params['name'] = (list) A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
- */
- public function dataStreamsStats(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\DataStreamsStats');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an index.
- *
- * $params['index'] = (list) A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false)
- * $params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false)
- * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open, closed, or hidden indices (Options = open,closed,hidden,none,all) (Default = open,closed)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html
- */
- public function delete(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Delete');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an alias.
- *
- * $params['index'] = (list) A comma-separated list of index names (supports wildcards); use `_all` for all indices (Required)
- * $params['name'] = (list) A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. (Required)
- * $params['timeout'] = (time) Explicit timestamp for the document
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
- */
- public function deleteAlias(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\DeleteAlias');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes a data stream.
- *
- * $params['name'] = (list) A comma-separated list of data streams to delete; use `*` to delete all data streams
- * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
- */
- public function deleteDataStream(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\DeleteDataStream');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an index template.
- *
- * $params['name'] = (string) The name of the template
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function deleteIndexTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\DeleteIndexTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an index template.
- *
- * $params['name'] = (string) The name of the template
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function deleteTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\DeleteTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Analyzes the disk usage of each field of an index or data stream
- *
- * $params['index'] = (string) Comma-separated list of indices or data streams to analyze the disk usage
- * $params['run_expensive_tasks'] = (boolean) Must be set to [true] in order for the task to be performed. Defaults to false.
- * $params['flush'] = (boolean) Whether flush or not before analyzing the index disk usage. Defaults to true
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function diskUsage(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\DiskUsage');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about whether a particular index exists.
- *
- * $params['index'] = (list) A comma-separated list of index names
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false)
- * $params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false)
- * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open)
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return bool
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html
- */
- public function exists(array $params = []): bool
- {
- $index = $this->extractArgument($params, 'index');
-
- // manually make this verbose so we can check status code
- $params['client']['verbose'] = true;
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Exists');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
- }
- /**
- * Returns information about whether a particular alias exists.
- *
- * $params['name'] = (list) A comma-separated list of alias names to return (Required)
- * $params['index'] = (list) A comma-separated list of index names to filter aliases
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all)
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return bool
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
- */
- public function existsAlias(array $params = []): bool
- {
- $name = $this->extractArgument($params, 'name');
- $index = $this->extractArgument($params, 'index');
-
- // manually make this verbose so we can check status code
- $params['client']['verbose'] = true;
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ExistsAlias');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setIndex($index);
-
- return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
- }
- /**
- * Returns information about whether a particular index template exists.
- *
- * $params['name'] = (string) The name of the template
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return bool
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function existsIndexTemplate(array $params = []): bool
- {
- $name = $this->extractArgument($params, 'name');
-
- // manually make this verbose so we can check status code
- $params['client']['verbose'] = true;
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ExistsIndexTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
- }
- /**
- * Returns information about whether a particular index template exists.
- *
- * $params['name'] = (list) The comma separated names of the index templates
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return bool
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function existsTemplate(array $params = []): bool
- {
- $name = $this->extractArgument($params, 'name');
-
- // manually make this verbose so we can check status code
- $params['client']['verbose'] = true;
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ExistsTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
- }
- /**
- * Returns information about whether a particular document type exists. (DEPRECATED)
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` to check the types across all indices
- * $params['type'] = DEPRECATED (list) A comma-separated list of document types to check
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return bool
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html
- */
- public function existsType(array $params = []): bool
- {
- $index = $this->extractArgument($params, 'index');
- $type = $this->extractArgument($params, 'type');
-
- // manually make this verbose so we can check status code
- $params['client']['verbose'] = true;
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ExistsType');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setType($type);
-
- return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
- }
- /**
- * Returns the field usage stats for each field of an index
- *
- * $params['index'] = (string) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['fields'] = (list) A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards)
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/field-usage-stats.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function fieldUsageStats(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\FieldUsageStats');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Performs the flush operation on one or more indices.
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
- * $params['force'] = (boolean) Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
- * $params['wait_if_ongoing'] = (boolean) If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html
- */
- public function flush(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Flush');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Performs the force merge operation on one or more indices.
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['flush'] = (boolean) Specify whether the index should be flushed after performing the operation (default: true)
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['max_num_segments'] = (number) The number of segments the index should be merged into (default: dynamic)
- * $params['only_expunge_deletes'] = (boolean) Specify whether the operation should only expunge deleted documents
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
- */
- public function forcemerge(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ForceMerge');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Freezes an index. A frozen index has almost no overhead on the cluster (except for maintaining its metadata in memory) and is read-only.
- *
- * $params['index'] = (string) The name of the index to freeze
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = closed)
- * $params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/freeze-index-api.html
- */
- public function freeze(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Freeze');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about one or more indices.
- *
- * $params['index'] = (list) A comma-separated list of index names
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false)
- * $params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false)
- * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open)
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false)
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
- */
- public function get(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Get');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns an alias.
- *
- * $params['name'] = (list) A comma-separated list of alias names to return
- * $params['index'] = (list) A comma-separated list of index names to filter aliases
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all)
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
- */
- public function getAlias(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\GetAlias');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns data streams.
- *
- * $params['name'] = (list) A comma-separated list of data streams to get; use `*` to get all data streams
- * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
- */
- public function getDataStream(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\GetDataStream');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns mapping for one or more fields.
- *
- * $params['fields'] = (list) A comma-separated list of fields (Required)
- * $params['index'] = (list) A comma-separated list of index names
- * $params['include_defaults'] = (boolean) Whether the default mapping values should be returned as well
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html
- */
- public function getFieldMapping(array $params = [])
- {
- $fields = $this->extractArgument($params, 'fields');
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\GetFieldMapping');
- $endpoint->setParams($params);
- $endpoint->setFields($fields);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns an index template.
- *
- * $params['name'] = (string) A pattern that returned template names must match
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function getIndexTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\GetIndexTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns mappings for one or more indices.
- *
- * $params['index'] = (list) A comma-separated list of index names
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
- */
- public function getMapping(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\GetMapping');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns settings for one or more indices.
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['name'] = (list) The name of the settings that should be included
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all)
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
- */
- public function getSettings(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\GetSettings');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns an index template.
- *
- * $params['name'] = (list) The comma separated names of the index templates
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function getTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\GetTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Migrates an alias to a data stream
- *
- * $params['name'] = (string) The name of the alias to migrate
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
- */
- public function migrateToDataStream(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\MigrateToDataStream');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Modifies a data stream
- *
- * $params['body'] = (array) The data stream modifications (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
- */
- public function modifyDataStream(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ModifyDataStream');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Opens an index.
- *
- * $params['index'] = (list) A comma separated list of indices to open
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = closed)
- * $params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
- */
- public function open(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Open');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Promotes a data stream from a replicated data stream managed by CCR to a regular data stream
- *
- * $params['name'] = (string) The name of the data stream
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
- */
- public function promoteDataStream(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\PromoteDataStream');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates or updates an alias.
- *
- * $params['index'] = (list) A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. (Required)
- * $params['name'] = (string) The name of the alias to be created or updated (Required)
- * $params['timeout'] = (time) Explicit timestamp for the document
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['body'] = (array) The settings for the alias, such as `routing` or `filter`
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
- */
- public function putAlias(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\PutAlias');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates or updates an index template.
- *
- * $params['name'] = (string) The name of the template
- * $params['create'] = (boolean) Whether the index template should only be added if new or can also replace an existing one (Default = false)
- * $params['cause'] = (string) User defined reason for creating/updating the index template (Default = )
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['body'] = (array) The template definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function putIndexTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\PutIndexTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates the index mappings.
- *
- * $params['index'] = (list) A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['write_index_only'] = (boolean) When true, applies mappings only to the write index of an alias or data stream (Default = false)
- * $params['body'] = (array) The mapping definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html
- */
- public function putMapping(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\PutMapping');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates the index settings.
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['preserve_existing'] = (boolean) Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['body'] = (array) The index settings to be updated (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
- */
- public function putSettings(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\PutSettings');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates or updates an index template.
- *
- * $params['name'] = (string) The name of the template
- * $params['order'] = (number) The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
- * $params['create'] = (boolean) Whether the index template should only be added if new or can also replace an existing one (Default = false)
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['body'] = (array) The template definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function putTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\PutTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about ongoing index shard recoveries.
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['detailed'] = (boolean) Whether to display detailed information about shard recovery (Default = false)
- * $params['active_only'] = (boolean) Display only those recoveries that are currently on-going (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html
- */
- public function recovery(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Recovery');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Performs the refresh operation in one or more indices.
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html
- */
- public function refresh(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Refresh');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Reloads an index's search analyzers and their resources.
- *
- * $params['index'] = (list) A comma-separated list of index names to reload analyzers for
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-reload-analyzers.html
- */
- public function reloadSearchAnalyzers(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ReloadSearchAnalyzers');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about any matching indices, aliases, and data streams
- *
- * $params['name'] = (list) A comma-separated list of names or wildcard expressions
- * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html
- */
- public function resolveIndex(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ResolveIndex');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates an alias to point to a new index when the existing indexis considered to be too large or too old.
- *
- * $params['alias'] = (string) The name of the alias to rollover (Required)
- * $params['new_index'] = (string) The name of the rollover index
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['dry_run'] = (boolean) If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the newly created rollover index before the operation returns.
- * $params['body'] = (array) The conditions that needs to be met for executing rollover
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html
- */
- public function rollover(array $params = [])
- {
- $alias = $this->extractArgument($params, 'alias');
- $new_index = $this->extractArgument($params, 'new_index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Rollover');
- $endpoint->setParams($params);
- $endpoint->setAlias($alias);
- $endpoint->setNewIndex($new_index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Provides low-level information about segments in a Lucene index.
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['verbose'] = (boolean) Includes detailed memory usage by Lucene. (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html
- */
- public function segments(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Segments');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Provides store information for shard copies of indices.
- *
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['status'] = (list) A comma-separated list of statuses used to filter on shards to get store information for (Options = green,yellow,red,all)
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html
- */
- public function shardStores(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ShardStores');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allow to shrink an existing index into a new index with fewer primary shards.
- *
- * $params['index'] = (string) The name of the source index to shrink
- * $params['target'] = (string) The name of the target index to shrink into
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the shrunken index before the operation returns.
- * $params['body'] = (array) The configuration for the target index (`settings` and `aliases`)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
- */
- public function shrink(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $target = $this->extractArgument($params, 'target');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Shrink');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setTarget($target);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Simulate matching the given index name against the index templates in the system
- *
- * $params['name'] = (string) The name of the index (it must be a concrete index name)
- * $params['create'] = (boolean) Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one (Default = false)
- * $params['cause'] = (string) User defined reason for dry-run creating the new template for simulation purposes (Default = )
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['body'] = (array) New index template definition, which will be included in the simulation, as if it already exists in the system
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function simulateIndexTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\SimulateIndexTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Simulate resolving the given template name or body
- *
- * $params['name'] = (string) The name of the index template
- * $params['create'] = (boolean) Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one (Default = false)
- * $params['cause'] = (string) User defined reason for dry-run creating the new template for simulation purposes (Default = )
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['body'] = (array) New index template definition to be simulated, if no index template name is specified
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
- */
- public function simulateTemplate(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\SimulateTemplate');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows you to split an existing index into a new index with more primary shards.
- *
- * $params['index'] = (string) The name of the source index to split
- * $params['target'] = (string) The name of the target index to split into
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the shrunken index before the operation returns.
- * $params['body'] = (array) The configuration for the target index (`settings` and `aliases`)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
- */
- public function split(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $target = $this->extractArgument($params, 'target');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Split');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setTarget($target);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Provides statistics on operations happening in an index.
- *
- * $params['metric'] = (list) Limit the information returned the specific metrics.
- * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * $params['completion_fields'] = (list) A comma-separated list of fields for the `completion` index metric (supports wildcards)
- * $params['fielddata_fields'] = (list) A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
- * $params['fields'] = (list) A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
- * $params['groups'] = (list) A comma-separated list of search groups for `search` index metric
- * $params['level'] = (enum) Return stats aggregated at cluster, index or shard level (Options = cluster,indices,shards) (Default = indices)
- * $params['types'] = (list) A comma-separated list of document types for the `indexing` index metric
- * $params['include_segment_file_sizes'] = (boolean) Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) (Default = false)
- * $params['include_unloaded_segments'] = (boolean) If set to true segment stats will include stats for segments that are not currently loaded into memory (Default = false)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['forbid_closed_indices'] = (boolean) If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices (Default = true)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html
- */
- public function stats(array $params = [])
- {
- $metric = $this->extractArgument($params, 'metric');
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Stats');
- $endpoint->setParams($params);
- $endpoint->setMetric($metric);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.
- *
- * $params['index'] = (string) The name of the index to unfreeze
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = closed)
- * $params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html
- */
- public function unfreeze(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\Unfreeze');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates index aliases.
- *
- * $params['timeout'] = (time) Request timeout
- * $params['master_timeout'] = (time) Specify timeout for connection to master
- * $params['body'] = (array) The definition of `actions` to perform (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
- */
- public function updateAliases(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\UpdateAliases');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows a user to validate a potentially expensive query without executing it.
- *
- * $params['index'] = (list) A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
- * $params['type'] = DEPRECATED (list) A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
- * $params['explain'] = (boolean) Return detailed information about the error
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
- * $params['q'] = (string) Query in the Lucene query string syntax
- * $params['analyzer'] = (string) The analyzer to use for the query string
- * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
- * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
- * $params['df'] = (string) The field to use as default where no field prefix is given in the query string
- * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * $params['rewrite'] = (boolean) Provide a more detailed explanation showing the actual Lucene query that will be executed.
- * $params['all_shards'] = (boolean) Execute validation on all shards instead of one random shard per index
- * $params['body'] = (array) The query definition specified with the Query DSL
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html
- */
- public function validateQuery(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $type = $this->extractArgument($params, 'type');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Indices\ValidateQuery');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setType($type);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Alias function to getAlias()
- *
- * @deprecated added to prevent BC break introduced in 7.2.0
- * @see https://github.com/elastic/elasticsearch-php/issues/940
- */
- public function getAliases(array $params = [])
- {
- return $this->getAlias($params);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/IngestNamespace.php b/src/Elasticsearch/Namespaces/IngestNamespace.php
deleted file mode 100644
index bbe48be19..000000000
--- a/src/Elasticsearch/Namespaces/IngestNamespace.php
+++ /dev/null
@@ -1,158 +0,0 @@
-extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ingest\DeletePipeline');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns statistical information about geoip databases
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html
- */
- public function geoIpStats(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ingest\GeoIpStats');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns a pipeline.
- *
- * $params['id'] = (string) Comma separated list of pipeline ids. Wildcards supported
- * $params['summary'] = (boolean) Return pipelines without their definitions (default: false)
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html
- */
- public function getPipeline(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ingest\GetPipeline');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns a list of the built-in patterns.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get
- */
- public function processorGrok(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ingest\ProcessorGrok');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates or updates a pipeline.
- *
- * $params['id'] = (string) Pipeline ID
- * $params['if_version'] = (int) Required version for optimistic concurrency control for pipeline updates
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['body'] = (array) The ingest definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html
- */
- public function putPipeline(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ingest\PutPipeline');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows to simulate a pipeline with example documents.
- *
- * $params['id'] = (string) Pipeline ID
- * $params['verbose'] = (boolean) Verbose mode. Display data output for each processor in executed pipeline (Default = false)
- * $params['body'] = (array) The simulate definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html
- */
- public function simulate(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ingest\Simulate');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/LicenseNamespace.php b/src/Elasticsearch/Namespaces/LicenseNamespace.php
deleted file mode 100644
index 2fb757c6b..000000000
--- a/src/Elasticsearch/Namespaces/LicenseNamespace.php
+++ /dev/null
@@ -1,158 +0,0 @@
-endpoints;
- $endpoint = $endpointBuilder('License\Delete');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves licensing information for the cluster
- *
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- * $params['accept_enterprise'] = (boolean) Supported for backwards compatibility with 7.x. If this param is used it must be set to true
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html
- */
- public function get(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('License\Get');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information about the status of the basic license.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html
- */
- public function getBasicStatus(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('License\GetBasicStatus');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information about the status of the trial license.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html
- */
- public function getTrialStatus(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('License\GetTrialStatus');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates the license for the cluster.
- *
- * $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false)
- * $params['body'] = (array) licenses to be installed
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html
- */
- public function post(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('License\Post');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Starts an indefinite basic license.
- *
- * $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html
- */
- public function postStartBasic(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('License\PostStartBasic');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * starts a limited time trial license.
- *
- * $params['type'] = (string) The type of trial license to generate (default: "trial")
- * $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html
- */
- public function postStartTrial(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('License\PostStartTrial');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/LogstashNamespace.php b/src/Elasticsearch/Namespaces/LogstashNamespace.php
deleted file mode 100644
index b510be737..000000000
--- a/src/Elasticsearch/Namespaces/LogstashNamespace.php
+++ /dev/null
@@ -1,93 +0,0 @@
-extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Logstash\DeletePipeline');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves Logstash Pipelines used by Central Management
- *
- * $params['id'] = (string) A comma-separated list of Pipeline IDs
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html
- */
- public function getPipeline(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Logstash\GetPipeline');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Adds and updates Logstash Pipelines used for Central Management
- *
- * $params['id'] = (string) The ID of the Pipeline
- * $params['body'] = (array) The Pipeline to add or update (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html
- */
- public function putPipeline(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Logstash\PutPipeline');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/MigrationNamespace.php b/src/Elasticsearch/Namespaces/MigrationNamespace.php
deleted file mode 100644
index 7b8c02df0..000000000
--- a/src/Elasticsearch/Namespaces/MigrationNamespace.php
+++ /dev/null
@@ -1,84 +0,0 @@
-extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Migration\Deprecations');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Find out whether system features need to be upgraded or not
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html
- */
- public function getFeatureUpgradeStatus(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Migration\GetFeatureUpgradeStatus');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Begin upgrades for system features
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html
- */
- public function postFeatureUpgrade(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Migration\PostFeatureUpgrade');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/MlNamespace.php b/src/Elasticsearch/Namespaces/MlNamespace.php
deleted file mode 100644
index e247bdad6..000000000
--- a/src/Elasticsearch/Namespaces/MlNamespace.php
+++ /dev/null
@@ -1,1720 +0,0 @@
-extractArgument($params, 'job_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\CloseJob');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes a calendar.
- *
- * $params['calendar_id'] = (string) The ID of the calendar to delete
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html
- */
- public function deleteCalendar(array $params = [])
- {
- $calendar_id = $this->extractArgument($params, 'calendar_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteCalendar');
- $endpoint->setParams($params);
- $endpoint->setCalendarId($calendar_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes scheduled events from a calendar.
- *
- * $params['calendar_id'] = (string) The ID of the calendar to modify
- * $params['event_id'] = (string) The ID of the event to remove from the calendar
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html
- */
- public function deleteCalendarEvent(array $params = [])
- {
- $calendar_id = $this->extractArgument($params, 'calendar_id');
- $event_id = $this->extractArgument($params, 'event_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteCalendarEvent');
- $endpoint->setParams($params);
- $endpoint->setCalendarId($calendar_id);
- $endpoint->setEventId($event_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes anomaly detection jobs from a calendar.
- *
- * $params['calendar_id'] = (string) The ID of the calendar to modify
- * $params['job_id'] = (string) The ID of the job to remove from the calendar
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html
- */
- public function deleteCalendarJob(array $params = [])
- {
- $calendar_id = $this->extractArgument($params, 'calendar_id');
- $job_id = $this->extractArgument($params, 'job_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteCalendarJob');
- $endpoint->setParams($params);
- $endpoint->setCalendarId($calendar_id);
- $endpoint->setJobId($job_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an existing data frame analytics job.
- *
- * $params['id'] = (string) The ID of the data frame analytics to delete
- * $params['force'] = (boolean) True if the job should be forcefully deleted (Default = false)
- * $params['timeout'] = (time) Controls the time to wait until a job is deleted. Defaults to 1 minute
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html
- */
- public function deleteDataFrameAnalytics(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteDataFrameAnalytics');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an existing datafeed.
- *
- * $params['datafeed_id'] = (string) The ID of the datafeed to delete
- * $params['force'] = (boolean) True if the datafeed should be forcefully deleted
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html
- */
- public function deleteDatafeed(array $params = [])
- {
- $datafeed_id = $this->extractArgument($params, 'datafeed_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteDatafeed');
- $endpoint->setParams($params);
- $endpoint->setDatafeedId($datafeed_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes expired and unused machine learning data.
- *
- * $params['job_id'] = (string) The ID of the job(s) to perform expired data hygiene for
- * $params['requests_per_second'] = (number) The desired requests per second for the deletion processes.
- * $params['timeout'] = (time) How long can the underlying delete processes run until they are canceled
- * $params['body'] = (array) deleting expired data parameters
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html
- */
- public function deleteExpiredData(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteExpiredData');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes a filter.
- *
- * $params['filter_id'] = (string) The ID of the filter to delete
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html
- */
- public function deleteFilter(array $params = [])
- {
- $filter_id = $this->extractArgument($params, 'filter_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteFilter');
- $endpoint->setParams($params);
- $endpoint->setFilterId($filter_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes forecasts from a machine learning job.
- *
- * $params['job_id'] = (string) The ID of the job from which to delete forecasts (Required)
- * $params['forecast_id'] = (string) The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all`
- * $params['allow_no_forecasts'] = (boolean) Whether to ignore if `_all` matches no forecasts
- * $params['timeout'] = (time) Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html
- */
- public function deleteForecast(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $forecast_id = $this->extractArgument($params, 'forecast_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteForecast');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setForecastId($forecast_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an existing anomaly detection job.
- *
- * $params['job_id'] = (string) The ID of the job to delete
- * $params['force'] = (boolean) True if the job should be forcefully deleted (Default = false)
- * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = true)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html
- */
- public function deleteJob(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteJob');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an existing model snapshot.
- *
- * $params['job_id'] = (string) The ID of the job to fetch
- * $params['snapshot_id'] = (string) The ID of the snapshot to delete
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html
- */
- public function deleteModelSnapshot(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $snapshot_id = $this->extractArgument($params, 'snapshot_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteModelSnapshot');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setSnapshotId($snapshot_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an existing trained inference model that is currently not referenced by an ingest pipeline.
- *
- * $params['model_id'] = (string) The ID of the trained model to delete
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html
- */
- public function deleteTrainedModel(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteTrainedModel');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes a model alias that refers to the trained model
- *
- * $params['model_alias'] = (string) The trained model alias to delete
- * $params['model_id'] = (string) The trained model where the model alias is assigned
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html
- */
- public function deleteTrainedModelAlias(array $params = [])
- {
- $model_alias = $this->extractArgument($params, 'model_alias');
- $model_id = $this->extractArgument($params, 'model_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\DeleteTrainedModelAlias');
- $endpoint->setParams($params);
- $endpoint->setModelAlias($model_alias);
- $endpoint->setModelId($model_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Estimates the model memory
- *
- * $params['body'] = (array) The analysis config, plus cardinality estimates for fields it references (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html
- */
- public function estimateModelMemory(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\EstimateModelMemory');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Evaluates the data frame analytics for an annotated index.
- *
- * $params['body'] = (array) The evaluation definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html
- */
- public function evaluateDataFrame(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\EvaluateDataFrame');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Explains a data frame analytics config.
- *
- * $params['id'] = (string) The ID of the data frame analytics to explain
- * $params['body'] = (array) The data frame analytics config to explain
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html
- */
- public function explainDataFrameAnalytics(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\ExplainDataFrameAnalytics');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Forces any buffered data to be processed by the job.
- *
- * $params['job_id'] = (string) The name of the job to flush
- * $params['calc_interim'] = (boolean) Calculates interim results for the most recent bucket or all buckets within the latency period
- * $params['start'] = (string) When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results
- * $params['end'] = (string) When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results
- * $params['advance_time'] = (string) Advances time to the given value generating results and updating the model for the advanced interval
- * $params['skip_time'] = (string) Skips time to the given value without generating results or updating the model for the skipped interval
- * $params['body'] = (array) Flush parameters
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html
- */
- public function flushJob(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\FlushJob');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Predicts the future behavior of a time series by using its historical behavior.
- *
- * $params['job_id'] = (string) The ID of the job to forecast for
- * $params['duration'] = (time) The duration of the forecast
- * $params['expires_in'] = (time) The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity.
- * $params['max_model_memory'] = (string) The max memory able to be used by the forecast. Default is 20mb.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html
- */
- public function forecast(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\Forecast');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves anomaly detection job results for one or more buckets.
- *
- * $params['job_id'] = (string) ID of the job to get bucket results from (Required)
- * $params['timestamp'] = (string) The timestamp of the desired single bucket result
- * $params['expand'] = (boolean) Include anomaly records
- * $params['exclude_interim'] = (boolean) Exclude interim results
- * $params['from'] = (int) skips a number of buckets
- * $params['size'] = (int) specifies a max number of buckets to get
- * $params['start'] = (string) Start time filter for buckets
- * $params['end'] = (string) End time filter for buckets
- * $params['anomaly_score'] = (double) Filter for the most anomalous buckets
- * $params['sort'] = (string) Sort buckets by a particular field
- * $params['desc'] = (boolean) Set the sort direction
- * $params['body'] = (array) Bucket selection details if not provided in URI
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html
- */
- public function getBuckets(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $timestamp = $this->extractArgument($params, 'timestamp');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetBuckets');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setTimestamp($timestamp);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information about the scheduled events in calendars.
- *
- * $params['calendar_id'] = (string) The ID of the calendar containing the events
- * $params['job_id'] = (string) Get events for the job. When this option is used calendar_id must be '_all'
- * $params['start'] = (string) Get events after this time
- * $params['end'] = (date) Get events before this time
- * $params['from'] = (int) Skips a number of events
- * $params['size'] = (int) Specifies a max number of events to get
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html
- */
- public function getCalendarEvents(array $params = [])
- {
- $calendar_id = $this->extractArgument($params, 'calendar_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetCalendarEvents');
- $endpoint->setParams($params);
- $endpoint->setCalendarId($calendar_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves configuration information for calendars.
- *
- * $params['calendar_id'] = (string) The ID of the calendar to fetch
- * $params['from'] = (int) skips a number of calendars
- * $params['size'] = (int) specifies a max number of calendars to get
- * $params['body'] = (array) The from and size parameters optionally sent in the body
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html
- */
- public function getCalendars(array $params = [])
- {
- $calendar_id = $this->extractArgument($params, 'calendar_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetCalendars');
- $endpoint->setParams($params);
- $endpoint->setCalendarId($calendar_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves anomaly detection job results for one or more categories.
- *
- * $params['job_id'] = (string) The name of the job (Required)
- * $params['category_id'] = (long) The identifier of the category definition of interest
- * $params['from'] = (int) skips a number of categories
- * $params['size'] = (int) specifies a max number of categories to get
- * $params['partition_field_value'] = (string) Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled.
- * $params['body'] = (array) Category selection details if not provided in URI
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html
- */
- public function getCategories(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $category_id = $this->extractArgument($params, 'category_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetCategories');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setCategoryId($category_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves configuration information for data frame analytics jobs.
- *
- * $params['id'] = (string) The ID of the data frame analytics to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) (Default = true)
- * $params['from'] = (int) skips a number of analytics (Default = 0)
- * $params['size'] = (int) specifies a max number of analytics to get (Default = 100)
- * $params['exclude_generated'] = (boolean) Omits fields that are illegal to set on data frame analytics PUT (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html
- */
- public function getDataFrameAnalytics(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetDataFrameAnalytics');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves usage information for data frame analytics jobs.
- *
- * $params['id'] = (string) The ID of the data frame analytics stats to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) (Default = true)
- * $params['from'] = (int) skips a number of analytics (Default = 0)
- * $params['size'] = (int) specifies a max number of analytics to get (Default = 100)
- * $params['verbose'] = (boolean) whether the stats response should be verbose (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html
- */
- public function getDataFrameAnalyticsStats(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetDataFrameAnalyticsStats');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves usage information for datafeeds.
- *
- * $params['datafeed_id'] = (string) The ID of the datafeeds stats to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
- * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
- */
- public function getDatafeedStats(array $params = [])
- {
- $datafeed_id = $this->extractArgument($params, 'datafeed_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetDatafeedStats');
- $endpoint->setParams($params);
- $endpoint->setDatafeedId($datafeed_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves configuration information for datafeeds.
- *
- * $params['datafeed_id'] = (string) The ID of the datafeeds to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
- * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
- * $params['exclude_generated'] = (boolean) Omits fields that are illegal to set on datafeed PUT (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html
- */
- public function getDatafeeds(array $params = [])
- {
- $datafeed_id = $this->extractArgument($params, 'datafeed_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetDatafeeds');
- $endpoint->setParams($params);
- $endpoint->setDatafeedId($datafeed_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves filters.
- *
- * $params['filter_id'] = (string) The ID of the filter to fetch
- * $params['from'] = (int) skips a number of filters
- * $params['size'] = (int) specifies a max number of filters to get
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html
- */
- public function getFilters(array $params = [])
- {
- $filter_id = $this->extractArgument($params, 'filter_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetFilters');
- $endpoint->setParams($params);
- $endpoint->setFilterId($filter_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves anomaly detection job results for one or more influencers.
- *
- * $params['job_id'] = (string) Identifier for the anomaly detection job
- * $params['exclude_interim'] = (boolean) Exclude interim results
- * $params['from'] = (int) skips a number of influencers
- * $params['size'] = (int) specifies a max number of influencers to get
- * $params['start'] = (string) start timestamp for the requested influencers
- * $params['end'] = (string) end timestamp for the requested influencers
- * $params['influencer_score'] = (double) influencer score threshold for the requested influencers
- * $params['sort'] = (string) sort field for the requested influencers
- * $params['desc'] = (boolean) whether the results should be sorted in decending order
- * $params['body'] = (array) Influencer selection criteria
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html
- */
- public function getInfluencers(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetInfluencers');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves usage information for anomaly detection jobs.
- *
- * $params['job_id'] = (string) The ID of the jobs stats to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
- * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html
- */
- public function getJobStats(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetJobStats');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves configuration information for anomaly detection jobs.
- *
- * $params['job_id'] = (string) The ID of the jobs to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
- * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
- * $params['exclude_generated'] = (boolean) Omits fields that are illegal to set on job PUT (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html
- */
- public function getJobs(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetJobs');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information about model snapshots.
- *
- * $params['job_id'] = (string) The ID of the job to fetch (Required)
- * $params['snapshot_id'] = (string) The ID of the snapshot to fetch
- * $params['from'] = (int) Skips a number of documents
- * $params['size'] = (int) The default number of documents returned in queries as a string.
- * $params['start'] = (date) The filter 'start' query parameter
- * $params['end'] = (date) The filter 'end' query parameter
- * $params['sort'] = (string) Name of the field to sort on
- * $params['desc'] = (boolean) True if the results should be sorted in descending order
- * $params['body'] = (array) Model snapshot selection criteria
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html
- */
- public function getModelSnapshots(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $snapshot_id = $this->extractArgument($params, 'snapshot_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetModelSnapshots');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setSnapshotId($snapshot_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs.
- *
- * $params['job_id'] = (string) The job IDs for which to calculate overall bucket results
- * $params['top_n'] = (int) The number of top job bucket scores to be used in the overall_score calculation
- * $params['bucket_span'] = (string) The span of the overall buckets. Defaults to the longest job bucket_span
- * $params['overall_score'] = (double) Returns overall buckets with overall scores higher than this value
- * $params['exclude_interim'] = (boolean) If true overall buckets that include interim buckets will be excluded
- * $params['start'] = (string) Returns overall buckets with timestamps after this time
- * $params['end'] = (string) Returns overall buckets with timestamps earlier than this time
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
- * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
- * $params['body'] = (array) Overall bucket selection details if not provided in URI
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html
- */
- public function getOverallBuckets(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetOverallBuckets');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves anomaly records for an anomaly detection job.
- *
- * $params['job_id'] = (string) The ID of the job
- * $params['exclude_interim'] = (boolean) Exclude interim results
- * $params['from'] = (int) skips a number of records
- * $params['size'] = (int) specifies a max number of records to get
- * $params['start'] = (string) Start time filter for records
- * $params['end'] = (string) End time filter for records
- * $params['record_score'] = (double) Returns records with anomaly scores greater or equal than this value
- * $params['sort'] = (string) Sort records by a particular field
- * $params['desc'] = (boolean) Set the sort direction
- * $params['body'] = (array) Record selection criteria
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html
- */
- public function getRecords(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetRecords');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Get information about trained model deployments.
- *
- * $params['model_id'] = (string) The ID of the trained model deployment stats to fetch
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-trained-model-deployment-stats.html
- */
- public function getTrainedModelDeploymentStats(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetTrainedModelDeploymentStats');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves configuration information for a trained inference model.
- *
- * $params['model_id'] = (string) The ID of the trained models to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true)
- * $params['include'] = (string) A comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none.
- * $params['include_model_definition'] = (boolean) Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false. (Default = false)
- * $params['decompress_definition'] = (boolean) Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true. (Default = true)
- * $params['from'] = (int) skips a number of trained models (Default = 0)
- * $params['size'] = (int) specifies a max number of trained models to get (Default = 100)
- * $params['tags'] = (list) A comma-separated list of tags that the model must have.
- * $params['exclude_generated'] = (boolean) Omits fields that are illegal to set on model PUT (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html
- */
- public function getTrainedModels(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetTrainedModels');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves usage information for trained inference models.
- *
- * $params['model_id'] = (string) The ID of the trained models stats to fetch
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true)
- * $params['from'] = (int) skips a number of trained models (Default = 0)
- * $params['size'] = (int) specifies a max number of trained models to get (Default = 100)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html
- */
- public function getTrainedModelsStats(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\GetTrainedModelsStats');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Evaluate a trained model.
- *
- * $params['model_id'] = (string) The unique identifier of the trained model.
- * $params['timeout'] = (time) Controls the amount of time to wait for inference results. (Default = 10s)
- * $params['body'] = (array) The docs to apply inference on (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model-deployment.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function inferTrainedModelDeployment(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\InferTrainedModelDeployment');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns defaults and limits used by machine learning.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html
- */
- public function info(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\Info');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Opens one or more anomaly detection jobs.
- *
- * $params['job_id'] = (string) The ID of the job to open
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html
- */
- public function openJob(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\OpenJob');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Posts scheduled events in a calendar.
- *
- * $params['calendar_id'] = (string) The ID of the calendar to modify
- * $params['body'] = (array) A list of events (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html
- */
- public function postCalendarEvents(array $params = [])
- {
- $calendar_id = $this->extractArgument($params, 'calendar_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PostCalendarEvents');
- $endpoint->setParams($params);
- $endpoint->setCalendarId($calendar_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Sends data to an anomaly detection job for analysis.
- *
- * $params['job_id'] = (string) The name of the job receiving the data
- * $params['reset_start'] = (string) Optional parameter to specify the start of the bucket resetting range
- * $params['reset_end'] = (string) Optional parameter to specify the end of the bucket resetting range
- * $params['body'] = (array) The data to process (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html
- */
- public function postData(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PostData');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Previews that will be analyzed given a data frame analytics config.
- *
- * $params['id'] = (string) The ID of the data frame analytics to preview
- * $params['body'] = (array) The data frame analytics config to preview
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html
- */
- public function previewDataFrameAnalytics(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PreviewDataFrameAnalytics');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Previews a datafeed.
- *
- * $params['datafeed_id'] = (string) The ID of the datafeed to preview
- * $params['body'] = (array) The datafeed config and job config with which to execute the preview
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html
- */
- public function previewDatafeed(array $params = [])
- {
- $datafeed_id = $this->extractArgument($params, 'datafeed_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PreviewDatafeed');
- $endpoint->setParams($params);
- $endpoint->setDatafeedId($datafeed_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Instantiates a calendar.
- *
- * $params['calendar_id'] = (string) The ID of the calendar to create
- * $params['body'] = (array) The calendar details
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html
- */
- public function putCalendar(array $params = [])
- {
- $calendar_id = $this->extractArgument($params, 'calendar_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutCalendar');
- $endpoint->setParams($params);
- $endpoint->setCalendarId($calendar_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Adds an anomaly detection job to a calendar.
- *
- * $params['calendar_id'] = (string) The ID of the calendar to modify
- * $params['job_id'] = (string) The ID of the job to add to the calendar
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html
- */
- public function putCalendarJob(array $params = [])
- {
- $calendar_id = $this->extractArgument($params, 'calendar_id');
- $job_id = $this->extractArgument($params, 'job_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutCalendarJob');
- $endpoint->setParams($params);
- $endpoint->setCalendarId($calendar_id);
- $endpoint->setJobId($job_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Instantiates a data frame analytics job.
- *
- * $params['id'] = (string) The ID of the data frame analytics to create
- * $params['body'] = (array) The data frame analytics configuration (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html
- */
- public function putDataFrameAnalytics(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutDataFrameAnalytics');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Instantiates a datafeed.
- *
- * $params['datafeed_id'] = (string) The ID of the datafeed to create
- * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false)
- * $params['allow_no_indices'] = (boolean) Ignore if the source indices expressions resolves to no concrete indices (default: true)
- * $params['ignore_throttled'] = (boolean) Ignore indices that are marked as throttled (default: true)
- * $params['expand_wildcards'] = (enum) Whether source index expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all)
- * $params['body'] = (array) The datafeed config (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
- */
- public function putDatafeed(array $params = [])
- {
- $datafeed_id = $this->extractArgument($params, 'datafeed_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutDatafeed');
- $endpoint->setParams($params);
- $endpoint->setDatafeedId($datafeed_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Instantiates a filter.
- *
- * $params['filter_id'] = (string) The ID of the filter to create
- * $params['body'] = (array) The filter details (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html
- */
- public function putFilter(array $params = [])
- {
- $filter_id = $this->extractArgument($params, 'filter_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutFilter');
- $endpoint->setParams($params);
- $endpoint->setFilterId($filter_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Instantiates an anomaly detection job.
- *
- * $params['job_id'] = (string) The ID of the job to create
- * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false). Only set if datafeed_config is provided.
- * $params['allow_no_indices'] = (boolean) Ignore if the source indices expressions resolves to no concrete indices (default: true). Only set if datafeed_config is provided.
- * $params['ignore_throttled'] = (boolean) Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided.
- * $params['expand_wildcards'] = (enum) Whether source index expressions should get expanded to open or closed indices (default: open). Only set if datafeed_config is provided. (Options = open,closed,hidden,none,all)
- * $params['body'] = (array) The job (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html
- */
- public function putJob(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutJob');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates an inference trained model.
- *
- * $params['model_id'] = (string) The ID of the trained models to store
- * $params['defer_definition_decompression'] = (boolean) If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations. (Default = false)
- * $params['body'] = (array) The trained model configuration (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html
- */
- public function putTrainedModel(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutTrainedModel');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a new model alias (or reassigns an existing one) to refer to the trained model
- *
- * $params['model_alias'] = (string) The trained model alias to update
- * $params['model_id'] = (string) The trained model where the model alias should be assigned
- * $params['reassign'] = (boolean) If the model_alias already exists and points to a separate model_id, this parameter must be true. Defaults to false.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html
- */
- public function putTrainedModelAlias(array $params = [])
- {
- $model_alias = $this->extractArgument($params, 'model_alias');
- $model_id = $this->extractArgument($params, 'model_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutTrainedModelAlias');
- $endpoint->setParams($params);
- $endpoint->setModelAlias($model_alias);
- $endpoint->setModelId($model_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates part of a trained model definition
- *
- * $params['model_id'] = (string) The ID of the trained model for this definition part
- * $params['part'] = (int) The part number
- * $params['body'] = (array) The trained model definition part (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function putTrainedModelDefinitionPart(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
- $part = $this->extractArgument($params, 'part');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutTrainedModelDefinitionPart');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
- $endpoint->setPart($part);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a trained model vocabulary
- *
- * $params['model_id'] = (string) The ID of the trained model for this vocabulary
- * $params['body'] = (array) The trained model vocabulary (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function putTrainedModelVocabulary(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\PutTrainedModelVocabulary');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Resets an existing anomaly detection job.
- *
- * $params['job_id'] = (string) The ID of the job to reset
- * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = true)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html
- */
- public function resetJob(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\ResetJob');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Reverts to a specific snapshot.
- *
- * $params['job_id'] = (string) The ID of the job to fetch
- * $params['snapshot_id'] = (string) The ID of the snapshot to revert to
- * $params['delete_intervening_results'] = (boolean) Should we reset the results back to the time of the snapshot?
- * $params['body'] = (array) Reversion options
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html
- */
- public function revertModelSnapshot(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $snapshot_id = $this->extractArgument($params, 'snapshot_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\RevertModelSnapshot');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setSnapshotId($snapshot_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade.
- *
- * $params['enabled'] = (boolean) Whether to enable upgrade_mode ML setting or not. Defaults to false.
- * $params['timeout'] = (time) Controls the time to wait before action times out. Defaults to 30 seconds
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html
- */
- public function setUpgradeMode(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\SetUpgradeMode');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Starts a data frame analytics job.
- *
- * $params['id'] = (string) The ID of the data frame analytics to start
- * $params['timeout'] = (time) Controls the time to wait until the task has started. Defaults to 20 seconds
- * $params['body'] = (array) The start data frame analytics parameters
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html
- */
- public function startDataFrameAnalytics(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\StartDataFrameAnalytics');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Starts one or more datafeeds.
- *
- * $params['datafeed_id'] = (string) The ID of the datafeed to start
- * $params['start'] = (string) The start time from where the datafeed should begin
- * $params['end'] = (string) The end time when the datafeed should stop. When not set, the datafeed continues in real time
- * $params['timeout'] = (time) Controls the time to wait until a datafeed has started. Default to 20 seconds
- * $params['body'] = (array) The start datafeed parameters
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html
- */
- public function startDatafeed(array $params = [])
- {
- $datafeed_id = $this->extractArgument($params, 'datafeed_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\StartDatafeed');
- $endpoint->setParams($params);
- $endpoint->setDatafeedId($datafeed_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Start a trained model deployment.
- *
- * $params['model_id'] = (string) The unique identifier of the trained model.
- * $params['timeout'] = (time) Controls the amount of time to wait for the model to deploy. (Default = 20s)
- * $params['wait_for'] = (string) The allocation status for which to wait (Options = starting,started,fully_allocated) (Default = started)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function startTrainedModelDeployment(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\StartTrainedModelDeployment');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Stops one or more data frame analytics jobs.
- *
- * $params['id'] = (string) The ID of the data frame analytics to stop
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified)
- * $params['force'] = (boolean) True if the data frame analytics should be forcefully stopped
- * $params['timeout'] = (time) Controls the time to wait until the task has stopped. Defaults to 20 seconds
- * $params['body'] = (array) The stop data frame analytics parameters
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html
- */
- public function stopDataFrameAnalytics(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\StopDataFrameAnalytics');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Stops one or more datafeeds.
- *
- * $params['datafeed_id'] = (string) The ID of the datafeed to stop
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
- * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
- * $params['force'] = (boolean) True if the datafeed should be forcefully stopped.
- * $params['timeout'] = (time) Controls the time to wait until a datafeed has stopped. Default to 20 seconds
- * $params['body'] = (array) The URL params optionally sent in the body
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html
- */
- public function stopDatafeed(array $params = [])
- {
- $datafeed_id = $this->extractArgument($params, 'datafeed_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\StopDatafeed');
- $endpoint->setParams($params);
- $endpoint->setDatafeedId($datafeed_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Stop a trained model deployment.
- *
- * $params['model_id'] = (string) The unique identifier of the trained model.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/stop-trained-model-deployment.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function stopTrainedModelDeployment(array $params = [])
- {
- $model_id = $this->extractArgument($params, 'model_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\StopTrainedModelDeployment');
- $endpoint->setParams($params);
- $endpoint->setModelId($model_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates certain properties of a data frame analytics job.
- *
- * $params['id'] = (string) The ID of the data frame analytics to update
- * $params['body'] = (array) The data frame analytics settings to update (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html
- */
- public function updateDataFrameAnalytics(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\UpdateDataFrameAnalytics');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates certain properties of a datafeed.
- *
- * $params['datafeed_id'] = (string) The ID of the datafeed to update
- * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false)
- * $params['allow_no_indices'] = (boolean) Ignore if the source indices expressions resolves to no concrete indices (default: true)
- * $params['ignore_throttled'] = (boolean) Ignore indices that are marked as throttled (default: true)
- * $params['expand_wildcards'] = (enum) Whether source index expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all)
- * $params['body'] = (array) The datafeed update settings (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html
- */
- public function updateDatafeed(array $params = [])
- {
- $datafeed_id = $this->extractArgument($params, 'datafeed_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\UpdateDatafeed');
- $endpoint->setParams($params);
- $endpoint->setDatafeedId($datafeed_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates the description of a filter, adds items, or removes items.
- *
- * $params['filter_id'] = (string) The ID of the filter to update
- * $params['body'] = (array) The filter update (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html
- */
- public function updateFilter(array $params = [])
- {
- $filter_id = $this->extractArgument($params, 'filter_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\UpdateFilter');
- $endpoint->setParams($params);
- $endpoint->setFilterId($filter_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates certain properties of an anomaly detection job.
- *
- * $params['job_id'] = (string) The ID of the job to create
- * $params['body'] = (array) The job update settings (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html
- */
- public function updateJob(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\UpdateJob');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates certain properties of a snapshot.
- *
- * $params['job_id'] = (string) The ID of the job to fetch
- * $params['snapshot_id'] = (string) The ID of the snapshot to update
- * $params['body'] = (array) The model snapshot properties to update (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html
- */
- public function updateModelSnapshot(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $snapshot_id = $this->extractArgument($params, 'snapshot_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\UpdateModelSnapshot');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setSnapshotId($snapshot_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Upgrades a given job snapshot to the current major version.
- *
- * $params['job_id'] = (string) The ID of the job
- * $params['snapshot_id'] = (string) The ID of the snapshot
- * $params['timeout'] = (time) How long should the API wait for the job to be opened and the old snapshot to be loaded.
- * $params['wait_for_completion'] = (boolean) Should the request wait until the task is complete before responding to the caller. Default is false.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html
- */
- public function upgradeJobSnapshot(array $params = [])
- {
- $job_id = $this->extractArgument($params, 'job_id');
- $snapshot_id = $this->extractArgument($params, 'snapshot_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\UpgradeJobSnapshot');
- $endpoint->setParams($params);
- $endpoint->setJobId($job_id);
- $endpoint->setSnapshotId($snapshot_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Validates an anomaly detection job.
- *
- * $params['body'] = (array) The job config (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html
- */
- public function validate(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\Validate');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Validates an anomaly detection detector.
- *
- * $params['body'] = (array) The detector (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html
- */
- public function validateDetector(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Ml\ValidateDetector');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/MonitoringNamespace.php b/src/Elasticsearch/Namespaces/MonitoringNamespace.php
deleted file mode 100644
index 05f8f871d..000000000
--- a/src/Elasticsearch/Namespaces/MonitoringNamespace.php
+++ /dev/null
@@ -1,56 +0,0 @@
-extractArgument($params, 'type');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Monitoring\Bulk');
- $endpoint->setParams($params);
- $endpoint->setType($type);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/NamespaceBuilderInterface.php b/src/Elasticsearch/Namespaces/NamespaceBuilderInterface.php
deleted file mode 100644
index cb14b414a..000000000
--- a/src/Elasticsearch/Namespaces/NamespaceBuilderInterface.php
+++ /dev/null
@@ -1,42 +0,0 @@
-foo()`
- */
- public function getName(): string;
-
- /**
- * Returns the actual namespace object which contains your custom methods. The transport
- * and serializer objects are provided so that your namespace may do whatever custom
- * logic is required.
- *
- * @param Transport $transport
- * @param SerializerInterface $serializer
- * @return Object
- */
- public function getObject(Transport $transport, SerializerInterface $serializer);
-}
diff --git a/src/Elasticsearch/Namespaces/NodesNamespace.php b/src/Elasticsearch/Namespaces/NodesNamespace.php
deleted file mode 100644
index 030de2a9f..000000000
--- a/src/Elasticsearch/Namespaces/NodesNamespace.php
+++ /dev/null
@@ -1,213 +0,0 @@
-extractArgument($params, 'node_id');
- $max_archive_version = $this->extractArgument($params, 'max_archive_version');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Nodes\ClearRepositoriesMeteringArchive');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
- $endpoint->setMaxArchiveVersion($max_archive_version);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns cluster repositories metering information.
- *
- * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function getRepositoriesMeteringInfo(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Nodes\GetRepositoriesMeteringInfo');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about hot threads on each node in the cluster.
- *
- * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * $params['interval'] = (time) The interval for the second sampling of threads
- * $params['snapshots'] = (number) Number of samples of thread stacktrace (default: 10)
- * $params['threads'] = (number) Specify the number of threads to provide information for (default: 3)
- * $params['ignore_idle_threads'] = (boolean) Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
- * $params['type'] = (enum) The type to sample (default: cpu) (Options = cpu,wait,block)
- * $params['timeout'] = (time) Explicit operation timeout
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html
- */
- public function hotThreads(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Nodes\HotThreads');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about nodes in the cluster.
- *
- * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * $params['metric'] = (list) A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics.
- * $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
- * $params['timeout'] = (time) Explicit operation timeout
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html
- */
- public function info(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
- $metric = $this->extractArgument($params, 'metric');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Nodes\Info');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
- $endpoint->setMetric($metric);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Reloads secure settings.
- *
- * $params['node_id'] = (list) A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['body'] = (array) An object containing the password for the elasticsearch keystore
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings
- */
- public function reloadSecureSettings(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Nodes\ReloadSecureSettings');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns statistical information about nodes in the cluster.
- *
- * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * $params['metric'] = (list) Limit the information returned to the specified metrics
- * $params['index_metric'] = (list) Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
- * $params['completion_fields'] = (list) A comma-separated list of fields for the `completion` index metric (supports wildcards)
- * $params['fielddata_fields'] = (list) A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
- * $params['fields'] = (list) A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
- * $params['groups'] = (boolean) A comma-separated list of search groups for `search` index metric
- * $params['level'] = (enum) Return indices stats aggregated at index, node or shard level (Options = indices,node,shards) (Default = node)
- * $params['types'] = (list) A comma-separated list of document types for the `indexing` index metric
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['include_segment_file_sizes'] = (boolean) Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) (Default = false)
- * $params['include_unloaded_segments'] = (boolean) If set to true segment stats will include stats for segments that are not currently loaded into memory (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
- */
- public function stats(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
- $metric = $this->extractArgument($params, 'metric');
- $index_metric = $this->extractArgument($params, 'index_metric');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Nodes\Stats');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
- $endpoint->setMetric($metric);
- $endpoint->setIndexMetric($index_metric);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns low-level information about REST actions usage on nodes.
- *
- * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * $params['metric'] = (list) Limit the information returned to the specified metrics
- * $params['timeout'] = (time) Explicit operation timeout
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
- */
- public function usage(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
- $metric = $this->extractArgument($params, 'metric');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Nodes\Usage');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
- $endpoint->setMetric($metric);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/RollupNamespace.php b/src/Elasticsearch/Namespaces/RollupNamespace.php
deleted file mode 100644
index e8073d964..000000000
--- a/src/Elasticsearch/Namespaces/RollupNamespace.php
+++ /dev/null
@@ -1,256 +0,0 @@
-extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Rollup\DeleteJob');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves the configuration, stats, and status of rollup jobs.
- *
- * $params['id'] = (string) The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function getJobs(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Rollup\GetJobs');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern.
- *
- * $params['id'] = (string) The ID of the index to check rollup capabilities on, or left blank for all jobs
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function getRollupCaps(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Rollup\GetRollupCaps');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored).
- *
- * $params['index'] = (string) The rollup index or index pattern to obtain rollup capabilities from.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-index-caps.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function getRollupIndexCaps(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Rollup\GetRollupIndexCaps');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a rollup job.
- *
- * $params['id'] = (string) The ID of the job to create
- * $params['body'] = (array) The job configuration (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-put-job.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function putJob(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Rollup\PutJob');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Rollup an index
- *
- * $params['index'] = (string) The index to roll up
- * $params['rollup_index'] = (string) The name of the rollup index to create
- * $params['body'] = (array) The rollup configuration (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function rollup(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $rollup_index = $this->extractArgument($params, 'rollup_index');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Rollup\Rollup');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setRollupIndex($rollup_index);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Enables searching rolled-up data using the standard query DSL.
- *
- * $params['index'] = (list) The indices or index-pattern(s) (containing rollup or regular data) that should be searched (Required)
- * $params['type'] = DEPRECATED (string) The doc type inside the index
- * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- * $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
- * $params['body'] = (array) The search request body (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-search.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function rollupSearch(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
- $type = $this->extractArgument($params, 'type');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Rollup\RollupSearch');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
- $endpoint->setType($type);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Starts an existing, stopped rollup job.
- *
- * $params['id'] = (string) The ID of the job to start
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-start-job.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function startJob(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Rollup\StartJob');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Stops an existing, started rollup job.
- *
- * $params['id'] = (string) The ID of the job to stop
- * $params['wait_for_completion'] = (boolean) True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false.
- * $params['timeout'] = (time) Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-stop-job.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function stopJob(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Rollup\StopJob');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.php b/src/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.php
deleted file mode 100644
index e5fc3c3b7..000000000
--- a/src/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.php
+++ /dev/null
@@ -1,129 +0,0 @@
-extractArgument($params, 'node_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('SearchableSnapshots\CacheStats');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Clear the cache of searchable snapshots.
- *
- * $params['index'] = (list) A comma-separated list of index names
- * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
- * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function clearCache(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('SearchableSnapshots\ClearCache');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Mount a snapshot as a searchable index.
- *
- * $params['repository'] = (string) The name of the repository containing the snapshot of the index to mount
- * $params['snapshot'] = (string) The name of the snapshot of the index to mount
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = false)
- * $params['storage'] = (string) Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy` (Default = )
- * $params['body'] = (array) The restore configuration for mounting the snapshot as searchable (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html
- */
- public function mount(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
- $snapshot = $this->extractArgument($params, 'snapshot');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('SearchableSnapshots\Mount');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
- $endpoint->setSnapshot($snapshot);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieve shard-level statistics about searchable snapshots.
- *
- * $params['index'] = (list) A comma-separated list of index names
- * $params['level'] = (enum) Return stats aggregated at cluster, index or shard level (Options = cluster,indices,shards) (Default = indices)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html
- */
- public function stats(array $params = [])
- {
- $index = $this->extractArgument($params, 'index');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('SearchableSnapshots\Stats');
- $endpoint->setParams($params);
- $endpoint->setIndex($index);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/SecurityNamespace.php b/src/Elasticsearch/Namespaces/SecurityNamespace.php
deleted file mode 100644
index e3793ce79..000000000
--- a/src/Elasticsearch/Namespaces/SecurityNamespace.php
+++ /dev/null
@@ -1,938 +0,0 @@
-endpoints;
- $endpoint = $endpointBuilder('Security\Authenticate');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Changes the passwords of users in the native realm and built-in users.
- *
- * $params['username'] = (string) The username of the user to change the password for
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['body'] = (array) the new password for the user (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html
- */
- public function changePassword(array $params = [])
- {
- $username = $this->extractArgument($params, 'username');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\ChangePassword');
- $endpoint->setParams($params);
- $endpoint->setUsername($username);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Clear a subset or all entries from the API key cache.
- *
- * $params['ids'] = (list) A comma-separated list of IDs of API keys to clear from the cache
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html
- */
- public function clearApiKeyCache(array $params = [])
- {
- $ids = $this->extractArgument($params, 'ids');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\ClearApiKeyCache');
- $endpoint->setParams($params);
- $endpoint->setIds($ids);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Evicts application privileges from the native application privileges cache.
- *
- * $params['application'] = (list) A comma-separated list of application names
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html
- */
- public function clearCachedPrivileges(array $params = [])
- {
- $application = $this->extractArgument($params, 'application');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\ClearCachedPrivileges');
- $endpoint->setParams($params);
- $endpoint->setApplication($application);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Evicts users from the user cache. Can completely clear the cache or evict specific users.
- *
- * $params['realms'] = (list) Comma-separated list of realms to clear
- * $params['usernames'] = (list) Comma-separated list of usernames to clear from the cache
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html
- */
- public function clearCachedRealms(array $params = [])
- {
- $realms = $this->extractArgument($params, 'realms');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\ClearCachedRealms');
- $endpoint->setParams($params);
- $endpoint->setRealms($realms);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Evicts roles from the native role cache.
- *
- * $params['name'] = (list) Role name
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html
- */
- public function clearCachedRoles(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\ClearCachedRoles');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Evicts tokens from the service account token caches.
- *
- * $params['namespace'] = (string) An identifier for the namespace
- * $params['service'] = (string) An identifier for the service name
- * $params['name'] = (list) A comma-separated list of service token names
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html
- */
- public function clearCachedServiceTokens(array $params = [])
- {
- $namespace = $this->extractArgument($params, 'namespace');
- $service = $this->extractArgument($params, 'service');
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\ClearCachedServiceTokens');
- $endpoint->setParams($params);
- $endpoint->setNamespace($namespace);
- $endpoint->setService($service);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates an API key for access without requiring basic authentication.
- *
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['body'] = (array) The api key request to create an API key (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
- */
- public function createApiKey(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\CreateApiKey');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a service account token for access without requiring basic authentication.
- *
- * $params['namespace'] = (string) An identifier for the namespace (Required)
- * $params['service'] = (string) An identifier for the service name (Required)
- * $params['name'] = (string) An identifier for the token name
- * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html
- */
- public function createServiceToken(array $params = [])
- {
- $namespace = $this->extractArgument($params, 'namespace');
- $service = $this->extractArgument($params, 'service');
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\CreateServiceToken');
- $endpoint->setParams($params);
- $endpoint->setNamespace($namespace);
- $endpoint->setService($service);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Removes application privileges.
- *
- * $params['application'] = (string) Application name
- * $params['name'] = (string) Privilege name
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html
- */
- public function deletePrivileges(array $params = [])
- {
- $application = $this->extractArgument($params, 'application');
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\DeletePrivileges');
- $endpoint->setParams($params);
- $endpoint->setApplication($application);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Removes roles in the native realm.
- *
- * $params['name'] = (string) Role name
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html
- */
- public function deleteRole(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\DeleteRole');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Removes role mappings.
- *
- * $params['name'] = (string) Role-mapping name
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html
- */
- public function deleteRoleMapping(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\DeleteRoleMapping');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes a service account token.
- *
- * $params['namespace'] = (string) An identifier for the namespace
- * $params['service'] = (string) An identifier for the service name
- * $params['name'] = (string) An identifier for the token name
- * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html
- */
- public function deleteServiceToken(array $params = [])
- {
- $namespace = $this->extractArgument($params, 'namespace');
- $service = $this->extractArgument($params, 'service');
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\DeleteServiceToken');
- $endpoint->setParams($params);
- $endpoint->setNamespace($namespace);
- $endpoint->setService($service);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes users from the native realm.
- *
- * $params['username'] = (string) username
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html
- */
- public function deleteUser(array $params = [])
- {
- $username = $this->extractArgument($params, 'username');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\DeleteUser');
- $endpoint->setParams($params);
- $endpoint->setUsername($username);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Disables users in the native realm.
- *
- * $params['username'] = (string) The username of the user to disable
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html
- */
- public function disableUser(array $params = [])
- {
- $username = $this->extractArgument($params, 'username');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\DisableUser');
- $endpoint->setParams($params);
- $endpoint->setUsername($username);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Enables users in the native realm.
- *
- * $params['username'] = (string) The username of the user to enable
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html
- */
- public function enableUser(array $params = [])
- {
- $username = $this->extractArgument($params, 'username');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\EnableUser');
- $endpoint->setParams($params);
- $endpoint->setUsername($username);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows a kibana instance to configure itself to communicate with a secured elasticsearch cluster.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-kibana-enrollment.html
- */
- public function enrollKibana(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\EnrollKibana');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Allows a new node to enroll to an existing cluster with security enabled.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-node-enrollment.html
- */
- public function enrollNode(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\EnrollNode');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information for one or more API keys.
- *
- * $params['id'] = (string) API key id of the API key to be retrieved
- * $params['name'] = (string) API key name of the API key to be retrieved
- * $params['username'] = (string) user name of the user who created this API key to be retrieved
- * $params['realm_name'] = (string) realm name of the user who created this API key to be retrieved
- * $params['owner'] = (boolean) flag to query API keys owned by the currently authenticated user (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html
- */
- public function getApiKey(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetApiKey');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html
- */
- public function getBuiltinPrivileges(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetBuiltinPrivileges');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves application privileges.
- *
- * $params['application'] = (string) Application name
- * $params['name'] = (string) Privilege name
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html
- */
- public function getPrivileges(array $params = [])
- {
- $application = $this->extractArgument($params, 'application');
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetPrivileges');
- $endpoint->setParams($params);
- $endpoint->setApplication($application);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves roles in the native realm.
- *
- * $params['name'] = (list) A comma-separated list of role names
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html
- */
- public function getRole(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetRole');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves role mappings.
- *
- * $params['name'] = (list) A comma-separated list of role-mapping names
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html
- */
- public function getRoleMapping(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetRoleMapping');
- $endpoint->setParams($params);
- $endpoint->setName($name);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information about service accounts.
- *
- * $params['namespace'] = (string) An identifier for the namespace
- * $params['service'] = (string) An identifier for the service name
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html
- */
- public function getServiceAccounts(array $params = [])
- {
- $namespace = $this->extractArgument($params, 'namespace');
- $service = $this->extractArgument($params, 'service');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetServiceAccounts');
- $endpoint->setParams($params);
- $endpoint->setNamespace($namespace);
- $endpoint->setService($service);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information of all service credentials for a service account.
- *
- * $params['namespace'] = (string) An identifier for the namespace
- * $params['service'] = (string) An identifier for the service name
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html
- */
- public function getServiceCredentials(array $params = [])
- {
- $namespace = $this->extractArgument($params, 'namespace');
- $service = $this->extractArgument($params, 'service');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetServiceCredentials');
- $endpoint->setParams($params);
- $endpoint->setNamespace($namespace);
- $endpoint->setService($service);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a bearer token for access without requiring basic authentication.
- *
- * $params['body'] = (array) The token request to get (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html
- */
- public function getToken(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetToken');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information about users in the native realm and built-in users.
- *
- * $params['username'] = (list) A comma-separated list of usernames
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html
- */
- public function getUser(array $params = [])
- {
- $username = $this->extractArgument($params, 'username');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetUser');
- $endpoint->setParams($params);
- $endpoint->setUsername($username);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves security privileges for the logged in user.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html
- */
- public function getUserPrivileges(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GetUserPrivileges');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates an API key on behalf of another user.
- *
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['body'] = (array) The api key request to create an API key (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html
- */
- public function grantApiKey(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\GrantApiKey');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Determines whether the specified user has a specified list of privileges.
- *
- * $params['user'] = (string) Username
- * $params['body'] = (array) The privileges to test (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html
- */
- public function hasPrivileges(array $params = [])
- {
- $user = $this->extractArgument($params, 'user');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\HasPrivileges');
- $endpoint->setParams($params);
- $endpoint->setUser($user);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Invalidates one or more API keys.
- *
- * $params['body'] = (array) The api key request to invalidate API key(s) (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html
- */
- public function invalidateApiKey(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\InvalidateApiKey');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Invalidates one or more access tokens or refresh tokens.
- *
- * $params['body'] = (array) The token to invalidate (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html
- */
- public function invalidateToken(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\InvalidateToken');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Adds or updates application privileges.
- *
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['body'] = (array) The privilege(s) to add (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html
- */
- public function putPrivileges(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\PutPrivileges');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Adds and updates roles in the native realm.
- *
- * $params['name'] = (string) Role name
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['body'] = (array) The role to add (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html
- */
- public function putRole(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\PutRole');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates and updates role mappings.
- *
- * $params['name'] = (string) Role-mapping name
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['body'] = (array) The role mapping to add (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html
- */
- public function putRoleMapping(array $params = [])
- {
- $name = $this->extractArgument($params, 'name');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\PutRoleMapping');
- $endpoint->setParams($params);
- $endpoint->setName($name);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Adds and updates users in the native realm. These users are commonly referred to as native users.
- *
- * $params['username'] = (string) The username of the User
- * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for)
- * $params['body'] = (array) The user to add (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html
- */
- public function putUser(array $params = [])
- {
- $username = $this->extractArgument($params, 'username');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\PutUser');
- $endpoint->setParams($params);
- $endpoint->setUsername($username);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves information for API keys using a subset of query DSL
- *
- * $params['body'] = (array) From, size, query, sort and search_after
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html
- */
- public function queryApiKeys(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\QueryApiKeys');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Exchanges a SAML Response message for an Elasticsearch access token and refresh token pair
- *
- * $params['body'] = (array) The SAML response to authenticate (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html
- */
- public function samlAuthenticate(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\SamlAuthenticate');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Verifies the logout response sent from the SAML IdP
- *
- * $params['body'] = (array) The logout response to verify (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html
- */
- public function samlCompleteLogout(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\SamlCompleteLogout');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Consumes a SAML LogoutRequest
- *
- * $params['body'] = (array) The LogoutRequest message (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html
- */
- public function samlInvalidate(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\SamlInvalidate');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Invalidates an access token and a refresh token that were generated via the SAML Authenticate API
- *
- * $params['body'] = (array) The tokens to invalidate (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html
- */
- public function samlLogout(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\SamlLogout');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a SAML authentication request
- *
- * $params['body'] = (array) The realm for which to create the authentication request, identified by either its name or the ACS URL (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html
- */
- public function samlPrepareAuthentication(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\SamlPrepareAuthentication');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider
- *
- * $params['realm_name'] = (string) The name of the SAML realm to get the metadata for
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html
- */
- public function samlServiceProviderMetadata(array $params = [])
- {
- $realm_name = $this->extractArgument($params, 'realm_name');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Security\SamlServiceProviderMetadata');
- $endpoint->setParams($params);
- $endpoint->setRealmName($realm_name);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/ShutdownNamespace.php b/src/Elasticsearch/Namespaces/ShutdownNamespace.php
deleted file mode 100644
index 7d3e6d08d..000000000
--- a/src/Elasticsearch/Namespaces/ShutdownNamespace.php
+++ /dev/null
@@ -1,93 +0,0 @@
-extractArgument($params, 'node_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Shutdown\DeleteNode');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
- *
- * $params['node_id'] = (string) Which node for which to retrieve the shutdown status
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
- */
- public function getNode(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Shutdown\GetNode');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
- *
- * $params['node_id'] = (string) The node id of node to be shut down
- * $params['body'] = (array) The shutdown type definition to register (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
- */
- public function putNode(array $params = [])
- {
- $node_id = $this->extractArgument($params, 'node_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Shutdown\PutNode');
- $endpoint->setParams($params);
- $endpoint->setNodeId($node_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/SlmNamespace.php b/src/Elasticsearch/Namespaces/SlmNamespace.php
deleted file mode 100644
index 4979d518b..000000000
--- a/src/Elasticsearch/Namespaces/SlmNamespace.php
+++ /dev/null
@@ -1,198 +0,0 @@
-extractArgument($params, 'policy_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Slm\DeleteLifecycle');
- $endpoint->setParams($params);
- $endpoint->setPolicyId($policy_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.
- *
- * $params['policy_id'] = (string) The id of the snapshot lifecycle policy to be executed
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html
- */
- public function executeLifecycle(array $params = [])
- {
- $policy_id = $this->extractArgument($params, 'policy_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Slm\ExecuteLifecycle');
- $endpoint->setParams($params);
- $endpoint->setPolicyId($policy_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes any snapshots that are expired according to the policy's retention rules.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html
- */
- public function executeRetention(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Slm\ExecuteRetention');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.
- *
- * $params['policy_id'] = (list) Comma-separated list of snapshot lifecycle policies to retrieve
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html
- */
- public function getLifecycle(array $params = [])
- {
- $policy_id = $this->extractArgument($params, 'policy_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Slm\GetLifecycle');
- $endpoint->setParams($params);
- $endpoint->setPolicyId($policy_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns global and policy-level statistics about actions taken by snapshot lifecycle management.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html
- */
- public function getStats(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Slm\GetStats');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves the status of snapshot lifecycle management (SLM).
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html
- */
- public function getStatus(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Slm\GetStatus');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates or updates a snapshot lifecycle policy.
- *
- * $params['policy_id'] = (string) The id of the snapshot lifecycle policy
- * $params['body'] = (array) The snapshot lifecycle policy definition to register
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html
- */
- public function putLifecycle(array $params = [])
- {
- $policy_id = $this->extractArgument($params, 'policy_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Slm\PutLifecycle');
- $endpoint->setParams($params);
- $endpoint->setPolicyId($policy_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Turns on snapshot lifecycle management (SLM).
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html
- */
- public function start(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Slm\Start');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Turns off snapshot lifecycle management (SLM).
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html
- */
- public function stop(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Slm\Stop');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/SnapshotNamespace.php b/src/Elasticsearch/Namespaces/SnapshotNamespace.php
deleted file mode 100644
index 7e4911f99..000000000
--- a/src/Elasticsearch/Namespaces/SnapshotNamespace.php
+++ /dev/null
@@ -1,338 +0,0 @@
-extractArgument($params, 'repository');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\CleanupRepository');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Clones indices from one snapshot into another snapshot in the same repository.
- *
- * $params['repository'] = (string) A repository name
- * $params['snapshot'] = (string) The name of the snapshot to clone from
- * $params['target_snapshot'] = (string) The name of the cloned snapshot to create
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['body'] = (array) The snapshot clone definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function clone(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
- $snapshot = $this->extractArgument($params, 'snapshot');
- $target_snapshot = $this->extractArgument($params, 'target_snapshot');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\CloneSnapshot');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
- $endpoint->setSnapshot($snapshot);
- $endpoint->setTargetSnapshot($target_snapshot);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a snapshot in a repository.
- *
- * $params['repository'] = (string) A repository name
- * $params['snapshot'] = (string) A snapshot name
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = false)
- * $params['body'] = (array) The snapshot definition
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function create(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
- $snapshot = $this->extractArgument($params, 'snapshot');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\Create');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
- $endpoint->setSnapshot($snapshot);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a repository.
- *
- * $params['repository'] = (string) A repository name
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['timeout'] = (time) Explicit operation timeout
- * $params['verify'] = (boolean) Whether to verify the repository after creation
- * $params['body'] = (array) The repository definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function createRepository(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\CreateRepository');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes one or more snapshots.
- *
- * $params['repository'] = (string) A repository name
- * $params['snapshot'] = (list) A comma-separated list of snapshot names
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function delete(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
- $snapshot = $this->extractArgument($params, 'snapshot');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\Delete');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
- $endpoint->setSnapshot($snapshot);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes a repository.
- *
- * $params['repository'] = (list) Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported.
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['timeout'] = (time) Explicit operation timeout
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function deleteRepository(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\DeleteRepository');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about a snapshot.
- *
- * $params['repository'] = (string) A repository name
- * $params['snapshot'] = (list) A comma-separated list of snapshot names
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['ignore_unavailable'] = (boolean) Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
- * $params['index_details'] = (boolean) Whether to include details of each index in the snapshot, if those details are available. Defaults to false.
- * $params['include_repository'] = (boolean) Whether to include the repository name in the snapshot info. Defaults to true.
- * $params['verbose'] = (boolean) Whether to show verbose snapshot info or only show the basic info found in the repository index blob
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function get(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
- $snapshot = $this->extractArgument($params, 'snapshot');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\Get');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
- $endpoint->setSnapshot($snapshot);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about a repository.
- *
- * $params['repository'] = (list) A comma-separated list of repository names
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function getRepository(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\GetRepository');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Analyzes a repository for correctness and performance
- *
- * $params['repository'] = (string) A repository name
- * $params['blob_count'] = (number) Number of blobs to create during the test. Defaults to 100.
- * $params['concurrency'] = (number) Number of operations to run concurrently during the test. Defaults to 10.
- * $params['read_node_count'] = (number) Number of nodes on which to read a blob after writing. Defaults to 10.
- * $params['early_read_node_count'] = (number) Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2.
- * $params['seed'] = (number) Seed for the random number generator used to create the test workload. Defaults to a random value.
- * $params['rare_action_probability'] = (number) Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02.
- * $params['max_blob_size'] = (string) Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'.
- * $params['max_total_data_size'] = (string) Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'.
- * $params['timeout'] = (time) Explicit operation timeout. Defaults to '30s'.
- * $params['detailed'] = (boolean) Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned.
- * $params['rarely_abort_writes'] = (boolean) Whether to rarely abort writes before they complete. Defaults to 'true'.
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function repositoryAnalyze(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\RepositoryAnalyze');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Restores a snapshot.
- *
- * $params['repository'] = (string) A repository name
- * $params['snapshot'] = (string) A snapshot name
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = false)
- * $params['body'] = (array) Details of what to restore
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function restore(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
- $snapshot = $this->extractArgument($params, 'snapshot');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\Restore');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
- $endpoint->setSnapshot($snapshot);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about the status of a snapshot.
- *
- * $params['repository'] = (string) A repository name
- * $params['snapshot'] = (list) A comma-separated list of snapshot names
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['ignore_unavailable'] = (boolean) Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function status(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
- $snapshot = $this->extractArgument($params, 'snapshot');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\Status');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
- $endpoint->setSnapshot($snapshot);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Verifies a repository.
- *
- * $params['repository'] = (string) A repository name
- * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
- * $params['timeout'] = (time) Explicit operation timeout
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
- */
- public function verifyRepository(array $params = [])
- {
- $repository = $this->extractArgument($params, 'repository');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Snapshot\VerifyRepository');
- $endpoint->setParams($params);
- $endpoint->setRepository($repository);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/SqlNamespace.php b/src/Elasticsearch/Namespaces/SqlNamespace.php
deleted file mode 100644
index f9e9778f7..000000000
--- a/src/Elasticsearch/Namespaces/SqlNamespace.php
+++ /dev/null
@@ -1,155 +0,0 @@
-extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Sql\ClearCursor');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it.
- *
- * $params['id'] = (string) The async search ID
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-async-sql-search-api.html
- */
- public function deleteAsync(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Sql\DeleteAsync');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the current status and available results for an async SQL search or stored synchronous SQL search
- *
- * $params['id'] = (string) The async search ID
- * $params['delimiter'] = (string) Separator for CSV results (Default = ,)
- * $params['format'] = (string) Short version of the Accept header, e.g. json, yaml
- * $params['keep_alive'] = (time) Retention period for the search and its results (Default = 5d)
- * $params['wait_for_completion_timeout'] = (time) Duration to wait for complete results
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-api.html
- */
- public function getAsync(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Sql\GetAsync');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns the current status of an async SQL search or a stored synchronous SQL search
- *
- * $params['id'] = (string) The async search ID
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-status-api.html
- */
- public function getAsyncStatus(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Sql\GetAsyncStatus');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Executes a SQL request
- *
- * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
- * $params['body'] = (array) Use the `query` element to start a query. Use the `cursor` element to continue a query. (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html
- */
- public function query(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Sql\Query');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Translates SQL into Elasticsearch queries
- *
- * $params['body'] = (array) Specify the query in the `query` element. (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html
- */
- public function translate(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Sql\Translate');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/SslNamespace.php b/src/Elasticsearch/Namespaces/SslNamespace.php
deleted file mode 100644
index 57f01050a..000000000
--- a/src/Elasticsearch/Namespaces/SslNamespace.php
+++ /dev/null
@@ -1,47 +0,0 @@
-endpoints;
- $endpoint = $endpointBuilder('Ssl\Certificates');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/TasksNamespace.php b/src/Elasticsearch/Namespaces/TasksNamespace.php
deleted file mode 100644
index ed8658d2c..000000000
--- a/src/Elasticsearch/Namespaces/TasksNamespace.php
+++ /dev/null
@@ -1,116 +0,0 @@
-extractArgument($params, 'task_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Tasks\Cancel');
- $endpoint->setParams($params);
- $endpoint->setTaskId($task_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns information about a task.
- *
- * $params['task_id'] = (string) Return the task with specified id (node_id:task_number)
- * $params['wait_for_completion'] = (boolean) Wait for the matching tasks to complete (default: false)
- * $params['timeout'] = (time) Explicit operation timeout
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function get(array $params = [])
- {
- $task_id = $this->extractArgument($params, 'task_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Tasks\Get');
- $endpoint->setParams($params);
- $endpoint->setTaskId($task_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Returns a list of tasks.
- *
- * $params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * $params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all.
- * $params['detailed'] = (boolean) Return detailed task information (default: false)
- * $params['parent_task_id'] = (string) Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
- * $params['wait_for_completion'] = (boolean) Wait for the matching tasks to complete (default: false)
- * $params['group_by'] = (enum) Group tasks by nodes or parent/child relationships (Options = nodes,parents,none) (Default = nodes)
- * $params['timeout'] = (time) Explicit operation timeout
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
- *
- * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release
- *
- */
- public function list(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Tasks\ListTasks');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Proxy function to list() to prevent BC break since 7.4.0
- */
- public function tasksList(array $params = [])
- {
- return $this->list($params);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/TextStructureNamespace.php b/src/Elasticsearch/Namespaces/TextStructureNamespace.php
deleted file mode 100644
index 97e35643f..000000000
--- a/src/Elasticsearch/Namespaces/TextStructureNamespace.php
+++ /dev/null
@@ -1,64 +0,0 @@
-extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('TextStructure\FindStructure');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/TransformNamespace.php b/src/Elasticsearch/Namespaces/TransformNamespace.php
deleted file mode 100644
index f16350d40..000000000
--- a/src/Elasticsearch/Namespaces/TransformNamespace.php
+++ /dev/null
@@ -1,233 +0,0 @@
-extractArgument($params, 'transform_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Transform\DeleteTransform');
- $endpoint->setParams($params);
- $endpoint->setTransformId($transform_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves configuration information for transforms.
- *
- * $params['transform_id'] = (string) The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms
- * $params['from'] = (int) skips a number of transform configs, defaults to 0
- * $params['size'] = (int) specifies a max number of transforms to get, defaults to 100
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
- * $params['exclude_generated'] = (boolean) Omits fields that are illegal to set on transform PUT (Default = false)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html
- */
- public function getTransform(array $params = [])
- {
- $transform_id = $this->extractArgument($params, 'transform_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Transform\GetTransform');
- $endpoint->setParams($params);
- $endpoint->setTransformId($transform_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves usage information for transforms.
- *
- * $params['transform_id'] = (string) The id of the transform for which to get stats. '_all' or '*' implies all transforms
- * $params['from'] = (number) skips a number of transform stats, defaults to 0
- * $params['size'] = (number) specifies a max number of transform stats to get, defaults to 100
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html
- */
- public function getTransformStats(array $params = [])
- {
- $transform_id = $this->extractArgument($params, 'transform_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Transform\GetTransformStats');
- $endpoint->setParams($params);
- $endpoint->setTransformId($transform_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Previews a transform.
- *
- * $params['transform_id'] = (string) The id of the transform to preview.
- * $params['body'] = (array) The definition for the transform to preview
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html
- */
- public function previewTransform(array $params = [])
- {
- $transform_id = $this->extractArgument($params, 'transform_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Transform\PreviewTransform');
- $endpoint->setParams($params);
- $endpoint->setTransformId($transform_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Instantiates a transform.
- *
- * $params['transform_id'] = (string) The id of the new transform.
- * $params['defer_validation'] = (boolean) If validations should be deferred until transform starts, defaults to false.
- * $params['body'] = (array) The transform definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html
- */
- public function putTransform(array $params = [])
- {
- $transform_id = $this->extractArgument($params, 'transform_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Transform\PutTransform');
- $endpoint->setParams($params);
- $endpoint->setTransformId($transform_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Starts one or more transforms.
- *
- * $params['transform_id'] = (string) The id of the transform to start
- * $params['timeout'] = (time) Controls the time to wait for the transform to start
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html
- */
- public function startTransform(array $params = [])
- {
- $transform_id = $this->extractArgument($params, 'transform_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Transform\StartTransform');
- $endpoint->setParams($params);
- $endpoint->setTransformId($transform_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Stops one or more transforms.
- *
- * $params['transform_id'] = (string) The id of the transform to stop
- * $params['force'] = (boolean) Whether to force stop a failed transform or not. Default to false
- * $params['wait_for_completion'] = (boolean) Whether to wait for the transform to fully stop before returning or not. Default to false
- * $params['timeout'] = (time) Controls the time to wait until the transform has stopped. Default to 30 seconds
- * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
- * $params['wait_for_checkpoint'] = (boolean) Whether to wait for the transform to reach a checkpoint before stopping. Default to false
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html
- */
- public function stopTransform(array $params = [])
- {
- $transform_id = $this->extractArgument($params, 'transform_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Transform\StopTransform');
- $endpoint->setParams($params);
- $endpoint->setTransformId($transform_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Updates certain properties of a transform.
- *
- * $params['transform_id'] = (string) The id of the transform.
- * $params['defer_validation'] = (boolean) If validations should be deferred until transform starts, defaults to false.
- * $params['body'] = (array) The update transform definition (Required)
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html
- */
- public function updateTransform(array $params = [])
- {
- $transform_id = $this->extractArgument($params, 'transform_id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Transform\UpdateTransform');
- $endpoint->setParams($params);
- $endpoint->setTransformId($transform_id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Upgrades all transforms.
- *
- * $params['dry_run'] = (boolean) Whether to only check for updates but don't execute
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html
- */
- public function upgradeTransforms(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Transform\UpgradeTransforms');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/WatcherNamespace.php b/src/Elasticsearch/Namespaces/WatcherNamespace.php
deleted file mode 100644
index c6c908979..000000000
--- a/src/Elasticsearch/Namespaces/WatcherNamespace.php
+++ /dev/null
@@ -1,259 +0,0 @@
-extractArgument($params, 'watch_id');
- $action_id = $this->extractArgument($params, 'action_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\AckWatch');
- $endpoint->setParams($params);
- $endpoint->setWatchId($watch_id);
- $endpoint->setActionId($action_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Activates a currently inactive watch.
- *
- * $params['watch_id'] = (string) Watch ID
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html
- */
- public function activateWatch(array $params = [])
- {
- $watch_id = $this->extractArgument($params, 'watch_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\ActivateWatch');
- $endpoint->setParams($params);
- $endpoint->setWatchId($watch_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Deactivates a currently active watch.
- *
- * $params['watch_id'] = (string) Watch ID
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html
- */
- public function deactivateWatch(array $params = [])
- {
- $watch_id = $this->extractArgument($params, 'watch_id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\DeactivateWatch');
- $endpoint->setParams($params);
- $endpoint->setWatchId($watch_id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Removes a watch from Watcher.
- *
- * $params['id'] = (string) Watch ID
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html
- */
- public function deleteWatch(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\DeleteWatch');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Forces the execution of a stored watch.
- *
- * $params['id'] = (string) Watch ID
- * $params['debug'] = (boolean) indicates whether the watch should execute in debug mode
- * $params['body'] = (array) Execution control
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html
- */
- public function executeWatch(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\ExecuteWatch');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves a watch by its ID.
- *
- * $params['id'] = (string) Watch ID
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html
- */
- public function getWatch(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\GetWatch');
- $endpoint->setParams($params);
- $endpoint->setId($id);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Creates a new watch, or updates an existing one.
- *
- * $params['id'] = (string) Watch ID
- * $params['active'] = (boolean) Specify whether the watch is in/active by default
- * $params['version'] = (number) Explicit version number for concurrency control
- * $params['if_seq_no'] = (number) only update the watch if the last operation that has changed the watch has the specified sequence number
- * $params['if_primary_term'] = (number) only update the watch if the last operation that has changed the watch has the specified primary term
- * $params['body'] = (array) The watch
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html
- */
- public function putWatch(array $params = [])
- {
- $id = $this->extractArgument($params, 'id');
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\PutWatch');
- $endpoint->setParams($params);
- $endpoint->setId($id);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves stored watches.
- *
- * $params['body'] = (array) From, size, query, sort and search_after
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html
- */
- public function queryWatches(array $params = [])
- {
- $body = $this->extractArgument($params, 'body');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\QueryWatches');
- $endpoint->setParams($params);
- $endpoint->setBody($body);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Starts Watcher if it is not already running.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html
- */
- public function start(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\Start');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves the current Watcher metrics.
- *
- * $params['metric'] = (list) Controls what additional stat metrics should be include in the response
- * $params['emit_stacktraces'] = (boolean) Emits stack traces of currently running watches
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html
- */
- public function stats(array $params = [])
- {
- $metric = $this->extractArgument($params, 'metric');
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\Stats');
- $endpoint->setParams($params);
- $endpoint->setMetric($metric);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Stops Watcher if it is running.
- *
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html
- */
- public function stop(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Watcher\Stop');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Namespaces/XpackNamespace.php b/src/Elasticsearch/Namespaces/XpackNamespace.php
deleted file mode 100644
index 1f4f1b331..000000000
--- a/src/Elasticsearch/Namespaces/XpackNamespace.php
+++ /dev/null
@@ -1,67 +0,0 @@
-endpoints;
- $endpoint = $endpointBuilder('Xpack\Info');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
- /**
- * Retrieves usage information about the installed X-Pack features.
- *
- * $params['master_timeout'] = (time) Specify timeout for watch write operation
- *
- * @param array $params Associative array of parameters
- * @return array
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html
- */
- public function usage(array $params = [])
- {
-
- $endpointBuilder = $this->endpoints;
- $endpoint = $endpointBuilder('Xpack\Usage');
- $endpoint->setParams($params);
-
- return $this->performRequest($endpoint);
- }
-}
diff --git a/src/Elasticsearch/Serializers/ArrayToJSONSerializer.php b/src/Elasticsearch/Serializers/ArrayToJSONSerializer.php
deleted file mode 100644
index 12631f0e8..000000000
--- a/src/Elasticsearch/Serializers/ArrayToJSONSerializer.php
+++ /dev/null
@@ -1,57 +0,0 @@
-decode($data);
- } else {
- //Not json, return as string
- return $data;
- }
- } else {
- //No content headers, assume json
- return $this->decode($data);
- }
- }
-
- /**
- * @todo For 2.0, remove the E_NOTICE check before raising the exception.
- *
- * @param string|null $data
- *
- * @return array
- * @throws JsonErrorException
- */
- private function decode(?string $data): array
- {
- if ($data === null || strlen($data) === 0) {
- return [];
- }
-
- if (version_compare(PHP_VERSION, '7.3.0') >= 0) {
- try {
- $result = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
- return $result;
- } catch (\JsonException $e) {
- $result = $result ?? [];
- throw new JsonErrorException($e->getCode(), $data, $result);
- }
- }
-
- $result = @json_decode($data, true);
- // Throw exception only if E_NOTICE is on to maintain backwards-compatibility on systems that silently ignore E_NOTICEs.
- if (json_last_error() !== JSON_ERROR_NONE && (error_reporting() & E_NOTICE) === E_NOTICE) {
- throw new JsonErrorException(json_last_error(), $data, $result);
- }
- return $result;
- }
-}
diff --git a/src/Elasticsearch/Transport.php b/src/Elasticsearch/Transport.php
deleted file mode 100644
index b01a736d1..000000000
--- a/src/Elasticsearch/Transport.php
+++ /dev/null
@@ -1,175 +0,0 @@
-log = $log;
- $this->connectionPool = $connectionPool;
- $this->retries = $retries;
-
- if ($sniffOnStart === true) {
- $this->log->notice('Sniff on Start.');
- $this->connectionPool->scheduleCheck();
- }
- }
-
- /**
- * Returns a single connection from the connection pool
- * Potentially performs a sniffing step before returning
- */
- public function getConnection(): ConnectionInterface
- {
- return $this->connectionPool->nextConnection();
- }
-
- /**
- * Perform a request to the Cluster
- *
- * @param string $method HTTP method to use
- * @param string $uri HTTP URI to send request to
- * @param array $params Optional query parameters
- * @param null $body Optional query body
- * @param array $options
- *
- * @throws Common\Exceptions\NoNodesAvailableException|\Exception
- */
- public function performRequest(string $method, string $uri, array $params = [], $body = null, array $options = []): FutureArrayInterface
- {
- try {
- $connection = $this->getConnection();
- } catch (Exceptions\NoNodesAvailableException $exception) {
- $this->log->critical('No alive nodes found in cluster');
- throw $exception;
- }
-
- $response = [];
- $caughtException = null;
- $this->lastConnection = $connection;
-
- $future = $connection->performRequest(
- $method,
- $uri,
- $params,
- $body,
- $options,
- $this
- );
-
- $future->promise()->then(
- //onSuccess
- function ($response) {
- $this->retryAttempts = 0;
- // Note, this could be a 4xx or 5xx error
- },
- //onFailure
- function ($response) {
- $code = $response->getCode();
- // Ignore 400 level errors, as that means the server responded just fine
- if ($code < 400 || $code >= 500) {
- // Otherwise schedule a check
- $this->connectionPool->scheduleCheck();
- }
- }
- );
-
- return $future;
- }
-
- /**
- * @param FutureArrayInterface $result Response of a request (promise)
- * @param array $options Options for transport
- *
- * @return callable|array
- */
- public function resultOrFuture(FutureArrayInterface $result, array $options = [])
- {
- $response = null;
- $async = isset($options['client']['future']) ? $options['client']['future'] : null;
- if (is_null($async) || $async === false) {
- do {
- $result = $result->wait();
- } while ($result instanceof FutureArrayInterface);
- }
- return $result;
- }
-
- public function shouldRetry(array $request): bool
- {
- if ($this->retryAttempts < $this->retries) {
- $this->retryAttempts += 1;
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Returns the last used connection so that it may be inspected. Mainly
- * for debugging/testing purposes.
- */
- public function getLastConnection(): ConnectionInterface
- {
- return $this->lastConnection;
- }
-}
diff --git a/src/Endpoints/AbstractEndpoint.php b/src/Endpoints/AbstractEndpoint.php
new file mode 100644
index 000000000..221575d8f
--- /dev/null
+++ b/src/Endpoints/AbstractEndpoint.php
@@ -0,0 +1,27 @@
+client = $client;
+ }
+}
\ No newline at end of file
diff --git a/src/Endpoints/AsyncSearch.php b/src/Endpoints/AsyncSearch.php
new file mode 100644
index 000000000..e8bdbafd9
--- /dev/null
+++ b/src/Endpoints/AsyncSearch.php
@@ -0,0 +1,161 @@
+checkRequiredParameters(['id'], $params);
+ $url = "/_async_search/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves the results of a previously submitted async search request given its ID.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The async search ID
+ * wait_for_completion_timeout: time, // Specify the time that the request should block waiting for the final response
+ * keep_alive: time, // Specify the time interval in which the results (partial or final) for this search will be available
+ * typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function get(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_async_search/{$params['id']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves the status of a previously submitted async search request given its ID.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The async search ID
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function status(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_async_search/status/{$params['id']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Executes a search request asynchronously.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
+ * wait_for_completion_timeout: time, // Specify the time that the request should block waiting for the final response
+ * keep_on_completion: boolean, // Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)
+ * keep_alive: time, // Update the time interval in which the results (partial or final) for this search will be available
+ * batched_reduce_size: number, // The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.
+ * request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to true
+ * analyzer: string, // The analyzer to use for the query string
+ * analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
+ * default_operator: enum, // The default operator for query string query (AND or OR)
+ * df: string, // The field to use as default where no field prefix is given in the query string
+ * explain: boolean, // Specify whether to return detailed information about score computation as part of a hit
+ * stored_fields: list, // A comma-separated list of stored fields to return as part of a hit
+ * docvalue_fields: list, // A comma-separated list of fields to return as the docvalue representation of a field for each hit
+ * from: number, // Starting offset (default: 0)
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * q: string, // Query in the Lucene query string syntax
+ * routing: list, // A comma-separated list of specific routing values
+ * search_type: enum, // Search operation type
+ * size: number, // Number of hits to return (default: 10)
+ * sort: list, // A comma-separated list of : pairs
+ * _source: list, // True or false to return the _source field or not, or a list of fields to return
+ * _source_excludes: list, // A list of fields to exclude from the returned _source field
+ * _source_includes: list, // A list of fields to extract and return from the _source field
+ * terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
+ * stats: list, // Specific 'tag' of the request for logging and statistical purposes
+ * suggest_field: string, // Specify which field to use for suggestions
+ * suggest_mode: enum, // Specify suggest mode
+ * suggest_size: number, // How many suggestions to return in response
+ * suggest_text: string, // The source text for which the suggestions should be returned
+ * timeout: time, // Explicit operation timeout
+ * track_scores: boolean, // Whether to calculate and return scores even if they are not used for sorting
+ * track_total_hits: boolean|long, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
+ * allow_partial_search_results: boolean, // Indicate if an error should be returned if there is a partial search failure or timeout
+ * typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+ * version: boolean, // Specify whether to return document version as part of a hit
+ * seq_no_primary_term: boolean, // Specify whether to return sequence number and primary term of the last modification of each hit
+ * max_concurrent_shard_requests: number, // The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
+ * body: array, // The search definition using the Query DSL
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function submit(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_async_search";
+ $method = 'POST';
+ } else {
+ $url = "/_async_search";
+ $method = 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Autoscaling.php b/src/Endpoints/Autoscaling.php
new file mode 100644
index 000000000..4eeec134f
--- /dev/null
+++ b/src/Endpoints/Autoscaling.php
@@ -0,0 +1,107 @@
+checkRequiredParameters(['name'], $params);
+ $url = "/_autoscaling/policy/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
+ */
+ public function getAutoscalingCapacity(array $params = [])
+ {
+ $url = "/_autoscaling/capacity";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) the name of the autoscaling policy
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getAutoscalingPolicy(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_autoscaling/policy/{$params['name']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) the name of the autoscaling policy
+ * body: array, // (REQUIRED) the specification of the autoscaling policy
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putAutoscalingPolicy(array $params = [])
+ {
+ $this->checkRequiredParameters(['name','body'], $params);
+ $url = "/_autoscaling/policy/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Cat.php b/src/Endpoints/Cat.php
new file mode 100644
index 000000000..d66e05e6c
--- /dev/null
+++ b/src/Endpoints/Cat.php
@@ -0,0 +1,780 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html
+ *
+ * @param array{
+ * node_id: list, // A comma-separated list of node IDs or names to limit the returned information
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * bytes: enum, // The unit in which to display byte values
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function allocation(array $params = [])
+ {
+ if (isset($params['node_id'])) {
+ $url = "/_cat/allocation/{$params['node_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/allocation";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Provides quick access to the document count of the entire cluster, or individual indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to limit the returned information
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function count(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/_cat/count/{$params['index']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/count";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Shows how much heap memory is currently being used by fielddata on every data node in the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html
+ *
+ * @param array{
+ * fields: list, // A comma-separated list of fields to return the fielddata size
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * bytes: enum, // The unit in which to display byte values
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * fields: list, // A comma-separated list of fields to return in the output
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function fielddata(array $params = [])
+ {
+ if (isset($params['fields'])) {
+ $url = "/_cat/fielddata/{$params['fields']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/fielddata";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns a concise representation of the cluster health.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html
+ *
+ * @param array{
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * ts: boolean, // Set to false to disable timestamping
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function health(array $params = [])
+ {
+ $url = "/_cat/health";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns help for the Cat APIs.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html
+ *
+ * @param array{
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function help(array $params = [])
+ {
+ $url = "/_cat";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about indices: number of primaries and replicas, document counts, disk size, ...
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to limit the returned information
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * bytes: enum, // The unit in which to display byte values
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * health: enum, // A health status ("green", "yellow", or "red" to filter only indices matching the specified health status
+ * help: boolean, // Return help information
+ * pri: boolean, // Set to true to return stats only for primary shards
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function indices(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/_cat/indices/{$params['index']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/indices";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about the master node.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html
+ *
+ * @param array{
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function master(array $params = [])
+ {
+ $url = "/_cat/master";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets configuration and usage information about data frame analytics jobs.
+ *
+ * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html
+ *
+ * @param array{
+ * id: string, // The ID of the data frame analytics to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)
+ * bytes: enum, // The unit in which to display byte values
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function mlDataFrameAnalytics(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_cat/ml/data_frame/analytics/{$params['id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/ml/data_frame/analytics";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets configuration and usage information about datafeeds.
+ *
+ * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html
+ *
+ * @param array{
+ * datafeed_id: string, // The ID of the datafeeds stats to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function mlDatafeeds(array $params = [])
+ {
+ if (isset($params['datafeed_id'])) {
+ $url = "/_cat/ml/datafeeds/{$params['datafeed_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/ml/datafeeds";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets configuration and usage information about anomaly detection jobs.
+ *
+ * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html
+ *
+ * @param array{
+ * job_id: string, // The ID of the jobs stats to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
+ * bytes: enum, // The unit in which to display byte values
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function mlJobs(array $params = [])
+ {
+ if (isset($params['job_id'])) {
+ $url = "/_cat/ml/anomaly_detectors/{$params['job_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/ml/anomaly_detectors";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets configuration and usage information about inference trained models.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html
+ *
+ * @param array{
+ * model_id: string, // The ID of the trained models stats to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)
+ * from: int, // skips a number of trained models
+ * size: int, // specifies a max number of trained models to get
+ * bytes: enum, // The unit in which to display byte values
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function mlTrainedModels(array $params = [])
+ {
+ if (isset($params['model_id'])) {
+ $url = "/_cat/ml/trained_models/{$params['model_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/ml/trained_models";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about custom node attributes.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html
+ *
+ * @param array{
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function nodeattrs(array $params = [])
+ {
+ $url = "/_cat/nodeattrs";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns basic statistics about performance of cluster nodes.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html
+ *
+ * @param array{
+ * bytes: enum, // The unit in which to display byte values
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * full_id: boolean, // Return the full node ID instead of the shortened version (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function nodes(array $params = [])
+ {
+ $url = "/_cat/nodes";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns a concise representation of the cluster pending tasks.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
+ *
+ * @param array{
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function pendingTasks(array $params = [])
+ {
+ $url = "/_cat/pending_tasks";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about installed plugins across nodes node.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html
+ *
+ * @param array{
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * include_bootstrap: boolean, // Include bootstrap plugins in the response
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function plugins(array $params = [])
+ {
+ $url = "/_cat/plugins";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about index shard recoveries, both on-going completed.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html
+ *
+ * @param array{
+ * index: list, // Comma-separated list or wildcard expression of index names to limit the returned information
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * active_only: boolean, // If `true`, the response only includes ongoing shard recoveries
+ * bytes: enum, // The unit in which to display byte values
+ * detailed: boolean, // If `true`, the response includes detailed information about shard recoveries
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * index: list, // Comma-separated list or wildcard expression of index names to limit the returned information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function recovery(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/_cat/recovery/{$params['index']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/recovery";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about snapshot repositories registered in the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html
+ *
+ * @param array{
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * local: boolean, // Return local information, do not retrieve the state from master node
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function repositories(array $params = [])
+ {
+ $url = "/_cat/repositories";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Provides low-level information about the segments in the shards of an index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to limit the returned information
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * bytes: enum, // The unit in which to display byte values
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function segments(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/_cat/segments/{$params['index']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/segments";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Provides a detailed view of shard allocation on nodes.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to limit the returned information
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * bytes: enum, // The unit in which to display byte values
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function shards(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/_cat/shards/{$params['index']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/shards";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns all snapshots in a specific repository.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html
+ *
+ * @param array{
+ * repository: list, // Name of repository from which to fetch the snapshot information
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * ignore_unavailable: boolean, // Set to true to ignore unavailable snapshots
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function snapshots(array $params = [])
+ {
+ if (isset($params['repository'])) {
+ $url = "/_cat/snapshots/{$params['repository']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/snapshots";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about the tasks currently executing on one or more nodes in the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * nodes: list, // A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+ * actions: list, // A comma-separated list of actions that should be returned. Leave empty to return all.
+ * detailed: boolean, // Return detailed task information (default: false)
+ * parent_task_id: string, // Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function tasks(array $params = [])
+ {
+ $url = "/_cat/tasks";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about existing templates.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html
+ *
+ * @param array{
+ * name: string, // A pattern that returned template names must match
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function templates(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_cat/templates/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/templates";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns cluster-wide thread pool statistics per node.
+ * By default the active, queue and rejected statistics are returned for all thread pools.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html
+ *
+ * @param array{
+ * thread_pool_patterns: list, // A comma-separated list of regular-expressions to filter the thread pools in the output
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * time: enum, // The unit in which to display time values
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function threadPool(array $params = [])
+ {
+ if (isset($params['thread_pool_patterns'])) {
+ $url = "/_cat/thread_pool/{$params['thread_pool_patterns']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/thread_pool";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets configuration and usage information about transforms.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html
+ *
+ * @param array{
+ * transform_id: string, // The id of the transform for which to get stats. '_all' or '*' implies all transforms
+ * from: int, // skips a number of transform configs, defaults to 0
+ * size: int, // specifies a max number of transforms to get, defaults to 100
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * h: list, // Comma-separated list of column names to display
+ * help: boolean, // Return help information
+ * s: list, // Comma-separated list of column names or column aliases to sort by
+ * time: enum, // The unit in which to display time values
+ * v: boolean, // Verbose mode. Display column headers
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function transforms(array $params = [])
+ {
+ if (isset($params['transform_id'])) {
+ $url = "/_cat/transforms/{$params['transform_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cat/transforms";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Ccr.php b/src/Endpoints/Ccr.php
new file mode 100644
index 000000000..61425f949
--- /dev/null
+++ b/src/Endpoints/Ccr.php
@@ -0,0 +1,303 @@
+checkRequiredParameters(['name'], $params);
+ $url = "/_ccr/auto_follow/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a new follower index configured to follow the referenced leader index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the follower index
+ * wait_for_active_shards: string, // Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
+ * body: array, // (REQUIRED) The name of the leader index and other optional ccr related parameters
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function follow(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','body'], $params);
+ $url = "/{$params['index']}/_ccr/follow";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information about all follower indices, including parameters and status for each follower index
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index patterns; use `_all` to perform the operation on all indices
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function followInfo(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_ccr/info";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index patterns; use `_all` to perform the operation on all indices
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function followStats(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_ccr/stats";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Removes the follower retention leases from the leader.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) the name of the leader index for which specified follower retention leases should be removed
+ * body: array, // (REQUIRED) the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function forgetFollower(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','body'], $params);
+ $url = "/{$params['index']}/_ccr/forget_follower";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
+ *
+ * @param array{
+ * name: string, // The name of the auto follow pattern.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getAutoFollowPattern(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_ccr/auto_follow/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_ccr/auto_follow";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Pauses an auto-follow pattern
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the auto follow pattern that should pause discovering new indices to follow.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function pauseAutoFollowPattern(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_ccr/auto_follow/{$params['name']}/pause";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Pauses a follower index. The follower index will not fetch any additional operations from the leader index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the follower index that should pause following its leader index.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function pauseFollow(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_ccr/pause_follow";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the auto follow pattern.
+ * body: array, // (REQUIRED) The specification of the auto follow pattern
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putAutoFollowPattern(array $params = [])
+ {
+ $this->checkRequiredParameters(['name','body'], $params);
+ $url = "/_ccr/auto_follow/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Resumes an auto-follow pattern that has been paused
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the auto follow pattern to resume discovering new indices to follow.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function resumeAutoFollowPattern(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_ccr/auto_follow/{$params['name']}/resume";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Resumes a follower index that has been paused
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the follow index to resume following.
+ * body: array, // The name of the leader index and other optional ccr related parameters
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function resumeFollow(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_ccr/resume_follow";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets all stats related to cross-cluster replication.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html
+ */
+ public function stats(array $params = [])
+ {
+ $url = "/_ccr/stats";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the follower index that should be turned into a regular index.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function unfollow(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_ccr/unfollow";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Cluster.php b/src/Endpoints/Cluster.php
new file mode 100644
index 000000000..8aa1f5a26
--- /dev/null
+++ b/src/Endpoints/Cluster.php
@@ -0,0 +1,396 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes a component template
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the template
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteComponentTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_component_template/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Clears cluster voting config exclusions.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html
+ *
+ * @param array{
+ * wait_for_removal: boolean, // Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteVotingConfigExclusions(array $params = [])
+ {
+ $url = "/_cluster/voting_config_exclusions";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about whether a particular component template exist
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the template
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function existsComponentTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_component_template/{$params['name']}";
+ $method = 'HEAD';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns one or more component templates
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
+ *
+ * @param array{
+ * name: list, // The comma separated names of the component templates
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getComponentTemplate(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_component_template/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_component_template";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns cluster settings.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html
+ *
+ * @param array{
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * timeout: time, // Explicit operation timeout
+ * include_defaults: boolean, // Whether to return all default clusters setting.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getSettings(array $params = [])
+ {
+ $url = "/_cluster/settings";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns basic information about the health of the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html
+ *
+ * @param array{
+ * index: list, // Limit the information returned to a specific index
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * level: enum, // Specify the level of detail for returned information
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * timeout: time, // Explicit operation timeout
+ * wait_for_active_shards: string, // Wait until the specified number of shards is active
+ * wait_for_nodes: string, // Wait until the specified number of nodes is available
+ * wait_for_events: enum, // Wait until all currently queued events with the given priority are processed
+ * wait_for_no_relocating_shards: boolean, // Whether to wait until there are no relocating shards in the cluster
+ * wait_for_no_initializing_shards: boolean, // Whether to wait until there are no initializing shards in the cluster
+ * wait_for_status: enum, // Wait until cluster is in a specific state
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function health(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/_cluster/health/{$params['index']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cluster/health";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns a list of any cluster-level changes (e.g. create index, update mapping,
+ * allocate or fail shard) which have not yet been executed.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html
+ *
+ * @param array{
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Specify timeout for connection to master
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function pendingTasks(array $params = [])
+ {
+ $url = "/_cluster/pending_tasks";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates the cluster voting config exclusions by node ids or node names.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html
+ *
+ * @param array{
+ * node_ids: string, // A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names.
+ * node_names: string, // A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_ids.
+ * timeout: time, // Explicit operation timeout
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function postVotingConfigExclusions(array $params = [])
+ {
+ $url = "/_cluster/voting_config_exclusions";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates or updates a component template
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the template
+ * create: boolean, // Whether the index template should only be added if new or can also replace an existing one
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * body: array, // (REQUIRED) The template definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putComponentTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name','body'], $params);
+ $url = "/_component_template/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates the cluster settings.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
+ *
+ * @param array{
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * timeout: time, // Explicit operation timeout
+ * body: array, // (REQUIRED) The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putSettings(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_cluster/settings";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the information about configured remote clusters.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html
+ */
+ public function remoteInfo(array $params = [])
+ {
+ $url = "/_remote/info";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to manually change the allocation of individual shards in the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html
+ *
+ * @param array{
+ * dry_run: boolean, // Simulate the operation only and return the resulting state
+ * explain: boolean, // Return an explanation of why the commands can or cannot be executed
+ * retry_failed: boolean, // Retries allocation of shards that are blocked due to too many subsequent allocation failures
+ * metric: list, // Limit the information returned to the specified metrics. Defaults to all but metadata
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * timeout: time, // Explicit operation timeout
+ * body: array, // The definition of `commands` to perform (`move`, `cancel`, `allocate`)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function reroute(array $params = [])
+ {
+ $url = "/_cluster/reroute";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns a comprehensive information about the state of the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html
+ *
+ * @param array{
+ * metric: list, // Limit the information returned to the specified metrics
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * master_timeout: time, // Specify timeout for connection to master
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * wait_for_metadata_version: number, // Wait for the metadata version to be equal or greater than the specified metadata version
+ * wait_for_timeout: time, // The maximum time to wait for wait_for_metadata_version before timing out
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function state(array $params = [])
+ {
+ if (isset($params['index']) && isset($params['metric'])) {
+ $url = "/_cluster/state/{$params['metric']}/{$params['index']}";
+ $method = 'GET';
+ } elseif (isset($params['metric'])) {
+ $url = "/_cluster/state/{$params['metric']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cluster/state";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns high-level overview of cluster statistics.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html
+ *
+ * @param array{
+ * node_id: list, // A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * timeout: time, // Explicit operation timeout
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stats(array $params = [])
+ {
+ if (isset($params['node_id'])) {
+ $url = "/_cluster/stats/nodes/{$params['node_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_cluster/stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/DanglingIndices.php b/src/Endpoints/DanglingIndices.php
new file mode 100644
index 000000000..ff728c64b
--- /dev/null
+++ b/src/Endpoints/DanglingIndices.php
@@ -0,0 +1,91 @@
+checkRequiredParameters(['index_uuid'], $params);
+ $url = "/_dangling/{$params['index_uuid']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Imports the specified dangling index
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
+ *
+ * @param array{
+ * index_uuid: string, // (REQUIRED) The UUID of the dangling index
+ * accept_data_loss: boolean, // Must be set to true in order to import the dangling index
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function importDanglingIndex(array $params = [])
+ {
+ $this->checkRequiredParameters(['index_uuid'], $params);
+ $url = "/_dangling/{$params['index_uuid']}";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns all dangling indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
+ */
+ public function listDanglingIndices(array $params = [])
+ {
+ $url = "/_dangling";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Enrich.php b/src/Endpoints/Enrich.php
new file mode 100644
index 000000000..56bfd058f
--- /dev/null
+++ b/src/Endpoints/Enrich.php
@@ -0,0 +1,132 @@
+checkRequiredParameters(['name'], $params);
+ $url = "/_enrich/policy/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates the enrich index for an existing enrich policy.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the enrich policy
+ * wait_for_completion: boolean, // Should the request should block until the execution is complete.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function executePolicy(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_enrich/policy/{$params['name']}/_execute";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets information about an enrich policy.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html
+ *
+ * @param array{
+ * name: list, // A comma-separated list of enrich policy names
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getPolicy(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_enrich/policy/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_enrich/policy";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a new enrich policy.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the enrich policy
+ * body: array, // (REQUIRED) The enrich policy to register
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putPolicy(array $params = [])
+ {
+ $this->checkRequiredParameters(['name','body'], $params);
+ $url = "/_enrich/policy/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets enrich coordinator statistics and information about enrich policies that are currently executing.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html
+ */
+ public function stats(array $params = [])
+ {
+ $url = "/_enrich/_stats";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Eql.php b/src/Endpoints/Eql.php
new file mode 100644
index 000000000..dbfefb1b4
--- /dev/null
+++ b/src/Endpoints/Eql.php
@@ -0,0 +1,119 @@
+checkRequiredParameters(['id'], $params);
+ $url = "/_eql/search/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns async results from previously executed Event Query Language (EQL) search
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The async search ID
+ * wait_for_completion_timeout: time, // Specify the time that the request should block waiting for the final response
+ * keep_alive: time, // Update the time interval in which the results (partial or final) for this search will be available
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function get(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_eql/search/{$params['id']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the status of a previously submitted async or stored Event Query Language (EQL) search
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The async search ID
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getStatus(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_eql/search/status/{$params['id']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns results matching a query expressed in Event Query Language (EQL)
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the index to scope the operation
+ * wait_for_completion_timeout: time, // Specify the time that the request should block waiting for the final response
+ * keep_on_completion: boolean, // Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)
+ * keep_alive: time, // Update the time interval in which the results (partial or final) for this search will be available
+ * body: array, // (REQUIRED) Eql request body. Use the `query` to limit the query scope.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function search(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','body'], $params);
+ $url = "/{$params['index']}/_eql/search";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Features.php b/src/Endpoints/Features.php
new file mode 100644
index 000000000..baee3b9d3
--- /dev/null
+++ b/src/Endpoints/Features.php
@@ -0,0 +1,64 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Resets the internal state of features, usually by deleting system indices
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ */
+ public function resetFeatures(array $params = [])
+ {
+ $url = "/_features/_reset";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Fleet.php b/src/Endpoints/Fleet.php
new file mode 100644
index 000000000..1dcdf4393
--- /dev/null
+++ b/src/Endpoints/Fleet.php
@@ -0,0 +1,105 @@
+checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_fleet/global_checkpoints";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project.
+ *
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: string, // The index name to use as the default
+ * body: array, // (REQUIRED) The request definitions (metadata-fleet search request definition pairs), separated by newlines
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function msearch(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_fleet/_fleet_msearch";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_fleet/_fleet_msearch";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project.
+ *
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The index name to search.
+ * wait_for_checkpoints: list, // Comma separated list of checkpoints, one per shard
+ * wait_for_checkpoints_timeout: time, // Explicit wait_for_checkpoints timeout
+ * allow_partial_search_results: boolean, // Indicate if an error should be returned if there is a partial search failure or timeout
+ * body: array, // The search definition using the Query DSL
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function search(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_fleet/_fleet_search";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Graph.php b/src/Endpoints/Graph.php
new file mode 100644
index 000000000..e308a0373
--- /dev/null
+++ b/src/Endpoints/Graph.php
@@ -0,0 +1,53 @@
+checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_graph/explore";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Ilm.php b/src/Endpoints/Ilm.php
new file mode 100644
index 000000000..91ea55f78
--- /dev/null
+++ b/src/Endpoints/Ilm.php
@@ -0,0 +1,246 @@
+checkRequiredParameters(['policy'], $params);
+ $url = "/_ilm/policy/{$params['policy']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the index to explain
+ * only_managed: boolean, // filters the indices included in the response to ones managed by ILM
+ * only_errors: boolean, // filters the indices included in the response to ones in an ILM error state, implies only_managed
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function explainLifecycle(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_ilm/explain";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the specified policy definition. Includes the policy version and last modified date.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html
+ *
+ * @param array{
+ * policy: string, // The name of the index lifecycle policy
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getLifecycle(array $params = [])
+ {
+ if (isset($params['policy'])) {
+ $url = "/_ilm/policy/{$params['policy']}";
+ $method = 'GET';
+ } else {
+ $url = "/_ilm/policy";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves the current index lifecycle management (ILM) status.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html
+ */
+ public function getStatus(array $params = [])
+ {
+ $url = "/_ilm/status";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html
+ *
+ * @param array{
+ * dry_run: boolean, // If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false
+ * body: array, // Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data")
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function migrateToDataTiers(array $params = [])
+ {
+ $url = "/_ilm/migrate_to_data_tiers";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Manually moves an index into the specified step and executes that step.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the index whose lifecycle step is to change
+ * body: array, // The new lifecycle step to move to
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function moveToStep(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/_ilm/move/{$params['index']}";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a lifecycle policy
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html
+ *
+ * @param array{
+ * policy: string, // (REQUIRED) The name of the index lifecycle policy
+ * body: array, // The lifecycle policy definition to register
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putLifecycle(array $params = [])
+ {
+ $this->checkRequiredParameters(['policy'], $params);
+ $url = "/_ilm/policy/{$params['policy']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Removes the assigned lifecycle policy and stops managing the specified index
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the index to remove policy on
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function removePolicy(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_ilm/remove";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retries executing the policy for an index that is in the ERROR step.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the indices (comma-separated) whose failed lifecycle step is to be retry
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function retry(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_ilm/retry";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Start the index lifecycle management (ILM) plugin.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html
+ */
+ public function start(array $params = [])
+ {
+ $url = "/_ilm/start";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html
+ */
+ public function stop(array $params = [])
+ {
+ $url = "/_ilm/stop";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Indices.php b/src/Endpoints/Indices.php
new file mode 100644
index 000000000..99b1aaebd
--- /dev/null
+++ b/src/Endpoints/Indices.php
@@ -0,0 +1,1457 @@
+checkRequiredParameters(['index','block'], $params);
+ $url = "/{$params['index']}/_block/{$params['block']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Performs the analysis process on a text and return the tokens breakdown of the text.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
+ *
+ * @param array{
+ * index: string, // The name of the index to scope the operation
+ * index: string, // The name of the index to scope the operation
+ * body: array, // Define analyzer/tokenizer parameters and the text on which the analysis should be performed
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function analyze(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_analyze";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_analyze";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Clears all or specific caches for one or more indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index name to limit the operation
+ * fielddata: boolean, // Clear field data
+ * fields: list, // A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)
+ * query: boolean, // Clear query caches
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * index: list, // A comma-separated list of index name to limit the operation
+ * request: boolean, // Clear request cache
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clearCache(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_cache/clear";
+ $method = 'POST';
+ } else {
+ $url = "/_cache/clear";
+ $method = 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Clones an index
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the source index to clone
+ * target: string, // (REQUIRED) The name of the target index to clone into
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * wait_for_active_shards: string, // Set the number of active shards to wait for on the cloned index before the operation returns.
+ * body: array, // The configuration for the target index (`settings` and `aliases`)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clone(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','target'], $params);
+ $url = "/{$params['index']}/_clone/{$params['target']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Closes an index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma separated list of indices to close
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * wait_for_active_shards: string, // Sets the number of active shards to wait for before the operation returns.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function close(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_close";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates an index with optional settings and mappings.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the index
+ * wait_for_active_shards: string, // Set the number of active shards to wait for before the operation returns.
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * body: array, // The configuration for the index (`settings` and `mappings`)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function create(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a data stream
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the data stream
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function createDataStream(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_data_stream/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Provides statistics on operations happening in a data stream.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
+ *
+ * @param array{
+ * name: list, // A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function dataStreamsStats(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_data_stream/{$params['name']}/_stats";
+ $method = 'GET';
+ } else {
+ $url = "/_data_stream/_stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
+ * allow_no_indices: boolean, // Ignore if a wildcard expression resolves to no concrete indices (default: false)
+ * expand_wildcards: enum, // Whether wildcard expressions should get expanded to open, closed, or hidden indices
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function delete(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an alias.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names (supports wildcards); use `_all` for all indices
+ * name: list, // (REQUIRED) A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
+ * timeout: time, // Explicit timestamp for the document
+ * master_timeout: time, // Specify timeout for connection to master
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteAlias(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','name'], $params);
+ $url = "/{$params['index']}/_alias/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes a data stream.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
+ *
+ * @param array{
+ * name: list, // (REQUIRED) A comma-separated list of data streams to delete; use `*` to delete all data streams
+ * expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteDataStream(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_data_stream/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an index template.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the template
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteIndexTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_index_template/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an index template.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the template
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_template/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Analyzes the disk usage of each field of an index or data stream
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: string, // (REQUIRED) Comma-separated list of indices or data streams to analyze the disk usage
+ * run_expensive_tasks: boolean, // Must be set to [true] in order for the task to be performed. Defaults to false.
+ * flush: boolean, // Whether flush or not before analyzing the index disk usage. Defaults to true
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function diskUsage(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_disk_usage";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about whether a particular index exists.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
+ * allow_no_indices: boolean, // Ignore if a wildcard expression resolves to no concrete indices (default: false)
+ * expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * include_defaults: boolean, // Whether to return all default setting for each of the indices.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function exists(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}";
+ $method = 'HEAD';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about whether a particular alias exists.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
+ *
+ * @param array{
+ * name: list, // (REQUIRED) A comma-separated list of alias names to return
+ * index: list, // A comma-separated list of index names to filter aliases
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function existsAlias(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_alias/{$params['name']}";
+ $method = 'HEAD';
+ } else {
+ $url = "/_alias/{$params['name']}";
+ $method = 'HEAD';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about whether a particular index template exists.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the template
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function existsIndexTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_index_template/{$params['name']}";
+ $method = 'HEAD';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about whether a particular index template exists.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: list, // (REQUIRED) The comma separated names of the index templates
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function existsTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_template/{$params['name']}";
+ $method = 'HEAD';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the field usage stats for each field of an index
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/field-usage-stats.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: string, // (REQUIRED) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * fields: list, // A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards)
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function fieldUsageStats(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_field_usage_stats";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Performs the flush operation on one or more indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names; use `_all` or empty string for all indices
+ * force: boolean, // Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
+ * wait_if_ongoing: boolean, // If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function flush(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_flush";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_flush";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Performs the force merge operation on one or more indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * flush: boolean, // Specify whether the index should be flushed after performing the operation (default: true)
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * max_num_segments: number, // The number of segments the index should be merged into (default: dynamic)
+ * only_expunge_deletes: boolean, // Specify whether the operation should only expunge deleted documents
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function forcemerge(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_forcemerge";
+ $method = 'POST';
+ } else {
+ $url = "/_forcemerge";
+ $method = 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about one or more indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
+ * allow_no_indices: boolean, // Ignore if a wildcard expression resolves to no concrete indices (default: false)
+ * expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * include_defaults: boolean, // Whether to return all default setting for each of the indices.
+ * master_timeout: time, // Specify timeout for connection to master
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function get(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns an alias.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
+ *
+ * @param array{
+ * name: list, // A comma-separated list of alias names to return
+ * index: list, // A comma-separated list of index names to filter aliases
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getAlias(array $params = [])
+ {
+ if (isset($params['index']) && isset($params['name'])) {
+ $url = "/{$params['index']}/_alias/{$params['name']}";
+ $method = 'GET';
+ } elseif (isset($params['name'])) {
+ $url = "/_alias/{$params['name']}";
+ $method = 'GET';
+ } elseif (isset($params['index'])) {
+ $url = "/{$params['index']}/_alias";
+ $method = 'GET';
+ } else {
+ $url = "/_alias";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns data streams.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
+ *
+ * @param array{
+ * name: list, // A comma-separated list of data streams to get; use `*` to get all data streams
+ * expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getDataStream(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_data_stream/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_data_stream";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns mapping for one or more fields.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html
+ *
+ * @param array{
+ * fields: list, // (REQUIRED) A comma-separated list of fields
+ * index: list, // A comma-separated list of index names
+ * include_defaults: boolean, // Whether the default mapping values should be returned as well
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getFieldMapping(array $params = [])
+ {
+ $this->checkRequiredParameters(['fields'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_mapping/field/{$params['fields']}";
+ $method = 'GET';
+ } else {
+ $url = "/_mapping/field/{$params['fields']}";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns an index template.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: string, // A pattern that returned template names must match
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getIndexTemplate(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_index_template/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_index_template";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns mappings for one or more indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * master_timeout: time, // Specify timeout for connection to master
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getMapping(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_mapping";
+ $method = 'GET';
+ } else {
+ $url = "/_mapping";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns settings for one or more indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * name: list, // The name of the settings that should be included
+ * master_timeout: time, // Specify timeout for connection to master
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * include_defaults: boolean, // Whether to return all default setting for each of the indices.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getSettings(array $params = [])
+ {
+ if (isset($params['index']) && isset($params['name'])) {
+ $url = "/{$params['index']}/_settings/{$params['name']}";
+ $method = 'GET';
+ } elseif (isset($params['index'])) {
+ $url = "/{$params['index']}/_settings";
+ $method = 'GET';
+ } elseif (isset($params['name'])) {
+ $url = "/_settings/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_settings";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns an index template.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: list, // The comma separated names of the index templates
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getTemplate(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_template/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_template";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Migrates an alias to a data stream
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the alias to migrate
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function migrateToDataStream(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_data_stream/_migrate/{$params['name']}";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Modifies a data stream
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The data stream modifications
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function modifyDataStream(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_data_stream/_modify";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Opens an index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma separated list of indices to open
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * wait_for_active_shards: string, // Sets the number of active shards to wait for before the operation returns.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function open(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_open";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Promotes a data stream from a replicated data stream managed by CCR to a regular data stream
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the data stream
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function promoteDataStream(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_data_stream/_promote/{$params['name']}";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates or updates an alias.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
+ * name: string, // (REQUIRED) The name of the alias to be created or updated
+ * timeout: time, // Explicit timestamp for the document
+ * master_timeout: time, // Specify timeout for connection to master
+ * body: array, // The settings for the alias, such as `routing` or `filter`
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putAlias(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','name'], $params);
+ $url = "/{$params['index']}/_alias/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates or updates an index template.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the template
+ * create: boolean, // Whether the index template should only be added if new or can also replace an existing one
+ * cause: string, // User defined reason for creating/updating the index template
+ * master_timeout: time, // Specify timeout for connection to master
+ * body: array, // (REQUIRED) The template definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putIndexTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name','body'], $params);
+ $url = "/_index_template/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates the index mappings.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * write_index_only: boolean, // When true, applies mappings only to the write index of an alias or data stream
+ * body: array, // (REQUIRED) The mapping definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putMapping(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','body'], $params);
+ $url = "/{$params['index']}/_mapping";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates the index settings.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * master_timeout: time, // Specify timeout for connection to master
+ * timeout: time, // Explicit operation timeout
+ * preserve_existing: boolean, // Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * body: array, // (REQUIRED) The index settings to be updated
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putSettings(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_settings";
+ $method = 'PUT';
+ } else {
+ $url = "/_settings";
+ $method = 'PUT';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates or updates an index template.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the template
+ * order: number, // The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
+ * create: boolean, // Whether the index template should only be added if new or can also replace an existing one
+ * master_timeout: time, // Specify timeout for connection to master
+ * body: array, // (REQUIRED) The template definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name','body'], $params);
+ $url = "/_template/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about ongoing index shard recoveries.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * detailed: boolean, // Whether to display detailed information about shard recovery
+ * active_only: boolean, // Display only those recoveries that are currently on-going
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function recovery(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_recovery";
+ $method = 'GET';
+ } else {
+ $url = "/_recovery";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Performs the refresh operation in one or more indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function refresh(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_refresh";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_refresh";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Reloads an index's search analyzers and their resources.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-reload-analyzers.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names to reload analyzers for
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function reloadSearchAnalyzers(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_reload_search_analyzers";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about any matching indices, aliases, and data streams
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html
+ *
+ * @param array{
+ * name: list, // (REQUIRED) A comma-separated list of names or wildcard expressions
+ * expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function resolveIndex(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_resolve/index/{$params['name']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates an alias to point to a new index when the existing index
+ * is considered to be too large or too old.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html
+ *
+ * @param array{
+ * alias: string, // (REQUIRED) The name of the alias to rollover
+ * new_index: string, // The name of the rollover index
+ * timeout: time, // Explicit operation timeout
+ * dry_run: boolean, // If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
+ * master_timeout: time, // Specify timeout for connection to master
+ * wait_for_active_shards: string, // Set the number of active shards to wait for on the newly created rollover index before the operation returns.
+ * body: array, // The conditions that needs to be met for executing rollover
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function rollover(array $params = [])
+ {
+ $this->checkRequiredParameters(['alias'], $params);
+ if (isset($params['new_index'])) {
+ $url = "/{$params['alias']}/_rollover/{$params['new_index']}";
+ $method = 'POST';
+ } else {
+ $url = "/{$params['alias']}/_rollover";
+ $method = 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Provides low-level information about segments in a Lucene index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * verbose: boolean, // Includes detailed memory usage by Lucene.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function segments(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_segments";
+ $method = 'GET';
+ } else {
+ $url = "/_segments";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Provides store information for shard copies of indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * status: list, // A comma-separated list of statuses used to filter on shards to get store information for
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function shardStores(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_shard_stores";
+ $method = 'GET';
+ } else {
+ $url = "/_shard_stores";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allow to shrink an existing index into a new index with fewer primary shards.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the source index to shrink
+ * target: string, // (REQUIRED) The name of the target index to shrink into
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * wait_for_active_shards: string, // Set the number of active shards to wait for on the shrunken index before the operation returns.
+ * body: array, // The configuration for the target index (`settings` and `aliases`)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function shrink(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','target'], $params);
+ $url = "/{$params['index']}/_shrink/{$params['target']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Simulate matching the given index name against the index templates in the system
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) The name of the index (it must be a concrete index name)
+ * create: boolean, // Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
+ * cause: string, // User defined reason for dry-run creating the new template for simulation purposes
+ * master_timeout: time, // Specify timeout for connection to master
+ * body: array, // New index template definition, which will be included in the simulation, as if it already exists in the system
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function simulateIndexTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_index_template/_simulate_index/{$params['name']}";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Simulate resolving the given template name or body
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
+ *
+ * @param array{
+ * name: string, // The name of the index template
+ * create: boolean, // Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
+ * cause: string, // User defined reason for dry-run creating the new template for simulation purposes
+ * master_timeout: time, // Specify timeout for connection to master
+ * body: array, // New index template definition to be simulated, if no index template name is specified
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function simulateTemplate(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_index_template/_simulate/{$params['name']}";
+ $method = 'POST';
+ } else {
+ $url = "/_index_template/_simulate";
+ $method = 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows you to split an existing index into a new index with more primary shards.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the source index to split
+ * target: string, // (REQUIRED) The name of the target index to split into
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * wait_for_active_shards: string, // Set the number of active shards to wait for on the shrunken index before the operation returns.
+ * body: array, // The configuration for the target index (`settings` and `aliases`)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function split(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','target'], $params);
+ $url = "/{$params['index']}/_split/{$params['target']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Provides statistics on operations happening in an index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html
+ *
+ * @param array{
+ * metric: list, // Limit the information returned the specific metrics.
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * completion_fields: list, // A comma-separated list of fields for the `completion` index metric (supports wildcards)
+ * fielddata_fields: list, // A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
+ * fields: list, // A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
+ * groups: list, // A comma-separated list of search groups for `search` index metric
+ * level: enum, // Return stats aggregated at cluster, index or shard level
+ * include_segment_file_sizes: boolean, // Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
+ * include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * forbid_closed_indices: boolean, // If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stats(array $params = [])
+ {
+ if (isset($params['index']) && isset($params['metric'])) {
+ $url = "/{$params['index']}/_stats/{$params['metric']}";
+ $method = 'GET';
+ } elseif (isset($params['metric'])) {
+ $url = "/_stats/{$params['metric']}";
+ $method = 'GET';
+ } elseif (isset($params['index'])) {
+ $url = "/{$params['index']}/_stats";
+ $method = 'GET';
+ } else {
+ $url = "/_stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The name of the index to unfreeze
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * wait_for_active_shards: string, // Sets the number of active shards to wait for before the operation returns.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function unfreeze(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_unfreeze";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates index aliases.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
+ *
+ * @param array{
+ * timeout: time, // Request timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * body: array, // (REQUIRED) The definition of `actions` to perform
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function updateAliases(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_aliases";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows a user to validate a potentially expensive query without executing it.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
+ * explain: boolean, // Return detailed information about the error
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * q: string, // Query in the Lucene query string syntax
+ * analyzer: string, // The analyzer to use for the query string
+ * analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
+ * default_operator: enum, // The default operator for query string query (AND or OR)
+ * df: string, // The field to use as default where no field prefix is given in the query string
+ * lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+ * rewrite: boolean, // Provide a more detailed explanation showing the actual Lucene query that will be executed.
+ * all_shards: boolean, // Execute validation on all shards instead of one random shard per index
+ * body: array, // The query definition specified with the Query DSL
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function validateQuery(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_validate/query";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_validate/query";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Ingest.php b/src/Endpoints/Ingest.php
new file mode 100644
index 000000000..b04bc4b19
--- /dev/null
+++ b/src/Endpoints/Ingest.php
@@ -0,0 +1,158 @@
+checkRequiredParameters(['id'], $params);
+ $url = "/_ingest/pipeline/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns statistical information about geoip databases
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html
+ */
+ public function geoIpStats(array $params = [])
+ {
+ $url = "/_ingest/geoip/stats";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns a pipeline.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html
+ *
+ * @param array{
+ * id: string, // Comma separated list of pipeline ids. Wildcards supported
+ * summary: boolean, // Return pipelines without their definitions (default: false)
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getPipeline(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_ingest/pipeline/{$params['id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_ingest/pipeline";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns a list of the built-in patterns.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get
+ */
+ public function processorGrok(array $params = [])
+ {
+ $url = "/_ingest/processor/grok";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates or updates a pipeline.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) Pipeline ID
+ * if_version: int, // Required version for optimistic concurrency control for pipeline updates
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * timeout: time, // Explicit operation timeout
+ * body: array, // (REQUIRED) The ingest definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putPipeline(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','body'], $params);
+ $url = "/_ingest/pipeline/{$params['id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to simulate a pipeline with example documents.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html
+ *
+ * @param array{
+ * id: string, // Pipeline ID
+ * verbose: boolean, // Verbose mode. Display data output for each processor in executed pipeline
+ * body: array, // (REQUIRED) The simulate definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function simulate(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['id'])) {
+ $url = "/_ingest/pipeline/{$params['id']}/_simulate";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_ingest/pipeline/_simulate";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/License.php b/src/Endpoints/License.php
new file mode 100644
index 000000000..f95d161da
--- /dev/null
+++ b/src/Endpoints/License.php
@@ -0,0 +1,154 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves licensing information for the cluster
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html
+ *
+ * @param array{
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * accept_enterprise: boolean, // Supported for backwards compatibility with 7.x. If this param is used it must be set to true
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function get(array $params = [])
+ {
+ $url = "/_license";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information about the status of the basic license.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html
+ */
+ public function getBasicStatus(array $params = [])
+ {
+ $url = "/_license/basic_status";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information about the status of the trial license.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html
+ */
+ public function getTrialStatus(array $params = [])
+ {
+ $url = "/_license/trial_status";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates the license for the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html
+ *
+ * @param array{
+ * acknowledge: boolean, // whether the user has acknowledged acknowledge messages (default: false)
+ * body: array, // licenses to be installed
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function post(array $params = [])
+ {
+ $url = "/_license";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Starts an indefinite basic license.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html
+ *
+ * @param array{
+ * acknowledge: boolean, // whether the user has acknowledged acknowledge messages (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function postStartBasic(array $params = [])
+ {
+ $url = "/_license/start_basic";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * starts a limited time trial license.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html
+ *
+ * @param array{
+ * type: string, // The type of trial license to generate (default: "trial")
+ * acknowledge: boolean, // whether the user has acknowledged acknowledge messages (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function postStartTrial(array $params = [])
+ {
+ $url = "/_license/start_trial";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Logstash.php b/src/Endpoints/Logstash.php
new file mode 100644
index 000000000..4d4431a00
--- /dev/null
+++ b/src/Endpoints/Logstash.php
@@ -0,0 +1,93 @@
+checkRequiredParameters(['id'], $params);
+ $url = "/_logstash/pipeline/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves Logstash Pipelines used by Central Management
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) A comma-separated list of Pipeline IDs
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getPipeline(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_logstash/pipeline/{$params['id']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Adds and updates Logstash Pipelines used for Central Management
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The ID of the Pipeline
+ * body: array, // (REQUIRED) The Pipeline to add or update
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putPipeline(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','body'], $params);
+ $url = "/_logstash/pipeline/{$params['id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Migration.php b/src/Endpoints/Migration.php
new file mode 100644
index 000000000..442cd4c0f
--- /dev/null
+++ b/src/Endpoints/Migration.php
@@ -0,0 +1,81 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Find out whether system features need to be upgraded or not
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html
+ */
+ public function getFeatureUpgradeStatus(array $params = [])
+ {
+ $url = "/_migration/system_features";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Begin upgrades for system features
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html
+ */
+ public function postFeatureUpgrade(array $params = [])
+ {
+ $url = "/_migration/system_features";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Ml.php b/src/Endpoints/Ml.php
new file mode 100644
index 000000000..e87537928
--- /dev/null
+++ b/src/Endpoints/Ml.php
@@ -0,0 +1,1740 @@
+checkRequiredParameters(['job_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_close";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes a calendar.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html
+ *
+ * @param array{
+ * calendar_id: string, // (REQUIRED) The ID of the calendar to delete
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteCalendar(array $params = [])
+ {
+ $this->checkRequiredParameters(['calendar_id'], $params);
+ $url = "/_ml/calendars/{$params['calendar_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes scheduled events from a calendar.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html
+ *
+ * @param array{
+ * calendar_id: string, // (REQUIRED) The ID of the calendar to modify
+ * event_id: string, // (REQUIRED) The ID of the event to remove from the calendar
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteCalendarEvent(array $params = [])
+ {
+ $this->checkRequiredParameters(['calendar_id','event_id'], $params);
+ $url = "/_ml/calendars/{$params['calendar_id']}/events/{$params['event_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes anomaly detection jobs from a calendar.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html
+ *
+ * @param array{
+ * calendar_id: string, // (REQUIRED) The ID of the calendar to modify
+ * job_id: string, // (REQUIRED) The ID of the job to remove from the calendar
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteCalendarJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['calendar_id','job_id'], $params);
+ $url = "/_ml/calendars/{$params['calendar_id']}/jobs/{$params['job_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an existing data frame analytics job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The ID of the data frame analytics to delete
+ * force: boolean, // True if the job should be forcefully deleted
+ * timeout: time, // Controls the time to wait until a job is deleted. Defaults to 1 minute
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteDataFrameAnalytics(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_ml/data_frame/analytics/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an existing datafeed.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html
+ *
+ * @param array{
+ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to delete
+ * force: boolean, // True if the datafeed should be forcefully deleted
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteDatafeed(array $params = [])
+ {
+ $this->checkRequiredParameters(['datafeed_id'], $params);
+ $url = "/_ml/datafeeds/{$params['datafeed_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes expired and unused machine learning data.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html
+ *
+ * @param array{
+ * job_id: string, // The ID of the job(s) to perform expired data hygiene for
+ * requests_per_second: number, // The desired requests per second for the deletion processes.
+ * timeout: time, // How long can the underlying delete processes run until they are canceled
+ * body: array, // deleting expired data parameters
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteExpiredData(array $params = [])
+ {
+ if (isset($params['job_id'])) {
+ $url = "/_ml/_delete_expired_data/{$params['job_id']}";
+ $method = 'DELETE';
+ } else {
+ $url = "/_ml/_delete_expired_data";
+ $method = 'DELETE';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes a filter.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html
+ *
+ * @param array{
+ * filter_id: string, // (REQUIRED) The ID of the filter to delete
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteFilter(array $params = [])
+ {
+ $this->checkRequiredParameters(['filter_id'], $params);
+ $url = "/_ml/filters/{$params['filter_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes forecasts from a machine learning job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job from which to delete forecasts
+ * forecast_id: string, // The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all`
+ * allow_no_forecasts: boolean, // Whether to ignore if `_all` matches no forecasts
+ * timeout: time, // Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteForecast(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ if (isset($params['forecast_id'])) {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_forecast/{$params['forecast_id']}";
+ $method = 'DELETE';
+ } else {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_forecast";
+ $method = 'DELETE';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an existing anomaly detection job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to delete
+ * force: boolean, // True if the job should be forcefully deleted
+ * wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an existing model snapshot.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to fetch
+ * snapshot_id: string, // (REQUIRED) The ID of the snapshot to delete
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteModelSnapshot(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id','snapshot_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/model_snapshots/{$params['snapshot_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an existing trained inference model that is currently not referenced by an ingest pipeline.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html
+ *
+ * @param array{
+ * model_id: string, // (REQUIRED) The ID of the trained model to delete
+ * timeout: time, // Controls the amount of time to wait for the model to be deleted.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteTrainedModel(array $params = [])
+ {
+ $this->checkRequiredParameters(['model_id'], $params);
+ $url = "/_ml/trained_models/{$params['model_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes a model alias that refers to the trained model
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html
+ *
+ * @param array{
+ * model_alias: string, // (REQUIRED) The trained model alias to delete
+ * model_id: string, // (REQUIRED) The trained model where the model alias is assigned
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteTrainedModelAlias(array $params = [])
+ {
+ $this->checkRequiredParameters(['model_alias','model_id'], $params);
+ $url = "/_ml/trained_models/{$params['model_id']}/model_aliases/{$params['model_alias']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Estimates the model memory
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The analysis config, plus cardinality estimates for fields it references
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function estimateModelMemory(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_ml/anomaly_detectors/_estimate_model_memory";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Evaluates the data frame analytics for an annotated index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The evaluation definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function evaluateDataFrame(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_ml/data_frame/_evaluate";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Explains a data frame analytics config.
+ *
+ * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html
+ *
+ * @param array{
+ * id: string, // The ID of the data frame analytics to explain
+ * body: array, // The data frame analytics config to explain
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function explainDataFrameAnalytics(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_ml/data_frame/analytics/{$params['id']}/_explain";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_ml/data_frame/analytics/_explain";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Forces any buffered data to be processed by the job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The name of the job to flush
+ * calc_interim: boolean, // Calculates interim results for the most recent bucket or all buckets within the latency period
+ * start: string, // When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results
+ * end: string, // When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results
+ * advance_time: string, // Advances time to the given value generating results and updating the model for the advanced interval
+ * skip_time: string, // Skips time to the given value without generating results or updating the model for the skipped interval
+ * body: array, // Flush parameters
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function flushJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_flush";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Predicts the future behavior of a time series by using its historical behavior.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to forecast for
+ * duration: time, // The duration of the forecast
+ * expires_in: time, // The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity.
+ * max_model_memory: string, // The max memory able to be used by the forecast. Default is 20mb.
+ * body: array, // Query parameters can be specified in the body
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function forecast(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_forecast";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves anomaly detection job results for one or more buckets.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) ID of the job to get bucket results from
+ * timestamp: string, // The timestamp of the desired single bucket result
+ * expand: boolean, // Include anomaly records
+ * exclude_interim: boolean, // Exclude interim results
+ * from: int, // skips a number of buckets
+ * size: int, // specifies a max number of buckets to get
+ * start: string, // Start time filter for buckets
+ * end: string, // End time filter for buckets
+ * anomaly_score: double, // Filter for the most anomalous buckets
+ * sort: string, // Sort buckets by a particular field
+ * desc: boolean, // Set the sort direction
+ * body: array, // Bucket selection details if not provided in URI
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getBuckets(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ if (isset($params['timestamp'])) {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/results/buckets/{$params['timestamp']}";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/results/buckets";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information about the scheduled events in calendars.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html
+ *
+ * @param array{
+ * calendar_id: string, // (REQUIRED) The ID of the calendar containing the events
+ * job_id: string, // Get events for the job. When this option is used calendar_id must be '_all'
+ * start: string, // Get events after this time
+ * end: date, // Get events before this time
+ * from: int, // Skips a number of events
+ * size: int, // Specifies a max number of events to get
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getCalendarEvents(array $params = [])
+ {
+ $this->checkRequiredParameters(['calendar_id'], $params);
+ $url = "/_ml/calendars/{$params['calendar_id']}/events";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves configuration information for calendars.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html
+ *
+ * @param array{
+ * calendar_id: string, // The ID of the calendar to fetch
+ * from: int, // skips a number of calendars
+ * size: int, // specifies a max number of calendars to get
+ * body: array, // The from and size parameters optionally sent in the body
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getCalendars(array $params = [])
+ {
+ if (isset($params['calendar_id'])) {
+ $url = "/_ml/calendars/{$params['calendar_id']}";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_ml/calendars";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves anomaly detection job results for one or more categories.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The name of the job
+ * category_id: long, // The identifier of the category definition of interest
+ * from: int, // skips a number of categories
+ * size: int, // specifies a max number of categories to get
+ * partition_field_value: string, // Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled.
+ * body: array, // Category selection details if not provided in URI
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getCategories(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ if (isset($params['category_id'])) {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/results/categories/{$params['category_id']}";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/results/categories/";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves configuration information for data frame analytics jobs.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html
+ *
+ * @param array{
+ * id: string, // The ID of the data frame analytics to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified)
+ * from: int, // skips a number of analytics
+ * size: int, // specifies a max number of analytics to get
+ * exclude_generated: boolean, // Omits fields that are illegal to set on data frame analytics PUT
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getDataFrameAnalytics(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_ml/data_frame/analytics/{$params['id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_ml/data_frame/analytics";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves usage information for data frame analytics jobs.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html
+ *
+ * @param array{
+ * id: string, // The ID of the data frame analytics stats to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified)
+ * from: int, // skips a number of analytics
+ * size: int, // specifies a max number of analytics to get
+ * verbose: boolean, // whether the stats response should be verbose
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getDataFrameAnalyticsStats(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_ml/data_frame/analytics/{$params['id']}/_stats";
+ $method = 'GET';
+ } else {
+ $url = "/_ml/data_frame/analytics/_stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves usage information for datafeeds.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
+ *
+ * @param array{
+ * datafeed_id: string, // The ID of the datafeeds stats to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getDatafeedStats(array $params = [])
+ {
+ if (isset($params['datafeed_id'])) {
+ $url = "/_ml/datafeeds/{$params['datafeed_id']}/_stats";
+ $method = 'GET';
+ } else {
+ $url = "/_ml/datafeeds/_stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves configuration information for datafeeds.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html
+ *
+ * @param array{
+ * datafeed_id: string, // The ID of the datafeeds to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
+ * exclude_generated: boolean, // Omits fields that are illegal to set on datafeed PUT
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getDatafeeds(array $params = [])
+ {
+ if (isset($params['datafeed_id'])) {
+ $url = "/_ml/datafeeds/{$params['datafeed_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_ml/datafeeds";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves filters.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html
+ *
+ * @param array{
+ * filter_id: string, // The ID of the filter to fetch
+ * from: int, // skips a number of filters
+ * size: int, // specifies a max number of filters to get
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getFilters(array $params = [])
+ {
+ if (isset($params['filter_id'])) {
+ $url = "/_ml/filters/{$params['filter_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_ml/filters";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves anomaly detection job results for one or more influencers.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) Identifier for the anomaly detection job
+ * exclude_interim: boolean, // Exclude interim results
+ * from: int, // skips a number of influencers
+ * size: int, // specifies a max number of influencers to get
+ * start: string, // start timestamp for the requested influencers
+ * end: string, // end timestamp for the requested influencers
+ * influencer_score: double, // influencer score threshold for the requested influencers
+ * sort: string, // sort field for the requested influencers
+ * desc: boolean, // whether the results should be sorted in decending order
+ * body: array, // Influencer selection criteria
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getInfluencers(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/results/influencers";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves usage information for anomaly detection jobs.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html
+ *
+ * @param array{
+ * job_id: string, // The ID of the jobs stats to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getJobStats(array $params = [])
+ {
+ if (isset($params['job_id'])) {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_stats";
+ $method = 'GET';
+ } else {
+ $url = "/_ml/anomaly_detectors/_stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves configuration information for anomaly detection jobs.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html
+ *
+ * @param array{
+ * job_id: string, // The ID of the jobs to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
+ * exclude_generated: boolean, // Omits fields that are illegal to set on job PUT
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getJobs(array $params = [])
+ {
+ if (isset($params['job_id'])) {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_ml/anomaly_detectors";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Gets stats for anomaly detection job model snapshot upgrades that are in progress.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job. May be a wildcard, comma separated list or `_all`.
+ * snapshot_id: string, // (REQUIRED) The ID of the snapshot. May be a wildcard, comma separated list or `_all`.
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no jobs or no snapshots. (This includes the `_all` string.)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getModelSnapshotUpgradeStats(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id','snapshot_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/model_snapshots/{$params['snapshot_id']}/_upgrade/_stats";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information about model snapshots.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to fetch
+ * snapshot_id: string, // The ID of the snapshot to fetch
+ * from: int, // Skips a number of documents
+ * size: int, // The default number of documents returned in queries as a string.
+ * start: date, // The filter 'start' query parameter
+ * end: date, // The filter 'end' query parameter
+ * sort: string, // Name of the field to sort on
+ * desc: boolean, // True if the results should be sorted in descending order
+ * body: array, // Model snapshot selection criteria
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getModelSnapshots(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ if (isset($params['snapshot_id'])) {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/model_snapshots/{$params['snapshot_id']}";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/model_snapshots";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The job IDs for which to calculate overall bucket results
+ * top_n: int, // The number of top job bucket scores to be used in the overall_score calculation
+ * bucket_span: string, // The span of the overall buckets. Defaults to the longest job bucket_span
+ * overall_score: double, // Returns overall buckets with overall scores higher than this value
+ * exclude_interim: boolean, // If true overall buckets that include interim buckets will be excluded
+ * start: string, // Returns overall buckets with timestamps after this time
+ * end: string, // Returns overall buckets with timestamps earlier than this time
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
+ * body: array, // Overall bucket selection details if not provided in URI
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getOverallBuckets(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/results/overall_buckets";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves anomaly records for an anomaly detection job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job
+ * exclude_interim: boolean, // Exclude interim results
+ * from: int, // skips a number of records
+ * size: int, // specifies a max number of records to get
+ * start: string, // Start time filter for records
+ * end: string, // End time filter for records
+ * record_score: double, // Returns records with anomaly scores greater or equal than this value
+ * sort: string, // Sort records by a particular field
+ * desc: boolean, // Set the sort direction
+ * body: array, // Record selection criteria
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getRecords(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/results/records";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves configuration information for a trained inference model.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html
+ *
+ * @param array{
+ * model_id: string, // The ID of the trained models to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)
+ * include: string, // A comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none.
+ * include_model_definition: boolean, // Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false.
+ * decompress_definition: boolean, // Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true.
+ * from: int, // skips a number of trained models
+ * size: int, // specifies a max number of trained models to get
+ * tags: list, // A comma-separated list of tags that the model must have.
+ * exclude_generated: boolean, // Omits fields that are illegal to set on model PUT
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getTrainedModels(array $params = [])
+ {
+ if (isset($params['model_id'])) {
+ $url = "/_ml/trained_models/{$params['model_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_ml/trained_models";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves usage information for trained inference models.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html
+ *
+ * @param array{
+ * model_id: string, // The ID of the trained models stats to fetch
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)
+ * from: int, // skips a number of trained models
+ * size: int, // specifies a max number of trained models to get
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getTrainedModelsStats(array $params = [])
+ {
+ if (isset($params['model_id'])) {
+ $url = "/_ml/trained_models/{$params['model_id']}/_stats";
+ $method = 'GET';
+ } else {
+ $url = "/_ml/trained_models/_stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Evaluate a trained model.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model-deployment.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * model_id: string, // (REQUIRED) The unique identifier of the trained model.
+ * timeout: time, // Controls the amount of time to wait for inference results.
+ * body: array, // (REQUIRED) The docs to apply inference on
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function inferTrainedModelDeployment(array $params = [])
+ {
+ $this->checkRequiredParameters(['model_id','body'], $params);
+ $url = "/_ml/trained_models/{$params['model_id']}/deployment/_infer";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns defaults and limits used by machine learning.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html
+ */
+ public function info(array $params = [])
+ {
+ $url = "/_ml/info";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Opens one or more anomaly detection jobs.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to open
+ * body: array, // Query parameters can be specified in the body
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function openJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_open";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Posts scheduled events in a calendar.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html
+ *
+ * @param array{
+ * calendar_id: string, // (REQUIRED) The ID of the calendar to modify
+ * body: array, // (REQUIRED) A list of events
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function postCalendarEvents(array $params = [])
+ {
+ $this->checkRequiredParameters(['calendar_id','body'], $params);
+ $url = "/_ml/calendars/{$params['calendar_id']}/events";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Sends data to an anomaly detection job for analysis.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The name of the job receiving the data
+ * reset_start: string, // Optional parameter to specify the start of the bucket resetting range
+ * reset_end: string, // Optional parameter to specify the end of the bucket resetting range
+ * body: array, // (REQUIRED) The data to process
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function postData(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id','body'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_data";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Previews that will be analyzed given a data frame analytics config.
+ *
+ * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html
+ *
+ * @param array{
+ * id: string, // The ID of the data frame analytics to preview
+ * body: array, // The data frame analytics config to preview
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function previewDataFrameAnalytics(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_ml/data_frame/analytics/{$params['id']}/_preview";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_ml/data_frame/analytics/_preview";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Previews a datafeed.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html
+ *
+ * @param array{
+ * datafeed_id: string, // The ID of the datafeed to preview
+ * body: array, // The datafeed config and job config with which to execute the preview
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function previewDatafeed(array $params = [])
+ {
+ if (isset($params['datafeed_id'])) {
+ $url = "/_ml/datafeeds/{$params['datafeed_id']}/_preview";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_ml/datafeeds/_preview";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Instantiates a calendar.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html
+ *
+ * @param array{
+ * calendar_id: string, // (REQUIRED) The ID of the calendar to create
+ * body: array, // The calendar details
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putCalendar(array $params = [])
+ {
+ $this->checkRequiredParameters(['calendar_id'], $params);
+ $url = "/_ml/calendars/{$params['calendar_id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Adds an anomaly detection job to a calendar.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html
+ *
+ * @param array{
+ * calendar_id: string, // (REQUIRED) The ID of the calendar to modify
+ * job_id: string, // (REQUIRED) The ID of the job to add to the calendar
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putCalendarJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['calendar_id','job_id'], $params);
+ $url = "/_ml/calendars/{$params['calendar_id']}/jobs/{$params['job_id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Instantiates a data frame analytics job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The ID of the data frame analytics to create
+ * body: array, // (REQUIRED) The data frame analytics configuration
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putDataFrameAnalytics(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','body'], $params);
+ $url = "/_ml/data_frame/analytics/{$params['id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Instantiates a datafeed.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
+ *
+ * @param array{
+ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to create
+ * ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
+ * allow_no_indices: boolean, // Ignore if the source indices expressions resolves to no concrete indices (default: true)
+ * ignore_throttled: boolean, // Ignore indices that are marked as throttled (default: true)
+ * expand_wildcards: enum, // Whether source index expressions should get expanded to open or closed indices (default: open)
+ * body: array, // (REQUIRED) The datafeed config
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putDatafeed(array $params = [])
+ {
+ $this->checkRequiredParameters(['datafeed_id','body'], $params);
+ $url = "/_ml/datafeeds/{$params['datafeed_id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Instantiates a filter.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html
+ *
+ * @param array{
+ * filter_id: string, // (REQUIRED) The ID of the filter to create
+ * body: array, // (REQUIRED) The filter details
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putFilter(array $params = [])
+ {
+ $this->checkRequiredParameters(['filter_id','body'], $params);
+ $url = "/_ml/filters/{$params['filter_id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Instantiates an anomaly detection job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to create
+ * ignore_unavailable: boolean, // Ignore unavailable indexes (default: false). Only set if datafeed_config is provided.
+ * allow_no_indices: boolean, // Ignore if the source indices expressions resolves to no concrete indices (default: true). Only set if datafeed_config is provided.
+ * ignore_throttled: boolean, // Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided.
+ * expand_wildcards: enum, // Whether source index expressions should get expanded to open or closed indices (default: open). Only set if datafeed_config is provided.
+ * body: array, // (REQUIRED) The job
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id','body'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates an inference trained model.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html
+ *
+ * @param array{
+ * model_id: string, // (REQUIRED) The ID of the trained models to store
+ * defer_definition_decompression: boolean, // If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations.
+ * body: array, // (REQUIRED) The trained model configuration
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putTrainedModel(array $params = [])
+ {
+ $this->checkRequiredParameters(['model_id','body'], $params);
+ $url = "/_ml/trained_models/{$params['model_id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a new model alias (or reassigns an existing one) to refer to the trained model
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html
+ *
+ * @param array{
+ * model_alias: string, // (REQUIRED) The trained model alias to update
+ * model_id: string, // (REQUIRED) The trained model where the model alias should be assigned
+ * reassign: boolean, // If the model_alias already exists and points to a separate model_id, this parameter must be true. Defaults to false.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putTrainedModelAlias(array $params = [])
+ {
+ $this->checkRequiredParameters(['model_alias','model_id'], $params);
+ $url = "/_ml/trained_models/{$params['model_id']}/model_aliases/{$params['model_alias']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates part of a trained model definition
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * model_id: string, // (REQUIRED) The ID of the trained model for this definition part
+ * part: int, // (REQUIRED) The part number
+ * body: array, // (REQUIRED) The trained model definition part
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putTrainedModelDefinitionPart(array $params = [])
+ {
+ $this->checkRequiredParameters(['model_id','part','body'], $params);
+ $url = "/_ml/trained_models/{$params['model_id']}/definition/{$params['part']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a trained model vocabulary
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * model_id: string, // (REQUIRED) The ID of the trained model for this vocabulary
+ * body: array, // (REQUIRED) The trained model vocabulary
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putTrainedModelVocabulary(array $params = [])
+ {
+ $this->checkRequiredParameters(['model_id','body'], $params);
+ $url = "/_ml/trained_models/{$params['model_id']}/vocabulary";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Resets an existing anomaly detection job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to reset
+ * wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function resetJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_reset";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Reverts to a specific snapshot.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to fetch
+ * snapshot_id: string, // (REQUIRED) The ID of the snapshot to revert to
+ * delete_intervening_results: boolean, // Should we reset the results back to the time of the snapshot?
+ * body: array, // Reversion options
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function revertModelSnapshot(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id','snapshot_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/model_snapshots/{$params['snapshot_id']}/_revert";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html
+ *
+ * @param array{
+ * enabled: boolean, // Whether to enable upgrade_mode ML setting or not. Defaults to false.
+ * timeout: time, // Controls the time to wait before action times out. Defaults to 30 seconds
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function setUpgradeMode(array $params = [])
+ {
+ $url = "/_ml/set_upgrade_mode";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Starts a data frame analytics job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The ID of the data frame analytics to start
+ * timeout: time, // Controls the time to wait until the task has started. Defaults to 20 seconds
+ * body: array, // The start data frame analytics parameters
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function startDataFrameAnalytics(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_ml/data_frame/analytics/{$params['id']}/_start";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Starts one or more datafeeds.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html
+ *
+ * @param array{
+ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to start
+ * start: string, // The start time from where the datafeed should begin
+ * end: string, // The end time when the datafeed should stop. When not set, the datafeed continues in real time
+ * timeout: time, // Controls the time to wait until a datafeed has started. Default to 20 seconds
+ * body: array, // The start datafeed parameters
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function startDatafeed(array $params = [])
+ {
+ $this->checkRequiredParameters(['datafeed_id'], $params);
+ $url = "/_ml/datafeeds/{$params['datafeed_id']}/_start";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Start a trained model deployment.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * model_id: string, // (REQUIRED) The unique identifier of the trained model.
+ * timeout: time, // Controls the amount of time to wait for the model to deploy.
+ * wait_for: string, // The allocation status for which to wait
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function startTrainedModelDeployment(array $params = [])
+ {
+ $this->checkRequiredParameters(['model_id'], $params);
+ $url = "/_ml/trained_models/{$params['model_id']}/deployment/_start";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Stops one or more data frame analytics jobs.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The ID of the data frame analytics to stop
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified)
+ * force: boolean, // True if the data frame analytics should be forcefully stopped
+ * timeout: time, // Controls the time to wait until the task has stopped. Defaults to 20 seconds
+ * body: array, // The stop data frame analytics parameters
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stopDataFrameAnalytics(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_ml/data_frame/analytics/{$params['id']}/_stop";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Stops one or more datafeeds.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html
+ *
+ * @param array{
+ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to stop
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
+ * allow_no_datafeeds: boolean, // Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
+ * force: boolean, // True if the datafeed should be forcefully stopped.
+ * timeout: time, // Controls the time to wait until a datafeed has stopped. Default to 20 seconds
+ * body: array, // The URL params optionally sent in the body
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stopDatafeed(array $params = [])
+ {
+ $this->checkRequiredParameters(['datafeed_id'], $params);
+ $url = "/_ml/datafeeds/{$params['datafeed_id']}/_stop";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Stop a trained model deployment.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/stop-trained-model-deployment.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * model_id: string, // (REQUIRED) The unique identifier of the trained model.
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no deployments. (This includes `_all` string or when no deployments have been specified)
+ * force: boolean, // True if the deployment should be forcefully stopped
+ * body: array, // The stop deployment parameters
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stopTrainedModelDeployment(array $params = [])
+ {
+ $this->checkRequiredParameters(['model_id'], $params);
+ $url = "/_ml/trained_models/{$params['model_id']}/deployment/_stop";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates certain properties of a data frame analytics job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The ID of the data frame analytics to update
+ * body: array, // (REQUIRED) The data frame analytics settings to update
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function updateDataFrameAnalytics(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','body'], $params);
+ $url = "/_ml/data_frame/analytics/{$params['id']}/_update";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates certain properties of a datafeed.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html
+ *
+ * @param array{
+ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to update
+ * ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
+ * allow_no_indices: boolean, // Ignore if the source indices expressions resolves to no concrete indices (default: true)
+ * ignore_throttled: boolean, // Ignore indices that are marked as throttled (default: true)
+ * expand_wildcards: enum, // Whether source index expressions should get expanded to open or closed indices (default: open)
+ * body: array, // (REQUIRED) The datafeed update settings
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function updateDatafeed(array $params = [])
+ {
+ $this->checkRequiredParameters(['datafeed_id','body'], $params);
+ $url = "/_ml/datafeeds/{$params['datafeed_id']}/_update";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates the description of a filter, adds items, or removes items.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html
+ *
+ * @param array{
+ * filter_id: string, // (REQUIRED) The ID of the filter to update
+ * body: array, // (REQUIRED) The filter update
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function updateFilter(array $params = [])
+ {
+ $this->checkRequiredParameters(['filter_id','body'], $params);
+ $url = "/_ml/filters/{$params['filter_id']}/_update";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates certain properties of an anomaly detection job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to create
+ * body: array, // (REQUIRED) The job update settings
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function updateJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id','body'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/_update";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates certain properties of a snapshot.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job to fetch
+ * snapshot_id: string, // (REQUIRED) The ID of the snapshot to update
+ * body: array, // (REQUIRED) The model snapshot properties to update
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function updateModelSnapshot(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id','snapshot_id','body'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/model_snapshots/{$params['snapshot_id']}/_update";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Upgrades a given job snapshot to the current major version.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html
+ *
+ * @param array{
+ * job_id: string, // (REQUIRED) The ID of the job
+ * snapshot_id: string, // (REQUIRED) The ID of the snapshot
+ * timeout: time, // How long should the API wait for the job to be opened and the old snapshot to be loaded.
+ * wait_for_completion: boolean, // Should the request wait until the task is complete before responding to the caller. Default is false.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function upgradeJobSnapshot(array $params = [])
+ {
+ $this->checkRequiredParameters(['job_id','snapshot_id'], $params);
+ $url = "/_ml/anomaly_detectors/{$params['job_id']}/model_snapshots/{$params['snapshot_id']}/_upgrade";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Validates an anomaly detection job.
+ *
+ * @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The job config
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function validate(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_ml/anomaly_detectors/_validate";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Validates an anomaly detection detector.
+ *
+ * @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The detector
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function validateDetector(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_ml/anomaly_detectors/_validate/detector";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Monitoring.php b/src/Endpoints/Monitoring.php
new file mode 100644
index 000000000..8f78f5dbb
--- /dev/null
+++ b/src/Endpoints/Monitoring.php
@@ -0,0 +1,58 @@
+checkRequiredParameters(['body'], $params);
+ if (isset($params['type'])) {
+ $url = "/_monitoring/{$params['type']}/bulk";
+ $method = 'POST';
+ } else {
+ $url = "/_monitoring/bulk";
+ $method = 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Nodes.php b/src/Endpoints/Nodes.php
new file mode 100644
index 000000000..3fb9e9b49
--- /dev/null
+++ b/src/Endpoints/Nodes.php
@@ -0,0 +1,243 @@
+checkRequiredParameters(['node_id','max_archive_version'], $params);
+ $url = "/_nodes/{$params['node_id']}/_repositories_metering/{$params['max_archive_version']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns cluster repositories metering information.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * node_id: list, // (REQUIRED) A comma-separated list of node IDs or names to limit the returned information.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getRepositoriesMeteringInfo(array $params = [])
+ {
+ $this->checkRequiredParameters(['node_id'], $params);
+ $url = "/_nodes/{$params['node_id']}/_repositories_metering";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about hot threads on each node in the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html
+ *
+ * @param array{
+ * node_id: list, // A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+ * interval: time, // The interval for the second sampling of threads
+ * snapshots: number, // Number of samples of thread stacktrace (default: 10)
+ * threads: number, // Specify the number of threads to provide information for (default: 3)
+ * ignore_idle_threads: boolean, // Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
+ * type: enum, // The type to sample (default: cpu)
+ * sort: enum, // The sort order for 'cpu' type (default: total)
+ * timeout: time, // Explicit operation timeout
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function hotThreads(array $params = [])
+ {
+ if (isset($params['node_id'])) {
+ $url = "/_nodes/{$params['node_id']}/hot_threads";
+ $method = 'GET';
+ } else {
+ $url = "/_nodes/hot_threads";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about nodes in the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html
+ *
+ * @param array{
+ * node_id: list, // A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+ * metric: list, // A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics.
+ * flat_settings: boolean, // Return settings in flat format (default: false)
+ * timeout: time, // Explicit operation timeout
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function info(array $params = [])
+ {
+ if (isset($params['node_id']) && isset($params['metric'])) {
+ $url = "/_nodes/{$params['node_id']}/{$params['metric']}";
+ $method = 'GET';
+ } elseif (isset($params['node_id'])) {
+ $url = "/_nodes/{$params['node_id']}";
+ $method = 'GET';
+ } elseif (isset($params['metric'])) {
+ $url = "/_nodes/{$params['metric']}";
+ $method = 'GET';
+ } else {
+ $url = "/_nodes";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Reloads secure settings.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings
+ *
+ * @param array{
+ * node_id: list, // A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.
+ * timeout: time, // Explicit operation timeout
+ * body: array, // An object containing the password for the elasticsearch keystore
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function reloadSecureSettings(array $params = [])
+ {
+ if (isset($params['node_id'])) {
+ $url = "/_nodes/{$params['node_id']}/reload_secure_settings";
+ $method = 'POST';
+ } else {
+ $url = "/_nodes/reload_secure_settings";
+ $method = 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns statistical information about nodes in the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
+ *
+ * @param array{
+ * node_id: list, // A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+ * metric: list, // Limit the information returned to the specified metrics
+ * index_metric: list, // Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
+ * completion_fields: list, // A comma-separated list of fields for the `completion` index metric (supports wildcards)
+ * fielddata_fields: list, // A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
+ * fields: list, // A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
+ * groups: boolean, // A comma-separated list of search groups for `search` index metric
+ * level: enum, // Return indices stats aggregated at index, node or shard level
+ * types: list, // A comma-separated list of document types for the `indexing` index metric
+ * timeout: time, // Explicit operation timeout
+ * include_segment_file_sizes: boolean, // Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
+ * include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stats(array $params = [])
+ {
+ if (isset($params['metric']) && isset($params['index_metric']) && isset($params['node_id'])) {
+ $url = "/_nodes/{$params['node_id']}/stats/{$params['metric']}/{$params['index_metric']}";
+ $method = 'GET';
+ } elseif (isset($params['metric']) && isset($params['node_id'])) {
+ $url = "/_nodes/{$params['node_id']}/stats/{$params['metric']}";
+ $method = 'GET';
+ } elseif (isset($params['metric']) && isset($params['index_metric'])) {
+ $url = "/_nodes/stats/{$params['metric']}/{$params['index_metric']}";
+ $method = 'GET';
+ } elseif (isset($params['node_id'])) {
+ $url = "/_nodes/{$params['node_id']}/stats";
+ $method = 'GET';
+ } elseif (isset($params['metric'])) {
+ $url = "/_nodes/stats/{$params['metric']}";
+ $method = 'GET';
+ } else {
+ $url = "/_nodes/stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns low-level information about REST actions usage on nodes.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
+ *
+ * @param array{
+ * node_id: list, // A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+ * metric: list, // Limit the information returned to the specified metrics
+ * timeout: time, // Explicit operation timeout
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function usage(array $params = [])
+ {
+ if (isset($params['metric']) && isset($params['node_id'])) {
+ $url = "/_nodes/{$params['node_id']}/usage/{$params['metric']}";
+ $method = 'GET';
+ } elseif (isset($params['node_id'])) {
+ $url = "/_nodes/{$params['node_id']}/usage";
+ $method = 'GET';
+ } elseif (isset($params['metric'])) {
+ $url = "/_nodes/usage/{$params['metric']}";
+ $method = 'GET';
+ } else {
+ $url = "/_nodes/usage";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Rollup.php b/src/Endpoints/Rollup.php
new file mode 100644
index 000000000..3f8534a7e
--- /dev/null
+++ b/src/Endpoints/Rollup.php
@@ -0,0 +1,241 @@
+checkRequiredParameters(['id'], $params);
+ $url = "/_rollup/job/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves the configuration, stats, and status of rollup jobs.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * id: string, // The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getJobs(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_rollup/job/{$params['id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_rollup/job/";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * id: string, // The ID of the index to check rollup capabilities on, or left blank for all jobs
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getRollupCaps(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_rollup/data/{$params['id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_rollup/data/";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored).
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-index-caps.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The rollup index or index pattern to obtain rollup capabilities from.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getRollupIndexCaps(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_rollup/data";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a rollup job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-put-job.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The ID of the job to create
+ * body: array, // (REQUIRED) The job configuration
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','body'], $params);
+ $url = "/_rollup/job/{$params['id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Rollup an index
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The index to roll up
+ * rollup_index: string, // (REQUIRED) The name of the rollup index to create
+ * body: array, // (REQUIRED) The rollup configuration
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function rollup(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','rollup_index','body'], $params);
+ $url = "/{$params['index']}/_rollup/{$params['rollup_index']}";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Enables searching rolled-up data using the standard query DSL.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-search.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: list, // (REQUIRED) The indices or index-pattern(s) (containing rollup or regular data) that should be searched
+ * typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+ * rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+ * body: array, // (REQUIRED) The search request body
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function rollupSearch(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','body'], $params);
+ $url = "/{$params['index']}/_rollup_search";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Starts an existing, stopped rollup job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-start-job.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The ID of the job to start
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function startJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_rollup/job/{$params['id']}/_start";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Stops an existing, started rollup job.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-stop-job.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The ID of the job to stop
+ * wait_for_completion: boolean, // True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false.
+ * timeout: time, // Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stopJob(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_rollup/job/{$params['id']}/_stop";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/SearchableSnapshots.php b/src/Endpoints/SearchableSnapshots.php
new file mode 100644
index 000000000..02e280673
--- /dev/null
+++ b/src/Endpoints/SearchableSnapshots.php
@@ -0,0 +1,134 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Clear the cache of searchable snapshots.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * index: list, // A comma-separated list of index name to limit the operation
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clearCache(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_searchable_snapshots/cache/clear";
+ $method = 'POST';
+ } else {
+ $url = "/_searchable_snapshots/cache/clear";
+ $method = 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Mount a snapshot as a searchable index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html
+ *
+ * @param array{
+ * repository: string, // (REQUIRED) The name of the repository containing the snapshot of the index to mount
+ * snapshot: string, // (REQUIRED) The name of the snapshot of the index to mount
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
+ * storage: string, // Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy`
+ * body: array, // (REQUIRED) The restore configuration for mounting the snapshot as searchable
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function mount(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository','snapshot','body'], $params);
+ $url = "/_snapshot/{$params['repository']}/{$params['snapshot']}/_mount";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieve shard-level statistics about searchable snapshots.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names
+ * level: enum, // Return stats aggregated at cluster, index or shard level
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stats(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_searchable_snapshots/stats";
+ $method = 'GET';
+ } else {
+ $url = "/_searchable_snapshots/stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Security.php b/src/Endpoints/Security.php
new file mode 100644
index 000000000..8940631ea
--- /dev/null
+++ b/src/Endpoints/Security.php
@@ -0,0 +1,963 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Changes the passwords of users in the native realm and built-in users.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html
+ *
+ * @param array{
+ * username: string, // The username of the user to change the password for
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * body: array, // (REQUIRED) the new password for the user
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function changePassword(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['username'])) {
+ $url = "/_security/user/{$params['username']}/_password";
+ $method = 'PUT';
+ } else {
+ $url = "/_security/user/_password";
+ $method = 'PUT';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Clear a subset or all entries from the API key cache.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html
+ *
+ * @param array{
+ * ids: list, // (REQUIRED) A comma-separated list of IDs of API keys to clear from the cache
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clearApiKeyCache(array $params = [])
+ {
+ $this->checkRequiredParameters(['ids'], $params);
+ $url = "/_security/api_key/{$params['ids']}/_clear_cache";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Evicts application privileges from the native application privileges cache.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html
+ *
+ * @param array{
+ * application: list, // (REQUIRED) A comma-separated list of application names
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clearCachedPrivileges(array $params = [])
+ {
+ $this->checkRequiredParameters(['application'], $params);
+ $url = "/_security/privilege/{$params['application']}/_clear_cache";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Evicts users from the user cache. Can completely clear the cache or evict specific users.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html
+ *
+ * @param array{
+ * realms: list, // (REQUIRED) Comma-separated list of realms to clear
+ * usernames: list, // Comma-separated list of usernames to clear from the cache
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clearCachedRealms(array $params = [])
+ {
+ $this->checkRequiredParameters(['realms'], $params);
+ $url = "/_security/realm/{$params['realms']}/_clear_cache";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Evicts roles from the native role cache.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html
+ *
+ * @param array{
+ * name: list, // (REQUIRED) Role name
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clearCachedRoles(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_security/role/{$params['name']}/_clear_cache";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Evicts tokens from the service account token caches.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html
+ *
+ * @param array{
+ * namespace: string, // (REQUIRED) An identifier for the namespace
+ * service: string, // (REQUIRED) An identifier for the service name
+ * name: list, // (REQUIRED) A comma-separated list of service token names
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clearCachedServiceTokens(array $params = [])
+ {
+ $this->checkRequiredParameters(['namespace','service','name'], $params);
+ $url = "/_security/service/{$params['namespace']}/{$params['service']}/credential/token/{$params['name']}/_clear_cache";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates an API key for access without requiring basic authentication.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
+ *
+ * @param array{
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * body: array, // (REQUIRED) The api key request to create an API key
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function createApiKey(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/api_key";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a service account token for access without requiring basic authentication.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html
+ *
+ * @param array{
+ * namespace: string, // (REQUIRED) An identifier for the namespace
+ * service: string, // (REQUIRED) An identifier for the service name
+ * name: string, // An identifier for the token name
+ * refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function createServiceToken(array $params = [])
+ {
+ $this->checkRequiredParameters(['namespace','service'], $params);
+ if (isset($params['name'])) {
+ $url = "/_security/service/{$params['namespace']}/{$params['service']}/credential/token/{$params['name']}";
+ $method = 'PUT';
+ } else {
+ $url = "/_security/service/{$params['namespace']}/{$params['service']}/credential/token";
+ $method = 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Removes application privileges.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html
+ *
+ * @param array{
+ * application: string, // (REQUIRED) Application name
+ * name: string, // (REQUIRED) Privilege name
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deletePrivileges(array $params = [])
+ {
+ $this->checkRequiredParameters(['application','name'], $params);
+ $url = "/_security/privilege/{$params['application']}/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Removes roles in the native realm.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) Role name
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteRole(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_security/role/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Removes role mappings.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) Role-mapping name
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteRoleMapping(array $params = [])
+ {
+ $this->checkRequiredParameters(['name'], $params);
+ $url = "/_security/role_mapping/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes a service account token.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html
+ *
+ * @param array{
+ * namespace: string, // (REQUIRED) An identifier for the namespace
+ * service: string, // (REQUIRED) An identifier for the service name
+ * name: string, // (REQUIRED) An identifier for the token name
+ * refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteServiceToken(array $params = [])
+ {
+ $this->checkRequiredParameters(['namespace','service','name'], $params);
+ $url = "/_security/service/{$params['namespace']}/{$params['service']}/credential/token/{$params['name']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes users from the native realm.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html
+ *
+ * @param array{
+ * username: string, // (REQUIRED) username
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteUser(array $params = [])
+ {
+ $this->checkRequiredParameters(['username'], $params);
+ $url = "/_security/user/{$params['username']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Disables users in the native realm.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html
+ *
+ * @param array{
+ * username: string, // (REQUIRED) The username of the user to disable
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function disableUser(array $params = [])
+ {
+ $this->checkRequiredParameters(['username'], $params);
+ $url = "/_security/user/{$params['username']}/_disable";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Enables users in the native realm.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html
+ *
+ * @param array{
+ * username: string, // (REQUIRED) The username of the user to enable
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function enableUser(array $params = [])
+ {
+ $this->checkRequiredParameters(['username'], $params);
+ $url = "/_security/user/{$params['username']}/_enable";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows a kibana instance to configure itself to communicate with a secured elasticsearch cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-kibana-enrollment.html
+ */
+ public function enrollKibana(array $params = [])
+ {
+ $url = "/_security/enroll/kibana";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows a new node to enroll to an existing cluster with security enabled.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-node-enrollment.html
+ */
+ public function enrollNode(array $params = [])
+ {
+ $url = "/_security/enroll/node";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information for one or more API keys.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html
+ *
+ * @param array{
+ * id: string, // API key id of the API key to be retrieved
+ * name: string, // API key name of the API key to be retrieved
+ * username: string, // user name of the user who created this API key to be retrieved
+ * realm_name: string, // realm name of the user who created this API key to be retrieved
+ * owner: boolean, // flag to query API keys owned by the currently authenticated user
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getApiKey(array $params = [])
+ {
+ $url = "/_security/api_key";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html
+ */
+ public function getBuiltinPrivileges(array $params = [])
+ {
+ $url = "/_security/privilege/_builtin";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves application privileges.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html
+ *
+ * @param array{
+ * application: string, // Application name
+ * name: string, // Privilege name
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getPrivileges(array $params = [])
+ {
+ if (isset($params['application']) && isset($params['name'])) {
+ $url = "/_security/privilege/{$params['application']}/{$params['name']}";
+ $method = 'GET';
+ } elseif (isset($params['application'])) {
+ $url = "/_security/privilege/{$params['application']}";
+ $method = 'GET';
+ } else {
+ $url = "/_security/privilege";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves roles in the native realm.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html
+ *
+ * @param array{
+ * name: list, // A comma-separated list of role names
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getRole(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_security/role/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_security/role";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves role mappings.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html
+ *
+ * @param array{
+ * name: list, // A comma-separated list of role-mapping names
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getRoleMapping(array $params = [])
+ {
+ if (isset($params['name'])) {
+ $url = "/_security/role_mapping/{$params['name']}";
+ $method = 'GET';
+ } else {
+ $url = "/_security/role_mapping";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information about service accounts.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html
+ *
+ * @param array{
+ * namespace: string, // An identifier for the namespace
+ * service: string, // An identifier for the service name
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getServiceAccounts(array $params = [])
+ {
+ if (isset($params['namespace']) && isset($params['service'])) {
+ $url = "/_security/service/{$params['namespace']}/{$params['service']}";
+ $method = 'GET';
+ } elseif (isset($params['namespace'])) {
+ $url = "/_security/service/{$params['namespace']}";
+ $method = 'GET';
+ } else {
+ $url = "/_security/service";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information of all service credentials for a service account.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html
+ *
+ * @param array{
+ * namespace: string, // (REQUIRED) An identifier for the namespace
+ * service: string, // (REQUIRED) An identifier for the service name
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getServiceCredentials(array $params = [])
+ {
+ $this->checkRequiredParameters(['namespace','service'], $params);
+ $url = "/_security/service/{$params['namespace']}/{$params['service']}/credential";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a bearer token for access without requiring basic authentication.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The token request to get
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getToken(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/oauth2/token";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information about users in the native realm and built-in users.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html
+ *
+ * @param array{
+ * username: list, // A comma-separated list of usernames
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getUser(array $params = [])
+ {
+ if (isset($params['username'])) {
+ $url = "/_security/user/{$params['username']}";
+ $method = 'GET';
+ } else {
+ $url = "/_security/user";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves security privileges for the logged in user.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html
+ */
+ public function getUserPrivileges(array $params = [])
+ {
+ $url = "/_security/user/_privileges";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates an API key on behalf of another user.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html
+ *
+ * @param array{
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * body: array, // (REQUIRED) The api key request to create an API key
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function grantApiKey(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/api_key/grant";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Determines whether the specified user has a specified list of privileges.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html
+ *
+ * @param array{
+ * user: string, // Username
+ * body: array, // (REQUIRED) The privileges to test
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function hasPrivileges(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['user'])) {
+ $url = "/_security/user/{$params['user']}/_has_privileges";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_security/user/_has_privileges";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Invalidates one or more API keys.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The api key request to invalidate API key(s)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function invalidateApiKey(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/api_key";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Invalidates one or more access tokens or refresh tokens.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The token to invalidate
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function invalidateToken(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/oauth2/token";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Adds or updates application privileges.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html
+ *
+ * @param array{
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * body: array, // (REQUIRED) The privilege(s) to add
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putPrivileges(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/privilege/";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Adds and updates roles in the native realm.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) Role name
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * body: array, // (REQUIRED) The role to add
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putRole(array $params = [])
+ {
+ $this->checkRequiredParameters(['name','body'], $params);
+ $url = "/_security/role/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates and updates role mappings.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html
+ *
+ * @param array{
+ * name: string, // (REQUIRED) Role-mapping name
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * body: array, // (REQUIRED) The role mapping to add
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putRoleMapping(array $params = [])
+ {
+ $this->checkRequiredParameters(['name','body'], $params);
+ $url = "/_security/role_mapping/{$params['name']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Adds and updates users in the native realm. These users are commonly referred to as native users.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html
+ *
+ * @param array{
+ * username: string, // (REQUIRED) The username of the User
+ * refresh: enum, // If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+ * body: array, // (REQUIRED) The user to add
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putUser(array $params = [])
+ {
+ $this->checkRequiredParameters(['username','body'], $params);
+ $url = "/_security/user/{$params['username']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves information for API keys using a subset of query DSL
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html
+ *
+ * @param array{
+ * body: array, // From, size, query, sort and search_after
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function queryApiKeys(array $params = [])
+ {
+ $url = "/_security/_query/api_key";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Exchanges a SAML Response message for an Elasticsearch access token and refresh token pair
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The SAML response to authenticate
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function samlAuthenticate(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/saml/authenticate";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Verifies the logout response sent from the SAML IdP
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The logout response to verify
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function samlCompleteLogout(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/saml/complete_logout";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Consumes a SAML LogoutRequest
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The LogoutRequest message
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function samlInvalidate(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/saml/invalidate";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Invalidates an access token and a refresh token that were generated via the SAML Authenticate API
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The tokens to invalidate
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function samlLogout(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/saml/logout";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a SAML authentication request
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) The realm for which to create the authentication request, identified by either its name or the ACS URL
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function samlPrepareAuthentication(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_security/saml/prepare";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html
+ *
+ * @param array{
+ * realm_name: string, // (REQUIRED) The name of the SAML realm to get the metadata for
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function samlServiceProviderMetadata(array $params = [])
+ {
+ $this->checkRequiredParameters(['realm_name'], $params);
+ $url = "/_security/saml/metadata/{$params['realm_name']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Shutdown.php b/src/Endpoints/Shutdown.php
new file mode 100644
index 000000000..7f293cfec
--- /dev/null
+++ b/src/Endpoints/Shutdown.php
@@ -0,0 +1,96 @@
+checkRequiredParameters(['node_id'], $params);
+ $url = "/_nodes/{$params['node_id']}/shutdown";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
+ *
+ * @param array{
+ * node_id: string, // Which node for which to retrieve the shutdown status
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getNode(array $params = [])
+ {
+ if (isset($params['node_id'])) {
+ $url = "/_nodes/{$params['node_id']}/shutdown";
+ $method = 'GET';
+ } else {
+ $url = "/_nodes/shutdown";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
+ *
+ * @param array{
+ * node_id: string, // (REQUIRED) The node id of node to be shut down
+ * body: array, // (REQUIRED) The shutdown type definition to register
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putNode(array $params = [])
+ {
+ $this->checkRequiredParameters(['node_id','body'], $params);
+ $url = "/_nodes/{$params['node_id']}/shutdown";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Slm.php b/src/Endpoints/Slm.php
new file mode 100644
index 000000000..24c014136
--- /dev/null
+++ b/src/Endpoints/Slm.php
@@ -0,0 +1,187 @@
+checkRequiredParameters(['policy_id'], $params);
+ $url = "/_slm/policy/{$params['policy_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html
+ *
+ * @param array{
+ * policy_id: string, // (REQUIRED) The id of the snapshot lifecycle policy to be executed
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function executeLifecycle(array $params = [])
+ {
+ $this->checkRequiredParameters(['policy_id'], $params);
+ $url = "/_slm/policy/{$params['policy_id']}/_execute";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes any snapshots that are expired according to the policy's retention rules.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html
+ */
+ public function executeRetention(array $params = [])
+ {
+ $url = "/_slm/_execute_retention";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html
+ *
+ * @param array{
+ * policy_id: list, // Comma-separated list of snapshot lifecycle policies to retrieve
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getLifecycle(array $params = [])
+ {
+ if (isset($params['policy_id'])) {
+ $url = "/_slm/policy/{$params['policy_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_slm/policy";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns global and policy-level statistics about actions taken by snapshot lifecycle management.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html
+ */
+ public function getStats(array $params = [])
+ {
+ $url = "/_slm/stats";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves the status of snapshot lifecycle management (SLM).
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html
+ */
+ public function getStatus(array $params = [])
+ {
+ $url = "/_slm/status";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates or updates a snapshot lifecycle policy.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html
+ *
+ * @param array{
+ * policy_id: string, // (REQUIRED) The id of the snapshot lifecycle policy
+ * body: array, // The snapshot lifecycle policy definition to register
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putLifecycle(array $params = [])
+ {
+ $this->checkRequiredParameters(['policy_id'], $params);
+ $url = "/_slm/policy/{$params['policy_id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Turns on snapshot lifecycle management (SLM).
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html
+ */
+ public function start(array $params = [])
+ {
+ $url = "/_slm/start";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Turns off snapshot lifecycle management (SLM).
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html
+ */
+ public function stop(array $params = [])
+ {
+ $url = "/_slm/stop";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Snapshot.php b/src/Endpoints/Snapshot.php
new file mode 100644
index 000000000..d428c75be
--- /dev/null
+++ b/src/Endpoints/Snapshot.php
@@ -0,0 +1,336 @@
+checkRequiredParameters(['repository'], $params);
+ $url = "/_snapshot/{$params['repository']}/_cleanup";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Clones indices from one snapshot into another snapshot in the same repository.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: string, // (REQUIRED) A repository name
+ * snapshot: string, // (REQUIRED) The name of the snapshot to clone from
+ * target_snapshot: string, // (REQUIRED) The name of the cloned snapshot to create
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * body: array, // (REQUIRED) The snapshot clone definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clone(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository','snapshot','target_snapshot','body'], $params);
+ $url = "/_snapshot/{$params['repository']}/{$params['snapshot']}/_clone/{$params['target_snapshot']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a snapshot in a repository.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: string, // (REQUIRED) A repository name
+ * snapshot: string, // (REQUIRED) A snapshot name
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
+ * body: array, // The snapshot definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function create(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository','snapshot'], $params);
+ $url = "/_snapshot/{$params['repository']}/{$params['snapshot']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a repository.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: string, // (REQUIRED) A repository name
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * timeout: time, // Explicit operation timeout
+ * verify: boolean, // Whether to verify the repository after creation
+ * body: array, // (REQUIRED) The repository definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function createRepository(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository','body'], $params);
+ $url = "/_snapshot/{$params['repository']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes one or more snapshots.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: string, // (REQUIRED) A repository name
+ * snapshot: list, // (REQUIRED) A comma-separated list of snapshot names
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function delete(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository','snapshot'], $params);
+ $url = "/_snapshot/{$params['repository']}/{$params['snapshot']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes a repository.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: list, // (REQUIRED) Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported.
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * timeout: time, // Explicit operation timeout
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteRepository(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository'], $params);
+ $url = "/_snapshot/{$params['repository']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about a snapshot.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: string, // (REQUIRED) A repository name
+ * snapshot: list, // (REQUIRED) A comma-separated list of snapshot names
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * ignore_unavailable: boolean, // Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
+ * index_details: boolean, // Whether to include details of each index in the snapshot, if those details are available. Defaults to false.
+ * include_repository: boolean, // Whether to include the repository name in the snapshot info. Defaults to true.
+ * verbose: boolean, // Whether to show verbose snapshot info or only show the basic info found in the repository index blob
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function get(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository','snapshot'], $params);
+ $url = "/_snapshot/{$params['repository']}/{$params['snapshot']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about a repository.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: list, // A comma-separated list of repository names
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getRepository(array $params = [])
+ {
+ if (isset($params['repository'])) {
+ $url = "/_snapshot/{$params['repository']}";
+ $method = 'GET';
+ } else {
+ $url = "/_snapshot";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Analyzes a repository for correctness and performance
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: string, // (REQUIRED) A repository name
+ * blob_count: number, // Number of blobs to create during the test. Defaults to 100.
+ * concurrency: number, // Number of operations to run concurrently during the test. Defaults to 10.
+ * read_node_count: number, // Number of nodes on which to read a blob after writing. Defaults to 10.
+ * early_read_node_count: number, // Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2.
+ * seed: number, // Seed for the random number generator used to create the test workload. Defaults to a random value.
+ * rare_action_probability: number, // Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02.
+ * max_blob_size: string, // Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'.
+ * max_total_data_size: string, // Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'.
+ * timeout: time, // Explicit operation timeout. Defaults to '30s'.
+ * detailed: boolean, // Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned.
+ * rarely_abort_writes: boolean, // Whether to rarely abort writes before they complete. Defaults to 'true'.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function repositoryAnalyze(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository'], $params);
+ $url = "/_snapshot/{$params['repository']}/_analyze";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Restores a snapshot.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: string, // (REQUIRED) A repository name
+ * snapshot: string, // (REQUIRED) A snapshot name
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
+ * body: array, // Details of what to restore
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function restore(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository','snapshot'], $params);
+ $url = "/_snapshot/{$params['repository']}/{$params['snapshot']}/_restore";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about the status of a snapshot.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: string, // A repository name
+ * snapshot: list, // A comma-separated list of snapshot names
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * ignore_unavailable: boolean, // Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function status(array $params = [])
+ {
+ if (isset($params['repository']) && isset($params['snapshot'])) {
+ $url = "/_snapshot/{$params['repository']}/{$params['snapshot']}/_status";
+ $method = 'GET';
+ } elseif (isset($params['repository'])) {
+ $url = "/_snapshot/{$params['repository']}/_status";
+ $method = 'GET';
+ } else {
+ $url = "/_snapshot/_status";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Verifies a repository.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
+ *
+ * @param array{
+ * repository: string, // (REQUIRED) A repository name
+ * master_timeout: time, // Explicit operation timeout for connection to master node
+ * timeout: time, // Explicit operation timeout
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function verifyRepository(array $params = [])
+ {
+ $this->checkRequiredParameters(['repository'], $params);
+ $url = "/_snapshot/{$params['repository']}/_verify";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Sql.php b/src/Endpoints/Sql.php
new file mode 100644
index 000000000..bb6457973
--- /dev/null
+++ b/src/Endpoints/Sql.php
@@ -0,0 +1,160 @@
+checkRequiredParameters(['body'], $params);
+ $url = "/_sql/close";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-async-sql-search-api.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The async search ID
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteAsync(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_sql/async/delete/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the current status and available results for an async SQL search or stored synchronous SQL search
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-api.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The async search ID
+ * delimiter: string, // Separator for CSV results
+ * format: string, // Short version of the Accept header, e.g. json, yaml
+ * keep_alive: time, // Retention period for the search and its results
+ * wait_for_completion_timeout: time, // Duration to wait for complete results
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getAsync(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_sql/async/{$params['id']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the current status of an async SQL search or a stored synchronous SQL search
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-status-api.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The async search ID
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getAsyncStatus(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_sql/async/status/{$params['id']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Executes a SQL request
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html
+ *
+ * @param array{
+ * format: string, // a short version of the Accept header, e.g. json, yaml
+ * body: array, // (REQUIRED) Use the `query` element to start a query. Use the `cursor` element to continue a query.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function query(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_sql";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Translates SQL into Elasticsearch queries
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html
+ *
+ * @param array{
+ * body: array, // (REQUIRED) Specify the query in the `query` element.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function translate(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_sql/translate";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Ssl.php b/src/Endpoints/Ssl.php
new file mode 100644
index 000000000..9faf73537
--- /dev/null
+++ b/src/Endpoints/Ssl.php
@@ -0,0 +1,43 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Tasks.php b/src/Endpoints/Tasks.php
new file mode 100644
index 000000000..364138afa
--- /dev/null
+++ b/src/Endpoints/Tasks.php
@@ -0,0 +1,109 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about a task.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * task_id: string, // (REQUIRED) Return the task with specified id (node_id:task_number)
+ * wait_for_completion: boolean, // Wait for the matching tasks to complete (default: false)
+ * timeout: time, // Explicit operation timeout
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function get(array $params = [])
+ {
+ $this->checkRequiredParameters(['task_id'], $params);
+ $url = "/_tasks/{$params['task_id']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns a list of tasks.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * nodes: list, // A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+ * actions: list, // A comma-separated list of actions that should be returned. Leave empty to return all.
+ * detailed: boolean, // Return detailed task information (default: false)
+ * parent_task_id: string, // Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
+ * wait_for_completion: boolean, // Wait for the matching tasks to complete (default: false)
+ * group_by: enum, // Group tasks by nodes or parent/child relationships
+ * timeout: time, // Explicit operation timeout
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function list(array $params = [])
+ {
+ $url = "/_tasks";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/TextStructure.php b/src/Endpoints/TextStructure.php
new file mode 100644
index 000000000..12b41de89
--- /dev/null
+++ b/src/Endpoints/TextStructure.php
@@ -0,0 +1,64 @@
+checkRequiredParameters(['body'], $params);
+ $url = "/_text_structure/find_structure";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Transform.php b/src/Endpoints/Transform.php
new file mode 100644
index 000000000..7cbc9c37e
--- /dev/null
+++ b/src/Endpoints/Transform.php
@@ -0,0 +1,247 @@
+checkRequiredParameters(['transform_id'], $params);
+ $url = "/_transform/{$params['transform_id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves configuration information for transforms.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html
+ *
+ * @param array{
+ * transform_id: string, // The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms
+ * from: int, // skips a number of transform configs, defaults to 0
+ * size: int, // specifies a max number of transforms to get, defaults to 100
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
+ * exclude_generated: boolean, // Omits fields that are illegal to set on transform PUT
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getTransform(array $params = [])
+ {
+ if (isset($params['transform_id'])) {
+ $url = "/_transform/{$params['transform_id']}";
+ $method = 'GET';
+ } else {
+ $url = "/_transform";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves usage information for transforms.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html
+ *
+ * @param array{
+ * transform_id: string, // (REQUIRED) The id of the transform for which to get stats. '_all' or '*' implies all transforms
+ * from: number, // skips a number of transform stats, defaults to 0
+ * size: number, // specifies a max number of transform stats to get, defaults to 100
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getTransformStats(array $params = [])
+ {
+ $this->checkRequiredParameters(['transform_id'], $params);
+ $url = "/_transform/{$params['transform_id']}/_stats";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Previews a transform.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html
+ *
+ * @param array{
+ * transform_id: string, // The id of the transform to preview.
+ * timeout: time, // Controls the time to wait for the preview
+ * body: array, // The definition for the transform to preview
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function previewTransform(array $params = [])
+ {
+ if (isset($params['transform_id'])) {
+ $url = "/_transform/{$params['transform_id']}/_preview";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_transform/_preview";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Instantiates a transform.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html
+ *
+ * @param array{
+ * transform_id: string, // (REQUIRED) The id of the new transform.
+ * defer_validation: boolean, // If validations should be deferred until transform starts, defaults to false.
+ * timeout: time, // Controls the time to wait for the transform to start
+ * body: array, // (REQUIRED) The transform definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putTransform(array $params = [])
+ {
+ $this->checkRequiredParameters(['transform_id','body'], $params);
+ $url = "/_transform/{$params['transform_id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Starts one or more transforms.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html
+ *
+ * @param array{
+ * transform_id: string, // (REQUIRED) The id of the transform to start
+ * timeout: time, // Controls the time to wait for the transform to start
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function startTransform(array $params = [])
+ {
+ $this->checkRequiredParameters(['transform_id'], $params);
+ $url = "/_transform/{$params['transform_id']}/_start";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Stops one or more transforms.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html
+ *
+ * @param array{
+ * transform_id: string, // (REQUIRED) The id of the transform to stop
+ * force: boolean, // Whether to force stop a failed transform or not. Default to false
+ * wait_for_completion: boolean, // Whether to wait for the transform to fully stop before returning or not. Default to false
+ * timeout: time, // Controls the time to wait until the transform has stopped. Default to 30 seconds
+ * allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
+ * wait_for_checkpoint: boolean, // Whether to wait for the transform to reach a checkpoint before stopping. Default to false
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stopTransform(array $params = [])
+ {
+ $this->checkRequiredParameters(['transform_id'], $params);
+ $url = "/_transform/{$params['transform_id']}/_stop";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates certain properties of a transform.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html
+ *
+ * @param array{
+ * transform_id: string, // (REQUIRED) The id of the transform.
+ * defer_validation: boolean, // If validations should be deferred until transform starts, defaults to false.
+ * timeout: time, // Controls the time to wait for the update
+ * body: array, // (REQUIRED) The update transform definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function updateTransform(array $params = [])
+ {
+ $this->checkRequiredParameters(['transform_id','body'], $params);
+ $url = "/_transform/{$params['transform_id']}/_update";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Upgrades all transforms.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html
+ *
+ * @param array{
+ * dry_run: boolean, // Whether to only check for updates but don't execute
+ * timeout: time, // Controls the time to wait for the upgrade
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function upgradeTransforms(array $params = [])
+ {
+ $url = "/_transform/_upgrade";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Watcher.php b/src/Endpoints/Watcher.php
new file mode 100644
index 000000000..36d0e244e
--- /dev/null
+++ b/src/Endpoints/Watcher.php
@@ -0,0 +1,265 @@
+checkRequiredParameters(['watch_id'], $params);
+ if (isset($params['action_id'])) {
+ $url = "/_watcher/watch/{$params['watch_id']}/_ack/{$params['action_id']}";
+ $method = 'PUT';
+ } else {
+ $url = "/_watcher/watch/{$params['watch_id']}/_ack";
+ $method = 'PUT';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Activates a currently inactive watch.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html
+ *
+ * @param array{
+ * watch_id: string, // (REQUIRED) Watch ID
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function activateWatch(array $params = [])
+ {
+ $this->checkRequiredParameters(['watch_id'], $params);
+ $url = "/_watcher/watch/{$params['watch_id']}/_activate";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deactivates a currently active watch.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html
+ *
+ * @param array{
+ * watch_id: string, // (REQUIRED) Watch ID
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deactivateWatch(array $params = [])
+ {
+ $this->checkRequiredParameters(['watch_id'], $params);
+ $url = "/_watcher/watch/{$params['watch_id']}/_deactivate";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Removes a watch from Watcher.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) Watch ID
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteWatch(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_watcher/watch/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Forces the execution of a stored watch.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html
+ *
+ * @param array{
+ * id: string, // Watch ID
+ * debug: boolean, // indicates whether the watch should execute in debug mode
+ * body: array, // Execution control
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function executeWatch(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_watcher/watch/{$params['id']}/_execute";
+ $method = 'PUT';
+ } else {
+ $url = "/_watcher/watch/_execute";
+ $method = 'PUT';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves a watch by its ID.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) Watch ID
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getWatch(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_watcher/watch/{$params['id']}";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a new watch, or updates an existing one.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) Watch ID
+ * active: boolean, // Specify whether the watch is in/active by default
+ * version: number, // Explicit version number for concurrency control
+ * if_seq_no: number, // only update the watch if the last operation that has changed the watch has the specified sequence number
+ * if_primary_term: number, // only update the watch if the last operation that has changed the watch has the specified primary term
+ * body: array, // The watch
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putWatch(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_watcher/watch/{$params['id']}";
+ $method = 'PUT';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves stored watches.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html
+ *
+ * @param array{
+ * body: array, // From, size, query, sort and search_after
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function queryWatches(array $params = [])
+ {
+ $url = "/_watcher/_query/watches";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Starts Watcher if it is not already running.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html
+ */
+ public function start(array $params = [])
+ {
+ $url = "/_watcher/_start";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves the current Watcher metrics.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html
+ *
+ * @param array{
+ * metric: list, // Controls what additional stat metrics should be include in the response
+ * metric: list, // Controls what additional stat metrics should be include in the response
+ * emit_stacktraces: boolean, // Emits stack traces of currently running watches
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function stats(array $params = [])
+ {
+ if (isset($params['metric'])) {
+ $url = "/_watcher/stats/{$params['metric']}";
+ $method = 'GET';
+ } else {
+ $url = "/_watcher/stats";
+ $method = 'GET';
+ }
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Stops Watcher if it is running.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html
+ */
+ public function stop(array $params = [])
+ {
+ $url = "/_watcher/_stop";
+ $method = 'POST';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Endpoints/Xpack.php b/src/Endpoints/Xpack.php
new file mode 100644
index 000000000..16ea098a6
--- /dev/null
+++ b/src/Endpoints/Xpack.php
@@ -0,0 +1,70 @@
+client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Retrieves usage information about the installed X-Pack features.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html
+ *
+ * @param array{
+ * master_timeout: time, // Specify timeout for watch write operation
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function usage(array $params = [])
+ {
+ $url = "/_xpack/usage";
+ $method = 'GET';
+
+ return $this->client->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Exception/ArrayAccessException.php b/src/Exception/ArrayAccessException.php
new file mode 100644
index 000000000..831b9c4ed
--- /dev/null
+++ b/src/Exception/ArrayAccessException.php
@@ -0,0 +1,22 @@
+productCheck($response);
+ $this->response = $response;
+ $status = $response->getStatusCode();
+ if ($throwException && $status > 399 && $status < 500) {
+ $error = new ClientResponseException(
+ sprintf("%s %s", $status, $response->getReasonPhrase()),
+ $status
+ );
+ throw $error->setResponse($response);
+ } elseif ($throwException && $status > 499 && $status < 600) {
+ $error = new ServerResponseException(
+ sprintf("%s %s", $status, $response->getReasonPhrase()),
+ $status
+ );
+ throw $error->setResponse($response);
+ }
+ }
+
+ /**
+ * Return true if status code is 2xx
+ */
+ public function asBool(): bool
+ {
+ return $this->response->getStatusCode() >=200 && $this->response->getStatusCode() < 300;
+ }
+
+ /**
+ * Converts the body content to array, if possible.
+ * Otherwise, it throws an UnknownContentTypeException
+ * if Content-Type is not specified or unknown.
+ *
+ * @throws UnknownContentTypeException
+ */
+ public function asArray(): array
+ {
+ if (isset($this->asArray)) {
+ return $this->asArray;
+ }
+ if (!$this->response->hasHeader('Content-Type')) {
+ throw new UnknownContentTypeException('No Content-Type specified in the response');
+ }
+ $contentType = $this->response->getHeaderLine('Content-Type');
+ if (strpos($contentType, 'application/json') !== false ||
+ strpos($contentType, 'application/vnd.elasticsearch+json') !== false) {
+ $this->asArray = JsonSerializer::unserialize($this->asString());
+ return $this->asArray;
+ }
+ if (strpos($contentType, 'application/x-ndjson') !== false) {
+ $this->asArray = NDJsonSerializer::unserialize($this->asString());
+ return $this->asArray;
+ }
+ if (strpos($contentType, 'text/csv') !== false) {
+ $this->asArray = CsvSerializer::unserialize($this->asString());
+ return $this->asArray;
+ }
+ throw new UnknownContentTypeException(sprintf(
+ "Cannot deserialize the reponse as array with Content-Type: %s",
+ $contentType
+ ));
+ }
+
+ /**
+ * Converts the body content to object, if possible.
+ * Otherwise, it throws an UnknownContentTypeException
+ * if Content-Type is not specified or unknown.
+ *
+ * @throws UnknownContentTypeException
+ */
+ public function asObject(): object
+ {
+ if (isset($this->asObject)) {
+ return $this->asObject;
+ }
+ $contentType = $this->response->getHeaderLine('Content-Type');
+ if (strpos($contentType, 'application/json') !== false||
+ strpos($contentType, 'application/vnd.elasticsearch+json') !== false) {
+ $this->asObject = JsonSerializer::unserialize($this->asString(), ['type' => 'object']);
+ return $this->asObject;
+ }
+ if (strpos($contentType, 'application/x-ndjson') !== false) {
+ $this->asObject = NDJsonSerializer::unserialize($this->asString(), ['type' => 'object']);
+ return $this->asObject;
+ }
+ if (strpos($contentType, 'text/xml') !== false || strpos($contentType, 'application/xml') !== false) {
+ $this->asObject = XmlSerializer::unserialize($this->asString());
+ return $this->asObject;
+ }
+ throw new UnknownContentTypeException(sprintf(
+ "Cannot deserialize the reponse as object with Content-Type: %s",
+ $contentType
+ ));
+ }
+
+ /**
+ * Converts the body content to string
+ */
+ public function asString(): string
+ {
+ if (empty($this->asString)) {
+ $this->asString = (string) $this->response->getBody();
+ }
+ return $this->asString;
+ }
+
+ /**
+ * Converts the body content to string
+ */
+ public function __toString(): string
+ {
+ return $this->asString();
+ }
+
+ /**
+ * Access the body content as object properties
+ *
+ * @see https://www.php.net/manual/en/language.oop5.overloading.php#object.get
+ */
+ public function __get($name)
+ {
+ return $this->asObject()->$name ?? null;
+ }
+
+ /**
+ * ArrayAccess interface
+ *
+ * @see https://www.php.net/manual/en/class.arrayaccess.php
+ */
+ public function offsetExists($offset): bool
+ {
+ return isset($this->asArray()[$offset]);
+ }
+
+ /**
+ * ArrayAccess interface
+ *
+ * @see https://www.php.net/manual/en/class.arrayaccess.php
+ */
+ public function offsetGet($offset)
+ {
+ return $this->asArray()[$offset];
+ }
+
+ /**
+ * ArrayAccess interface
+ *
+ * @see https://www.php.net/manual/en/class.arrayaccess.php
+ */
+ public function offsetSet($offset, $value): void
+ {
+ throw new ArrayAccessException('The array is reading only');
+ }
+
+ /**
+ * ArrayAccess interface
+ *
+ * @see https://www.php.net/manual/en/class.arrayaccess.php
+ */
+ public function offsetUnset($offset): void
+ {
+ throw new ArrayAccessException('The array is reading only');
+ }
+}
\ No newline at end of file
diff --git a/src/Response/ElasticsearchInterface.php b/src/Response/ElasticsearchInterface.php
new file mode 100644
index 000000000..c2f375583
--- /dev/null
+++ b/src/Response/ElasticsearchInterface.php
@@ -0,0 +1,25 @@
+checkRequiredParameters(['body'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_bulk";
+ $method = 'POST';
+ } else {
+ $url = "/_bulk";
+ $method = 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Explicitly clears the search context for a scroll.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html
+ *
+ * @param array{
+ * scroll_id: list, // A comma-separated list of scroll IDs to clear
+ * body: array, // A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function clearScroll(array $params = [])
+ {
+ if (isset($params['scroll_id'])) {
+ $url = "/_search/scroll/{$params['scroll_id']}";
+ $method = 'DELETE';
+ } else {
+ $url = "/_search/scroll";
+ $method = 'DELETE';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Close a point in time
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html
+ *
+ * @param array{
+ * body: array, // a point-in-time id to close
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function closePointInTime(array $params = [])
+ {
+ $url = "/_pit";
+ $method = 'DELETE';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns number of documents matching a query.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of indices to restrict the results
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * min_score: number, // Include only documents with a specific `_score` value in the result
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * routing: list, // A comma-separated list of specific routing values
+ * q: string, // Query in the Lucene query string syntax
+ * analyzer: string, // The analyzer to use for the query string
+ * analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
+ * default_operator: enum, // The default operator for query string query (AND or OR)
+ * df: string, // The field to use as default where no field prefix is given in the query string
+ * lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+ * terminate_after: number, // The maximum count for each shard, upon reaching which the query execution will terminate early
+ * body: array, // A query to restrict the results specified with the Query DSL (optional)
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function count(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_count";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_count";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates a new document in the index.
+ *
+ * Returns a 409 response when a document with a same ID already exists in the index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) Document ID
+ * index: string, // (REQUIRED) The name of the index
+ * wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
+ * refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
+ * routing: string, // Specific routing value
+ * timeout: time, // Explicit operation timeout
+ * version: number, // Explicit version number for concurrency control
+ * version_type: enum, // Specific version type
+ * pipeline: string, // The pipeline id to preprocess incoming documents with
+ * body: array, // (REQUIRED) The document
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function create(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','index','body'], $params);
+ $url = "/{$params['index']}/_create/{$params['id']}";
+ $method = 'PUT';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Removes a document from the index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The document ID
+ * index: string, // (REQUIRED) The name of the index
+ * wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
+ * refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
+ * routing: string, // Specific routing value
+ * timeout: time, // Explicit operation timeout
+ * if_seq_no: number, // only perform the delete operation if the last operation that has changed the document has the specified sequence number
+ * if_primary_term: number, // only perform the delete operation if the last operation that has changed the document has the specified primary term
+ * version: number, // Explicit version number for concurrency control
+ * version_type: enum, // Specific version type
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function delete(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','index'], $params);
+ $url = "/{$params['index']}/_doc/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes documents matching the provided query.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
+ * analyzer: string, // The analyzer to use for the query string
+ * analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
+ * default_operator: enum, // The default operator for query string query (AND or OR)
+ * df: string, // The field to use as default where no field prefix is given in the query string
+ * from: number, // Starting offset (default: 0)
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * conflicts: enum, // What to do when the delete by query hits version conflicts?
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * q: string, // Query in the Lucene query string syntax
+ * routing: list, // A comma-separated list of specific routing values
+ * scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
+ * search_type: enum, // Search operation type
+ * search_timeout: time, // Explicit timeout for each search request. Defaults to no timeout.
+ * max_docs: number, // Maximum number of documents to process (default: all documents)
+ * sort: list, // A comma-separated list of : pairs
+ * terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
+ * stats: list, // Specific 'tag' of the request for logging and statistical purposes
+ * version: boolean, // Specify whether to return document version as part of a hit
+ * request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to index level setting
+ * refresh: boolean, // Should the affected indexes be refreshed?
+ * timeout: time, // Time each individual bulk request should wait for shards that are unavailable.
+ * wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
+ * scroll_size: number, // Size on the scroll request powering the delete by query
+ * wait_for_completion: boolean, // Should the request should block until the delete by query is complete.
+ * requests_per_second: number, // The throttle for this request in sub-requests per second. -1 means no throttle.
+ * slices: number|string, // The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
+ * body: array, // (REQUIRED) The search definition using the Query DSL
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteByQuery(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','body'], $params);
+ $url = "/{$params['index']}/_delete_by_query";
+ $method = 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Changes the number of requests per second for a particular Delete By Query operation.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
+ *
+ * @param array{
+ * task_id: string, // (REQUIRED) The task id to rethrottle
+ * requests_per_second: number, // The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteByQueryRethrottle(array $params = [])
+ {
+ $this->checkRequiredParameters(['task_id','requests_per_second'], $params);
+ $url = "/_delete_by_query/{$params['task_id']}/_rethrottle";
+ $method = 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Deletes a script.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) Script ID
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function deleteScript(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_scripts/{$params['id']}";
+ $method = 'DELETE';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about whether a document exists in an index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The document ID
+ * index: string, // (REQUIRED) The name of the index
+ * stored_fields: list, // A comma-separated list of stored fields to return in the response
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * realtime: boolean, // Specify whether to perform the operation in realtime or search mode
+ * refresh: boolean, // Refresh the shard containing the document before performing the operation
+ * routing: string, // Specific routing value
+ * _source: list, // True or false to return the _source field or not, or a list of fields to return
+ * _source_excludes: list, // A list of fields to exclude from the returned _source field
+ * _source_includes: list, // A list of fields to extract and return from the _source field
+ * version: number, // Explicit version number for concurrency control
+ * version_type: enum, // Specific version type
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function exists(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','index'], $params);
+ $url = "/{$params['index']}/_doc/{$params['id']}";
+ $method = 'HEAD';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about whether a document source exists in an index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The document ID
+ * index: string, // (REQUIRED) The name of the index
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * realtime: boolean, // Specify whether to perform the operation in realtime or search mode
+ * refresh: boolean, // Refresh the shard containing the document before performing the operation
+ * routing: string, // Specific routing value
+ * _source: list, // True or false to return the _source field or not, or a list of fields to return
+ * _source_excludes: list, // A list of fields to exclude from the returned _source field
+ * _source_includes: list, // A list of fields to extract and return from the _source field
+ * version: number, // Explicit version number for concurrency control
+ * version_type: enum, // Specific version type
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function existsSource(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','index'], $params);
+ $url = "/{$params['index']}/_source/{$params['id']}";
+ $method = 'HEAD';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about why a specific matches (or doesn't match) a query.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The document ID
+ * index: string, // (REQUIRED) The name of the index
+ * analyze_wildcard: boolean, // Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
+ * analyzer: string, // The analyzer for the query string query
+ * default_operator: enum, // The default operator for query string query (AND or OR)
+ * df: string, // The default field for query string query (default: _all)
+ * stored_fields: list, // A comma-separated list of stored fields to return in the response
+ * lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * q: string, // Query in the Lucene query string syntax
+ * routing: string, // Specific routing value
+ * _source: list, // True or false to return the _source field or not, or a list of fields to return
+ * _source_excludes: list, // A list of fields to exclude from the returned _source field
+ * _source_includes: list, // A list of fields to extract and return from the _source field
+ * body: array, // The query definition using the Query DSL
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function explain(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','index'], $params);
+ $url = "/{$params['index']}/_explain/{$params['id']}";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the information about the capabilities of fields among multiple indices.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
+ * fields: list, // A comma-separated list of field names
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * include_unmapped: boolean, // Indicates whether unmapped fields should be included in the response.
+ * body: array, // An index filter specified with the Query DSL
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function fieldCaps(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_field_caps";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_field_caps";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns a document.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The document ID
+ * index: string, // (REQUIRED) The name of the index
+ * stored_fields: list, // A comma-separated list of stored fields to return in the response
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * realtime: boolean, // Specify whether to perform the operation in realtime or search mode
+ * refresh: boolean, // Refresh the shard containing the document before performing the operation
+ * routing: string, // Specific routing value
+ * _source: list, // True or false to return the _source field or not, or a list of fields to return
+ * _source_excludes: list, // A list of fields to exclude from the returned _source field
+ * _source_includes: list, // A list of fields to extract and return from the _source field
+ * version: number, // Explicit version number for concurrency control
+ * version_type: enum, // Specific version type
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function get(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','index'], $params);
+ $url = "/{$params['index']}/_doc/{$params['id']}";
+ $method = 'GET';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns a script.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) Script ID
+ * master_timeout: time, // Specify timeout for connection to master
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getScript(array $params = [])
+ {
+ $this->checkRequiredParameters(['id'], $params);
+ $url = "/_scripts/{$params['id']}";
+ $method = 'GET';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns all script contexts.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html
+ */
+ public function getScriptContext(array $params = [])
+ {
+ $url = "/_script_context";
+ $method = 'GET';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns available script types, languages and contexts
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
+ */
+ public function getScriptLanguages(array $params = [])
+ {
+ $url = "/_script_language";
+ $method = 'GET';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns the source of a document.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) The document ID
+ * index: string, // (REQUIRED) The name of the index
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * realtime: boolean, // Specify whether to perform the operation in realtime or search mode
+ * refresh: boolean, // Refresh the shard containing the document before performing the operation
+ * routing: string, // Specific routing value
+ * _source: list, // True or false to return the _source field or not, or a list of fields to return
+ * _source_excludes: list, // A list of fields to exclude from the returned _source field
+ * _source_includes: list, // A list of fields to extract and return from the _source field
+ * version: number, // Explicit version number for concurrency control
+ * version_type: enum, // Specific version type
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function getSource(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','index'], $params);
+ $url = "/{$params['index']}/_source/{$params['id']}";
+ $method = 'GET';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates or updates a document in an index.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
+ *
+ * @param array{
+ * id: string, // Document ID
+ * index: string, // (REQUIRED) The name of the index
+ * wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
+ * op_type: enum, // Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID
+ * refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
+ * routing: string, // Specific routing value
+ * timeout: time, // Explicit operation timeout
+ * version: number, // Explicit version number for concurrency control
+ * version_type: enum, // Specific version type
+ * if_seq_no: number, // only perform the index operation if the last operation that has changed the document has the specified sequence number
+ * if_primary_term: number, // only perform the index operation if the last operation that has changed the document has the specified primary term
+ * pipeline: string, // The pipeline id to preprocess incoming documents with
+ * require_alias: boolean, // When true, requires destination to be an alias. Default is false
+ * body: array, // (REQUIRED) The document
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function index(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','body'], $params);
+ if (isset($params['id'])) {
+ $url = "/{$params['index']}/_doc/{$params['id']}";
+ $method = 'PUT';
+ } else {
+ $url = "/{$params['index']}/_doc";
+ $method = 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns basic information about the cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
+ */
+ public function info(array $params = [])
+ {
+ $url = "/";
+ $method = 'GET';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Performs a kNN search.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` to perform the operation on all indices
+ * routing: list, // A comma-separated list of specific routing values
+ * body: array, // The search definition
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function knnSearch(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_knn_search";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to get multiple documents in one request.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html
+ *
+ * @param array{
+ * index: string, // The name of the index
+ * stored_fields: list, // A comma-separated list of stored fields to return in the response
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * realtime: boolean, // Specify whether to perform the operation in realtime or search mode
+ * refresh: boolean, // Refresh the shard containing the document before performing the operation
+ * routing: string, // Specific routing value
+ * _source: list, // True or false to return the _source field or not, or a list of fields to return
+ * _source_excludes: list, // A list of fields to exclude from the returned _source field
+ * _source_includes: list, // A list of fields to extract and return from the _source field
+ * body: array, // (REQUIRED) Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function mget(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_mget";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_mget";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to execute several search operations in one request.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to use as default
+ * search_type: enum, // Search operation type
+ * max_concurrent_searches: number, // Controls the maximum number of concurrent searches the multi search api will execute
+ * typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+ * pre_filter_shard_size: number, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
+ * max_concurrent_shard_requests: number, // The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
+ * rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+ * ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
+ * body: array, // (REQUIRED) The request definitions (metadata-search request definition pairs), separated by newlines
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function msearch(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_msearch";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_msearch";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to execute several search template operations in one request.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to use as default
+ * search_type: enum, // Search operation type
+ * typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+ * max_concurrent_searches: number, // Controls the maximum number of concurrent searches the multi search api will execute
+ * rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+ * ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
+ * body: array, // (REQUIRED) The request definitions (metadata-search request definition pairs), separated by newlines
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function msearchTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_msearch/template";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_msearch/template";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns multiple termvectors in one request.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html
+ *
+ * @param array{
+ * index: string, // The index in which the document resides.
+ * ids: list, // A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
+ * term_statistics: boolean, // Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+ * field_statistics: boolean, // Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+ * fields: list, // A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+ * offsets: boolean, // Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+ * positions: boolean, // Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+ * payloads: boolean, // Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
+ * routing: string, // Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+ * realtime: boolean, // Specifies if requests are real-time as opposed to near-real-time (default: true).
+ * version: number, // Explicit version number for concurrency control
+ * version_type: enum, // Specific version type
+ * body: array, // Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function mtermvectors(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_mtermvectors";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_mtermvectors";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Open a point in time that can be used in subsequent searches
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * routing: string, // Specific routing value
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * keep_alive: string, // Specific the time to live for the point in time
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function openPointInTime(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','keep_alive'], $params);
+ $url = "/{$params['index']}/_pit";
+ $method = 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns whether the cluster is running.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
+ */
+ public function ping(array $params = [])
+ {
+ $url = "/";
+ $method = 'HEAD';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Creates or updates a script.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) Script ID
+ * context: string, // Script context
+ * timeout: time, // Explicit operation timeout
+ * master_timeout: time, // Specify timeout for connection to master
+ * context: string, // Context name to compile script against
+ * body: array, // (REQUIRED) The document
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function putScript(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','body'], $params);
+ if (isset($params['context'])) {
+ $url = "/_scripts/{$params['id']}/{$params['context']}";
+ $method = 'PUT';
+ } else {
+ $url = "/_scripts/{$params['id']}";
+ $method = 'PUT';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to evaluate the quality of ranked search results over a set of typical search queries
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * search_type: enum, // Search operation type
+ * body: array, // (REQUIRED) The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function rankEval(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_rank_eval";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_rank_eval";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to copy documents from one index to another, optionally filtering the source
+ * documents by a query, changing the destination index settings, or fetching the
+ * documents from a remote cluster.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
+ *
+ * @param array{
+ * refresh: boolean, // Should the affected indexes be refreshed?
+ * timeout: time, // Time each individual bulk request should wait for shards that are unavailable.
+ * wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
+ * wait_for_completion: boolean, // Should the request should block until the reindex is complete.
+ * requests_per_second: number, // The throttle to set on this request in sub-requests per second. -1 means no throttle.
+ * scroll: time, // Control how long to keep the search context alive
+ * slices: number|string, // The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
+ * max_docs: number, // Maximum number of documents to process (default: all documents)
+ * body: array, // (REQUIRED) The search definition using the Query DSL and the prototype for the index request.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function reindex(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ $url = "/_reindex";
+ $method = 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Changes the number of requests per second for a particular Reindex operation.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
+ *
+ * @param array{
+ * task_id: string, // (REQUIRED) The task id to rethrottle
+ * requests_per_second: number, // The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function reindexRethrottle(array $params = [])
+ {
+ $this->checkRequiredParameters(['task_id','requests_per_second'], $params);
+ $url = "/_reindex/{$params['task_id']}/_rethrottle";
+ $method = 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to use the Mustache language to pre-render a search definition.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html
+ *
+ * @param array{
+ * id: string, // The id of the stored search template
+ * body: array, // The search definition template and its params
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function renderSearchTemplate(array $params = [])
+ {
+ if (isset($params['id'])) {
+ $url = "/_render/template/{$params['id']}";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_render/template";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows an arbitrary script to be executed and a result to be returned
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * body: array, // The script to execute
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function scriptsPainlessExecute(array $params = [])
+ {
+ $url = "/_scripts/painless/_execute";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to retrieve a large numbers of results from a single search request.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll
+ *
+ * @param array{
+ * scroll_id: string, // The scroll ID
+ * scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
+ * scroll_id: string, // The scroll ID for scrolled search
+ * rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+ * body: array, // The scroll ID if not passed by URL or query parameter.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function scroll(array $params = [])
+ {
+ if (isset($params['scroll_id'])) {
+ $url = "/_search/scroll/{$params['scroll_id']}";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_search/scroll";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns results matching a query.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
+ * analyzer: string, // The analyzer to use for the query string
+ * analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
+ * ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
+ * default_operator: enum, // The default operator for query string query (AND or OR)
+ * df: string, // The field to use as default where no field prefix is given in the query string
+ * explain: boolean, // Specify whether to return detailed information about score computation as part of a hit
+ * stored_fields: list, // A comma-separated list of stored fields to return as part of a hit
+ * docvalue_fields: list, // A comma-separated list of fields to return as the docvalue representation of a field for each hit
+ * from: number, // Starting offset (default: 0)
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * q: string, // Query in the Lucene query string syntax
+ * routing: list, // A comma-separated list of specific routing values
+ * scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
+ * search_type: enum, // Search operation type
+ * size: number, // Number of hits to return (default: 10)
+ * sort: list, // A comma-separated list of : pairs
+ * _source: list, // True or false to return the _source field or not, or a list of fields to return
+ * _source_excludes: list, // A list of fields to exclude from the returned _source field
+ * _source_includes: list, // A list of fields to extract and return from the _source field
+ * terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
+ * stats: list, // Specific 'tag' of the request for logging and statistical purposes
+ * suggest_field: string, // Specify which field to use for suggestions
+ * suggest_mode: enum, // Specify suggest mode
+ * suggest_size: number, // How many suggestions to return in response
+ * suggest_text: string, // The source text for which the suggestions should be returned
+ * timeout: time, // Explicit operation timeout
+ * track_scores: boolean, // Whether to calculate and return scores even if they are not used for sorting
+ * track_total_hits: boolean|long, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
+ * allow_partial_search_results: boolean, // Indicate if an error should be returned if there is a partial search failure or timeout
+ * typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+ * version: boolean, // Specify whether to return document version as part of a hit
+ * seq_no_primary_term: boolean, // Specify whether to return sequence number and primary term of the last modification of each hit
+ * request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to index level setting
+ * batched_reduce_size: number, // The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
+ * max_concurrent_shard_requests: number, // The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
+ * pre_filter_shard_size: number, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
+ * rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+ * min_compatible_shard_node: string, // The minimum compatible version that all shards involved in search should have for this request to be successful
+ * body: array, // The search definition using the Query DSL
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function search(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_search";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_search";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
+ *
+ * @param array{
+ * index: list, // (REQUIRED) Comma-separated list of data streams, indices, or aliases to search
+ * field: string, // (REQUIRED) Field containing geospatial data to return
+ * zoom: int, // (REQUIRED) Zoom level for the vector tile to search
+ * x: int, // (REQUIRED) X coordinate for the vector tile to search
+ * y: int, // (REQUIRED) Y coordinate for the vector tile to search
+ * exact_bounds: boolean, // If false, the meta layer's feature is the bounding box of the tile. If true, the meta layer's feature is a bounding box resulting from a `geo_bounds` aggregation.
+ * extent: int, // Size, in pixels, of a side of the vector tile.
+ * grid_precision: int, // Additional zoom levels available through the aggs layer. Accepts 0-8.
+ * grid_type: enum, // Determines the geometry type for features in the aggs layer.
+ * size: int, // Maximum number of features to return in the hits layer. Accepts 0-10000.
+ * track_total_hits: boolean|long, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
+ * body: array, // Search request body.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function searchMvt(array $params = [])
+ {
+ $this->checkRequiredParameters(['index','field','zoom','x','y'], $params);
+ $url = "/{$params['index']}/_mvt/{$params['field']}/{$params['zoom']}/{$params['x']}/{$params['y']}";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information about the indices and shards that a search request would be executed against.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * routing: string, // Specific routing value
+ * local: boolean, // Return local information, do not retrieve the state from master node (default: false)
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function searchShards(array $params = [])
+ {
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_search_shards";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_search_shards";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Allows to use the Mustache language to pre-render a search definition.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
+ *
+ * @param array{
+ * index: list, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * routing: list, // A comma-separated list of specific routing values
+ * scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
+ * search_type: enum, // Search operation type
+ * explain: boolean, // Specify whether to return detailed information about score computation as part of a hit
+ * profile: boolean, // Specify whether to profile the query execution
+ * typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+ * rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+ * ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
+ * body: array, // (REQUIRED) The search definition template and its params
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function searchTemplate(array $params = [])
+ {
+ $this->checkRequiredParameters(['body'], $params);
+ if (isset($params['index'])) {
+ $url = "/{$params['index']}/_search/template";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/_search/template";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
+ * body: array, // field name, string which is the prefix expected in matching terms, timeout and size for max number of results
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function termsEnum(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_terms_enum";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Returns information and statistics about terms in the fields of a particular document.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html
+ *
+ * @param array{
+ * index: string, // (REQUIRED) The index in which the document resides.
+ * id: string, // The id of the document, when not specified a doc param should be supplied.
+ * term_statistics: boolean, // Specifies if total term frequency and document frequency should be returned.
+ * field_statistics: boolean, // Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
+ * fields: list, // A comma-separated list of fields to return.
+ * offsets: boolean, // Specifies if term offsets should be returned.
+ * positions: boolean, // Specifies if term positions should be returned.
+ * payloads: boolean, // Specifies if term payloads should be returned.
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random).
+ * routing: string, // Specific routing value.
+ * realtime: boolean, // Specifies if request is real-time as opposed to near-real-time (default: true).
+ * version: number, // Explicit version number for concurrency control
+ * version_type: enum, // Specific version type
+ * body: array, // Define parameters and or supply a document to get termvectors for. See documentation.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function termvectors(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ if (isset($params['id'])) {
+ $url = "/{$params['index']}/_termvectors/{$params['id']}";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ } else {
+ $url = "/{$params['index']}/_termvectors";
+ $method = empty($params['body']) ? 'GET' : 'POST';
+ }
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Updates a document with a script or partial document.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
+ *
+ * @param array{
+ * id: string, // (REQUIRED) Document ID
+ * index: string, // (REQUIRED) The name of the index
+ * wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
+ * _source: list, // True or false to return the _source field or not, or a list of fields to return
+ * _source_excludes: list, // A list of fields to exclude from the returned _source field
+ * _source_includes: list, // A list of fields to extract and return from the _source field
+ * lang: string, // The script language (default: painless)
+ * refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
+ * retry_on_conflict: number, // Specify how many times should the operation be retried when a conflict occurs (default: 0)
+ * routing: string, // Specific routing value
+ * timeout: time, // Explicit operation timeout
+ * if_seq_no: number, // only perform the update operation if the last operation that has changed the document has the specified sequence number
+ * if_primary_term: number, // only perform the update operation if the last operation that has changed the document has the specified primary term
+ * require_alias: boolean, // When true, requires destination is an alias. Default is false
+ * body: array, // (REQUIRED) The request definition requires either `script` or partial `doc`
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function update(array $params = [])
+ {
+ $this->checkRequiredParameters(['id','index','body'], $params);
+ $url = "/{$params['index']}/_update/{$params['id']}";
+ $method = 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Performs an update on every document in the index without changing the source,
+ * for example to pick up a mapping change.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
+ *
+ * @param array{
+ * index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
+ * analyzer: string, // The analyzer to use for the query string
+ * analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
+ * default_operator: enum, // The default operator for query string query (AND or OR)
+ * df: string, // The field to use as default where no field prefix is given in the query string
+ * from: number, // Starting offset (default: 0)
+ * ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
+ * allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+ * conflicts: enum, // What to do when the update by query hits version conflicts?
+ * expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ * lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+ * pipeline: string, // Ingest pipeline to set on index requests made by this action. (default: none)
+ * preference: string, // Specify the node or shard the operation should be performed on (default: random)
+ * q: string, // Query in the Lucene query string syntax
+ * routing: list, // A comma-separated list of specific routing values
+ * scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
+ * search_type: enum, // Search operation type
+ * search_timeout: time, // Explicit timeout for each search request. Defaults to no timeout.
+ * max_docs: number, // Maximum number of documents to process (default: all documents)
+ * sort: list, // A comma-separated list of : pairs
+ * terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
+ * stats: list, // Specific 'tag' of the request for logging and statistical purposes
+ * version: boolean, // Specify whether to return document version as part of a hit
+ * version_type: boolean, // Should the document increment the version number (internal) on hit or not (reindex)
+ * request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to index level setting
+ * refresh: boolean, // Should the affected indexes be refreshed?
+ * timeout: time, // Time each individual bulk request should wait for shards that are unavailable.
+ * wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
+ * scroll_size: number, // Size on the scroll request powering the update by query
+ * wait_for_completion: boolean, // Should the request should block until the update by query operation is complete.
+ * requests_per_second: number, // The throttle to set on this request in sub-requests per second. -1 means no throttle.
+ * slices: number|string, // The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
+ * body: array, // The search definition using the Query DSL
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function updateByQuery(array $params = [])
+ {
+ $this->checkRequiredParameters(['index'], $params);
+ $url = "/{$params['index']}/_update_by_query";
+ $method = 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+
+
+ /**
+ * Changes the number of requests per second for a particular Update By Query operation.
+ *
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
+ *
+ * @param array{
+ * task_id: string, // (REQUIRED) The task id to rethrottle
+ * requests_per_second: number, // The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
+ * } $params
+ * @throws MissingParameterException if a required parameter is missing
+ * @return Elasticsearch|Promise
+ */
+ public function updateByQueryRethrottle(array $params = [])
+ {
+ $this->checkRequiredParameters(['task_id','requests_per_second'], $params);
+ $url = "/_update_by_query/{$params['task_id']}/_rethrottle";
+ $method = 'POST';
+
+ return $this->sendRequest($this->createRequest($method, $url, $params['body'] ?? []));
+ }
+}
diff --git a/src/Traits/EndpointTrait.php b/src/Traits/EndpointTrait.php
new file mode 100644
index 000000000..6c9b26df5
--- /dev/null
+++ b/src/Traits/EndpointTrait.php
@@ -0,0 +1,54 @@
+createRequest($method, $url);
+ }
+ $content = JsonSerializer::serialize($body);
+ return $request->createRequest($method, $url)->withBody($stream->createStream($content));
+ }
+
+ /**
+ * Check if the $required parameters are present in $params
+ * @throws MissingParameterException
+ */
+ protected function checkRequiredParameters(array $required, array $params): void
+ {
+ foreach ($required as $req) {
+ if (!isset($params[$req])) {
+ throw new MissingParameterException(sprintf(
+ 'The parameter %s is required',
+ $req
+ ));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Traits/MessageResponseTrait.php b/src/Traits/MessageResponseTrait.php
new file mode 100644
index 000000000..b4d5887fa
--- /dev/null
+++ b/src/Traits/MessageResponseTrait.php
@@ -0,0 +1,94 @@
+response as source object
+ */
+trait MessageResponseTrait
+{
+ public function getProtocolVersion()
+ {
+ return $this->response->getProtocolVersion();
+ }
+
+ public function withProtocolVersion($version)
+ {
+ return $this->response->withProtocolVersion($version);
+ }
+
+ public function getHeaders()
+ {
+ return $this->response->getHeaders();
+ }
+
+ public function hasHeader($name)
+ {
+ return $this->response->hasHeader($name);
+ }
+
+ public function getHeader($name)
+ {
+ return $this->response->getHeader($name);
+ }
+
+ public function getHeaderLine($name)
+ {
+ return $this->response->getHeaderLine($name);
+ }
+
+ public function withHeader($name, $value)
+ {
+ return $this->response->withHeader($name, $value);
+ }
+
+ public function withAddedHeader($name, $value)
+ {
+ return $this->response->withAddedHeader($name, $value);
+ }
+
+ public function withoutHeader($name)
+ {
+ return $this->response->withoutHeader($name);
+ }
+
+ public function getBody()
+ {
+ return $this->response->getBody();
+ }
+
+ public function withBody(StreamInterface $body)
+ {
+ return $this->response->withBody($body);
+ }
+
+ public function getStatusCode()
+ {
+ return $this->response->getStatusCode();
+ }
+
+ public function withStatus($code, $reasonPhrase = '')
+ {
+ return $this->response->withStatus($code, $reasonPhrase);
+ }
+
+ public function getReasonPhrase()
+ {
+ return $this->response->getReasonPhrase();
+ }
+}
\ No newline at end of file
diff --git a/src/Traits/NamespaceTrait.php b/src/Traits/NamespaceTrait.php
new file mode 100644
index 000000000..f26043872
--- /dev/null
+++ b/src/Traits/NamespaceTrait.php
@@ -0,0 +1,357 @@
+namespace['AsyncSearch'])) {
+ $this->namespace['AsyncSearch'] = new AsyncSearch($this);
+ }
+ return $this->namespace['AsyncSearch'];
+ }
+
+
+ public function autoscaling(): Autoscaling
+ {
+ if (!isset($this->namespace['Autoscaling'])) {
+ $this->namespace['Autoscaling'] = new Autoscaling($this);
+ }
+ return $this->namespace['Autoscaling'];
+ }
+
+
+ public function cat(): Cat
+ {
+ if (!isset($this->namespace['Cat'])) {
+ $this->namespace['Cat'] = new Cat($this);
+ }
+ return $this->namespace['Cat'];
+ }
+
+
+ public function ccr(): Ccr
+ {
+ if (!isset($this->namespace['Ccr'])) {
+ $this->namespace['Ccr'] = new Ccr($this);
+ }
+ return $this->namespace['Ccr'];
+ }
+
+
+ public function cluster(): Cluster
+ {
+ if (!isset($this->namespace['Cluster'])) {
+ $this->namespace['Cluster'] = new Cluster($this);
+ }
+ return $this->namespace['Cluster'];
+ }
+
+
+ public function danglingIndices(): DanglingIndices
+ {
+ if (!isset($this->namespace['DanglingIndices'])) {
+ $this->namespace['DanglingIndices'] = new DanglingIndices($this);
+ }
+ return $this->namespace['DanglingIndices'];
+ }
+
+
+ public function enrich(): Enrich
+ {
+ if (!isset($this->namespace['Enrich'])) {
+ $this->namespace['Enrich'] = new Enrich($this);
+ }
+ return $this->namespace['Enrich'];
+ }
+
+
+ public function eql(): Eql
+ {
+ if (!isset($this->namespace['Eql'])) {
+ $this->namespace['Eql'] = new Eql($this);
+ }
+ return $this->namespace['Eql'];
+ }
+
+
+ public function features(): Features
+ {
+ if (!isset($this->namespace['Features'])) {
+ $this->namespace['Features'] = new Features($this);
+ }
+ return $this->namespace['Features'];
+ }
+
+
+ public function fleet(): Fleet
+ {
+ if (!isset($this->namespace['Fleet'])) {
+ $this->namespace['Fleet'] = new Fleet($this);
+ }
+ return $this->namespace['Fleet'];
+ }
+
+
+ public function graph(): Graph
+ {
+ if (!isset($this->namespace['Graph'])) {
+ $this->namespace['Graph'] = new Graph($this);
+ }
+ return $this->namespace['Graph'];
+ }
+
+
+ public function ilm(): Ilm
+ {
+ if (!isset($this->namespace['Ilm'])) {
+ $this->namespace['Ilm'] = new Ilm($this);
+ }
+ return $this->namespace['Ilm'];
+ }
+
+
+ public function indices(): Indices
+ {
+ if (!isset($this->namespace['Indices'])) {
+ $this->namespace['Indices'] = new Indices($this);
+ }
+ return $this->namespace['Indices'];
+ }
+
+
+ public function ingest(): Ingest
+ {
+ if (!isset($this->namespace['Ingest'])) {
+ $this->namespace['Ingest'] = new Ingest($this);
+ }
+ return $this->namespace['Ingest'];
+ }
+
+
+ public function license(): License
+ {
+ if (!isset($this->namespace['License'])) {
+ $this->namespace['License'] = new License($this);
+ }
+ return $this->namespace['License'];
+ }
+
+
+ public function logstash(): Logstash
+ {
+ if (!isset($this->namespace['Logstash'])) {
+ $this->namespace['Logstash'] = new Logstash($this);
+ }
+ return $this->namespace['Logstash'];
+ }
+
+
+ public function migration(): Migration
+ {
+ if (!isset($this->namespace['Migration'])) {
+ $this->namespace['Migration'] = new Migration($this);
+ }
+ return $this->namespace['Migration'];
+ }
+
+
+ public function ml(): Ml
+ {
+ if (!isset($this->namespace['Ml'])) {
+ $this->namespace['Ml'] = new Ml($this);
+ }
+ return $this->namespace['Ml'];
+ }
+
+
+ public function monitoring(): Monitoring
+ {
+ if (!isset($this->namespace['Monitoring'])) {
+ $this->namespace['Monitoring'] = new Monitoring($this);
+ }
+ return $this->namespace['Monitoring'];
+ }
+
+
+ public function nodes(): Nodes
+ {
+ if (!isset($this->namespace['Nodes'])) {
+ $this->namespace['Nodes'] = new Nodes($this);
+ }
+ return $this->namespace['Nodes'];
+ }
+
+
+ public function rollup(): Rollup
+ {
+ if (!isset($this->namespace['Rollup'])) {
+ $this->namespace['Rollup'] = new Rollup($this);
+ }
+ return $this->namespace['Rollup'];
+ }
+
+
+ public function searchableSnapshots(): SearchableSnapshots
+ {
+ if (!isset($this->namespace['SearchableSnapshots'])) {
+ $this->namespace['SearchableSnapshots'] = new SearchableSnapshots($this);
+ }
+ return $this->namespace['SearchableSnapshots'];
+ }
+
+
+ public function security(): Security
+ {
+ if (!isset($this->namespace['Security'])) {
+ $this->namespace['Security'] = new Security($this);
+ }
+ return $this->namespace['Security'];
+ }
+
+
+ public function shutdown(): Shutdown
+ {
+ if (!isset($this->namespace['Shutdown'])) {
+ $this->namespace['Shutdown'] = new Shutdown($this);
+ }
+ return $this->namespace['Shutdown'];
+ }
+
+
+ public function slm(): Slm
+ {
+ if (!isset($this->namespace['Slm'])) {
+ $this->namespace['Slm'] = new Slm($this);
+ }
+ return $this->namespace['Slm'];
+ }
+
+
+ public function snapshot(): Snapshot
+ {
+ if (!isset($this->namespace['Snapshot'])) {
+ $this->namespace['Snapshot'] = new Snapshot($this);
+ }
+ return $this->namespace['Snapshot'];
+ }
+
+
+ public function sql(): Sql
+ {
+ if (!isset($this->namespace['Sql'])) {
+ $this->namespace['Sql'] = new Sql($this);
+ }
+ return $this->namespace['Sql'];
+ }
+
+
+ public function ssl(): Ssl
+ {
+ if (!isset($this->namespace['Ssl'])) {
+ $this->namespace['Ssl'] = new Ssl($this);
+ }
+ return $this->namespace['Ssl'];
+ }
+
+
+ public function tasks(): Tasks
+ {
+ if (!isset($this->namespace['Tasks'])) {
+ $this->namespace['Tasks'] = new Tasks($this);
+ }
+ return $this->namespace['Tasks'];
+ }
+
+
+ public function textStructure(): TextStructure
+ {
+ if (!isset($this->namespace['TextStructure'])) {
+ $this->namespace['TextStructure'] = new TextStructure($this);
+ }
+ return $this->namespace['TextStructure'];
+ }
+
+
+ public function transform(): Transform
+ {
+ if (!isset($this->namespace['Transform'])) {
+ $this->namespace['Transform'] = new Transform($this);
+ }
+ return $this->namespace['Transform'];
+ }
+
+
+ public function watcher(): Watcher
+ {
+ if (!isset($this->namespace['Watcher'])) {
+ $this->namespace['Watcher'] = new Watcher($this);
+ }
+ return $this->namespace['Watcher'];
+ }
+
+
+ public function xpack(): Xpack
+ {
+ if (!isset($this->namespace['Xpack'])) {
+ $this->namespace['Xpack'] = new Xpack($this);
+ }
+ return $this->namespace['Xpack'];
+ }
+}
diff --git a/src/Traits/ProductCheckTrait.php b/src/Traits/ProductCheckTrait.php
new file mode 100644
index 000000000..82e615e41
--- /dev/null
+++ b/src/Traits/ProductCheckTrait.php
@@ -0,0 +1,38 @@
+getStatusCode();
+ if ($statusCode >= 200 && $statusCode < 300) {
+ $product = $response->getHeaderLine(Elasticsearch::HEADER_CHECK);
+ if (empty($product) || $product !== Elasticsearch::PRODUCT_NAME) {
+ throw new ProductCheckException(
+ 'The client noticed that the server is not Elasticsearch and we do not support this unknown product'
+ );
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Traits/ResponseTrait.php b/src/Traits/ResponseTrait.php
new file mode 100644
index 000000000..7ff7b0a01
--- /dev/null
+++ b/src/Traits/ResponseTrait.php
@@ -0,0 +1,33 @@
+response = $response;
+ return $this;
+ }
+
+ public function getResponse(): ResponseInterface
+ {
+ return $this->response;
+ }
+}
\ No newline at end of file
diff --git a/src/Transport/Adapter/AdapterInterface.php b/src/Transport/Adapter/AdapterInterface.php
new file mode 100644
index 000000000..b4a6bbd4d
--- /dev/null
+++ b/src/Transport/Adapter/AdapterInterface.php
@@ -0,0 +1,22 @@
+ $value) {
+ switch ($key) {
+ case Options::SSL_CERT:
+ $guzzleConfig[RequestOptions::CERT] = $value;
+ break;
+ case Options::SSL_KEY:
+ $guzzleConfig[RequestOptions::SSL_KEY] = $value;
+ break;
+ case Options::SSL_VERIFY:
+ $guzzleConfig[RequestOptions::VERIFY] = $value;
+ break;
+ }
+ }
+ $class = get_class($client);
+ return new $class($clientOptions + $guzzleConfig);
+ }
+}
\ No newline at end of file
diff --git a/src/Transport/AsyncOnSuccess.php b/src/Transport/AsyncOnSuccess.php
new file mode 100644
index 000000000..906b1efc3
--- /dev/null
+++ b/src/Transport/AsyncOnSuccess.php
@@ -0,0 +1,29 @@
+setResponse($response, true);
+ return $result;
+ }
+}
\ No newline at end of file
diff --git a/src/Transport/AsyncOnSuccessNoException.php b/src/Transport/AsyncOnSuccessNoException.php
new file mode 100644
index 000000000..1b69a58a7
--- /dev/null
+++ b/src/Transport/AsyncOnSuccessNoException.php
@@ -0,0 +1,29 @@
+setResponse($response, false);
+ return $result;
+ }
+}
\ No newline at end of file
diff --git a/src/Transport/RequestOptions.php b/src/Transport/RequestOptions.php
new file mode 100644
index 000000000..51b6bf669
--- /dev/null
+++ b/src/Transport/RequestOptions.php
@@ -0,0 +1,33 @@
+httpClient = $this->createStub(ClientInterface::class);
+ $this->asyncHttpClient = $this->createStub(HttpAsyncClient::class);
+ $this->logger = $this->createStub(LoggerInterface::class);
+ $this->psr17Factory = new Psr17Factory();
+ $this->builder = ClientBuilder::create();
+ }
+
+ public function testCreate()
+ {
+ $this->assertInstanceOf(ClientBuilder::class, $this->builder);
+ }
+
+ public function getConfig()
+ {
+ return [
+ [[
+ 'hosts' => ['localhost:9200']
+ ]],
+ [[
+ 'hosts' => ['cloud:9200'],
+ 'apiKey' => ['id-value', 'apikey-value']
+ ]],
+ [[
+ 'hosts' => ['cloud:9200'],
+ 'basicAuthentication' => ['username-value', 'password-value']
+ ]]
+ ];
+ }
+
+ /**
+ * @dataProvider getConfig
+ * @see https://github.com/elastic/elasticsearch-php/issues/1074
+ */
+ public function testFromConfigWithQuietFalse(array $params)
+ {
+ $client = ClientBuilder::fromConfig($params);
+ $this->assertInstanceOf(Client::class, $client);
+ }
+
+ public function testFromConfigWithInvalidDataQuietFalseThrowsException()
+ {
+ $config = [
+ 'httpClient' => $this->httpClient,
+ 'logger' => $this->logger,
+ 'foo' => 'bar'
+ ];
+ $this->expectException(ConfigException::class);
+ $client = ClientBuilder::fromConfig($config);
+ }
+
+ public function testFromConfigWithInvalidDataQuietTrue()
+ {
+ $config = [
+ 'httpClient' => $this->httpClient,
+ 'logger' => $this->logger,
+ 'foo' => 'bar'
+ ];
+ $client = ClientBuilder::fromConfig($config, true);
+ $this->assertInstanceOf(Client::class, $client);
+ }
+
+ public function testBuild()
+ {
+ $this->assertInstanceOf(Client::class, $this->builder->build());
+ }
+
+ public function testSetHttpClient()
+ {
+ $result = $this->builder->setHttpClient($this->httpClient);
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetAsyncHttpClient()
+ {
+ $result = $this->builder->setAsyncHttpClient($this->asyncHttpClient);
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetLogger()
+ {
+ $result = $this->builder->setLogger($this->logger);
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetHosts()
+ {
+ $result = $this->builder->setHosts(['localhost:9200']);
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetApiKeyWithEmptyId()
+ {
+ $result = $this->builder->setApiKey('xxx');
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetApiKeyWithId()
+ {
+ $result = $this->builder->setApiKey('xxx', 'yyy');
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetApiKeyWithEmptyIdSetAuthorizationHeader()
+ {
+ $this->builder->setApiKey('xxx');
+
+ $response = $this->psr17Factory->createResponse(200);
+ $this->httpClient->method('sendRequest')
+ ->willReturn($response);
+ $this->builder->setHttpClient($this->httpClient);
+
+ $client = $this->builder->build();
+ $this->assertInstanceOf(Client::class, $client);
+
+ $transport = $client->getTransport();
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $transport->sendRequest($request);
+
+ $this->assertContains('ApiKey xxx', $transport->getLastRequest()->getHeader('Authorization'));
+ }
+
+ public function testSetApiKeyWithIdSetAuthorizationHeaderWithBase64()
+ {
+ $this->builder->setApiKey('xxx', 'yyy');
+
+ $response = $this->psr17Factory->createResponse(200);
+ $this->httpClient->method('sendRequest')
+ ->willReturn($response);
+ $this->builder->setHttpClient($this->httpClient);
+
+ $client = $this->builder->build();
+ $this->assertInstanceOf(Client::class, $client);
+
+ $transport = $client->getTransport();
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $transport->sendRequest($request);
+
+ $auth = base64_encode('yyy:xxx');
+ $this->assertContains("ApiKey $auth", $transport->getLastRequest()->getHeader('Authorization'));
+ }
+
+ public function testSetBasicAuthentication()
+ {
+ $result = $this->builder->setBasicAuthentication('user', 'pass');
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetBasicAuthenticationSetAuthorizationHeader()
+ {
+ $this->builder->setBasicAuthentication('user', 'pass');
+
+ $response = $this->psr17Factory->createResponse(200);
+ $this->httpClient->method('sendRequest')
+ ->willReturn($response);
+ $this->builder->setHttpClient($this->httpClient);
+
+ $client = $this->builder->build();
+ $this->assertInstanceOf(Client::class, $client);
+
+ $transport = $client->getTransport();
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $transport->sendRequest($request);
+
+ $this->assertEquals("user:pass", $transport->getLastRequest()->getUri()->getUserInfo());
+ }
+
+ public function testSetBasicAuthenticationAndApiKeyThrowsException()
+ {
+ $this->builder->setBasicAuthentication('user', 'pass');
+ $this->builder->setApiKey('xxx', 'yyy');
+
+ $this->expectException(AuthenticationException::class);
+ $client = $this->builder->build();
+ }
+
+ public function testSetElasticCloudId()
+ {
+ $result = $this->builder->setElasticCloudId('xxx');
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function getCloudIdExamples()
+ {
+ return [
+ ['cluster:d2VzdGV1cm9wZS5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo5MjQzJGM2NjM3ZjMxMmM1MjQzY2RhN2RlZDZlOTllM2QyYzE5JA==', 'c6637f312c5243cda7ded6e99e3d2c19.westeurope.azure.elastic-cloud.com', 9243],
+ ['cluster:d2VzdGV1cm9wZS5henVyZS5lbGFzdGljLWNsb3VkLmNvbSRlN2RlOWYxMzQ1ZTQ0OTAyODNkOTAzYmU1YjZmOTE5ZSQ=', 'e7de9f1345e4490283d903be5b6f919e.westeurope.azure.elastic-cloud.com', null],
+ ['cluster:d2VzdGV1cm9wZS5henVyZS5lbGFzdGljLWNsb3VkLmNvbSQ4YWY3ZWUzNTQyMGY0NThlOTAzMDI2YjQwNjQwODFmMiQyMDA2MTU1NmM1NDA0OTg2YmZmOTU3ZDg0YTZlYjUxZg==', '8af7ee35420f458e903026b4064081f2.westeurope.azure.elastic-cloud.com', null]
+ ];
+ }
+
+ /**
+ * @dataProvider getCloudIdExamples
+ */
+ public function testSetCloudIdWithExamples(string $cloudId, string $url, ?int $port)
+ {
+ $this->builder->setElasticCloudId($cloudId);
+
+ $response = $this->psr17Factory->createResponse(200);
+ $this->httpClient->method('sendRequest')
+ ->willReturn($response);
+ $this->builder->setHttpClient($this->httpClient);
+
+ $client = $this->builder->build();
+ $this->assertInstanceOf(Client::class, $client);
+
+ $transport = $client->getTransport();
+ $request = $this->psr17Factory->createRequest('GET', '');
+ $transport->sendRequest($request);
+
+ $this->assertEquals($url, $transport->getLastRequest()->getUri()->getHost());
+ $this->assertEquals($port, $transport->getLastRequest()->getUri()->getPort());
+ }
+
+ public function testSetRetries()
+ {
+ $result = $this->builder->setRetries(10);
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetRetriesWithNegativeThrowsException()
+ {
+ $this->expectException(InvalidArgumentException::class);
+ $result = $this->builder->setRetries(-10);
+ }
+
+ public function testSetRetriesSetTheTransport()
+ {
+ $result = $this->builder->setRetries(10);
+
+ $client = $this->builder->build();
+ $this->assertInstanceOf(Client::class, $client);
+
+ $this->assertEquals(10, $client->getTransport()->getRetries());
+ }
+
+ public function testSetSSLCert()
+ {
+ $result = $this->builder->setSSLCert('/tmp/cert.pem');
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetSSLCertWithPassword()
+ {
+ $result = $this->builder->setSSLCert('/tmp/cert.pem', 'xxx');
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetSSLKey()
+ {
+ $result = $this->builder->setSSLKey('xxx');
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetSSLKeyWithPassword()
+ {
+ $result = $this->builder->setSSLKey('xxx', 'yyy');
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetSSLVerification()
+ {
+ $result = $this->builder->setSSLVerification(false);
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetElasticMetaHeader()
+ {
+ $result = $this->builder->setElasticMetaHeader(false);
+ $this->assertEquals($this->builder, $result);
+ }
+
+ public function testSetElasticMetaHeaderSetTheClient()
+ {
+ $client = $this->builder
+ ->setElasticMetaHeader(false)
+ ->build();
+
+ $this->assertFalse($client->getElasticMetaHeader());
+ }
+
+ public function testSetHttpClientOptions()
+ {
+ $result = $this->builder->setHttpClientOptions([]);
+ $this->assertEquals($this->builder, $result);
+ }
+}
\ No newline at end of file
diff --git a/tests/ClientTest.php b/tests/ClientTest.php
new file mode 100644
index 000000000..0f1f1d343
--- /dev/null
+++ b/tests/ClientTest.php
@@ -0,0 +1,191 @@
+logger = $this->createStub(LoggerInterface::class);
+ $this->httpClient = new MockClient();
+ //$this->httpAsyncClient = $this->createStub(HttpAsyncClient::class);
+
+ $this->transport = TransportBuilder::create()
+ ->setClient($this->httpClient)
+ ->build();
+ //$this->transport->setAsyncClient($this->httpAsyncClient);
+
+ $this->psr17Factory = new Psr17Factory();
+ $this->client = new Client($this->transport, $this->logger);
+ }
+
+ public function testGetTransport()
+ {
+ $this->assertEquals($this->transport, $this->client->getTransport());
+ }
+
+ public function testGetLogger()
+ {
+ $this->assertEquals($this->logger, $this->client->getLogger());
+ }
+
+ public function testDefaultAsyncIsFalse()
+ {
+ $this->assertFalse($this->client->getAsync());
+ }
+
+ public function testSetAsync()
+ {
+ $async = $this->client->getAsync();
+ $this->client->setAsync(!$async);
+ $this->assertEquals(!$async, $this->client->getAsync());
+ }
+
+ public function testSetElasticMetaHeader()
+ {
+ $this->client->setElasticMetaHeader(false);
+ $this->assertFalse($this->client->getElasticMetaHeader());
+ }
+
+ public function testSetResponseException()
+ {
+ $this->client->setResponseException(false);
+ $this->assertFalse($this->client->getResponseException());
+ }
+
+ public function testSendRequest()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(200)->withHeader('X-Elastic-Product', 'Elasticsearch');
+ $this->httpClient->addResponse($response);
+
+ $result = $this->client->sendRequest($request);
+ $this->assertInstanceOf(Elasticsearch::class, $result);
+ }
+
+ public function testSendRequestToNotElasticsearchThrowsException()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(200);
+ $this->httpClient->addResponse($response);
+
+ $this->expectException(ProductCheckException::class);
+ $result = $this->client->sendRequest($request);
+ }
+
+ public function testSendRequestWith400ResponseThrowsException()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(400);
+ $this->httpClient->addResponse($response);
+
+ $this->expectException(ClientResponseException::class);
+ $result = $this->client->sendRequest($request);
+ }
+
+ public function testSendRequestWith400ThrowsExceptionWithResponse()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(400);
+ $this->httpClient->addResponse($response);
+
+ try {
+ $result = $this->client->sendRequest($request);
+ } catch (ClientResponseException $e) {
+ $this->assertEquals($response, $e->getResponse());
+ }
+ }
+
+ public function testSendRequestWith400DoesNotThrowsExceptionWithSetResponseExceptionToFalse()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(400);
+ $this->httpClient->addResponse($response);
+
+ $this->client->setResponseException(false);
+ $result = $this->client->sendRequest($request);
+ $this->assertEquals(400, $result->getStatusCode());
+ }
+
+ public function testSendRequestWith500ResponseThrowsException()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(500);
+ $this->httpClient->addResponse($response);
+
+ $this->expectException(ServerResponseException::class);
+ $result = $this->client->sendRequest($request);
+ }
+
+ public function testSendRequestWith500ThrowsExceptionWithResponse()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(500);
+ $this->httpClient->addResponse($response);
+
+ try {
+ $result = $this->client->sendRequest($request);
+ } catch (ServerResponseException $e) {
+ $this->assertEquals($response, $e->getResponse());
+ }
+ }
+
+ public function testSendRequestWith500DoesNotThrowsExceptionWithSetResponseExceptionToFalse()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(500);
+ $this->httpClient->addResponse($response);
+
+ $this->client->setResponseException(false);
+ $result = $this->client->sendRequest($request);
+ $this->assertEquals(500, $result->getStatusCode());
+ }
+
+ public function testSendRequestWithAsync()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(200)->withHeader('X-Elastic-Product', 'Elasticsearch');
+ $this->httpClient->addResponse($response);
+
+ $this->client->setAsync(true);
+ $result = $this->client->sendRequest($request);
+ $this->assertInstanceOf(Promise::class, $result);
+ }
+
+ public function testSendRequestWithAsyncWillReturnElasticsearch()
+ {
+ $request = $this->psr17Factory->createRequest('GET', 'localhost:9200');
+ $response = $this->psr17Factory->createResponse(200)->withHeader('X-Elastic-Product', 'Elasticsearch');
+ $this->httpClient->addResponse($response);
+
+ $this->client->setAsync(true);
+ $result = $this->client->sendRequest($request);
+ $this->assertInstanceOf(Promise::class, $result);
+ $this->assertInstanceOf(Elasticsearch::class, $result->wait());
+ }
+}
\ No newline at end of file
diff --git a/tests/Elasticsearch/Tests/ClientBuilder/ArrayLogger.php b/tests/Elasticsearch/Tests/ClientBuilder/ArrayLogger.php
deleted file mode 100644
index bd31a9177..000000000
--- a/tests/Elasticsearch/Tests/ClientBuilder/ArrayLogger.php
+++ /dev/null
@@ -1,74 +0,0 @@
-log(LogLevel::EMERGENCY, $message, $context);
- }
-
- public function alert($message, array $context = array())
- {
- $this->log(LogLevel::ALERT, $message, $context);
- }
-
- public function critical($message, array $context = array())
- {
- $this->log(LogLevel::CRITICAL, $message, $context);
- }
-
- public function error($message, array $context = array())
- {
- $this->log(LogLevel::ERROR, $message, $context);
- }
-
- public function warning($message, array $context = array())
- {
- $this->log(LogLevel::WARNING, $message, $context);
- }
-
- public function notice($message, array $context = array())
- {
- $this->log(LogLevel::NOTICE, $message, $context);
- }
-
- public function info($message, array $context = array())
- {
- $this->log(LogLevel::INFO, $message, $context);
- }
-
- public function debug($message, array $context = array())
- {
- $this->log(LogLevel::DEBUG, $message, $context);
- }
-
- public function log($level, $message, array $context = array())
- {
- $this->output[] = sprintf("%s: %s %s", $level, $message, json_encode($context));
- }
-}
diff --git a/tests/Elasticsearch/Tests/ClientBuilder/DummyLogger.php b/tests/Elasticsearch/Tests/ClientBuilder/DummyLogger.php
deleted file mode 100644
index 0d28ff62d..000000000
--- a/tests/Elasticsearch/Tests/ClientBuilder/DummyLogger.php
+++ /dev/null
@@ -1,23 +0,0 @@
-expectException(\TypeError::class);
- ClientBuilder::create()->setLogger(new DummyLogger);
- }
-
- public function testClientBuilderThrowsExceptionForIncorrectTracerClass()
- {
- $this->expectException(\TypeError::class);
- ClientBuilder::create()->setTracer(new DummyLogger);
- }
-
- public function testGzipEnabledWhenElasticCloudId()
- {
- $client = ClientBuilder::create()
- ->setElasticCloudId('foo:' . base64_encode('localhost:9200$foo'))
- ->build();
-
- $this->assertInstanceOf(Client::class, $client);
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- $this->assertContains('gzip', $request['request']['client']['curl']);
- }
- }
-
- public function testElasticCloudIdNotOverrideCurlEncoding()
- {
- $params = [
- 'client' => [
- 'curl' => [
- CURLOPT_ENCODING => 'deflate'
- ]
- ]
- ];
- $client = ClientBuilder::create()
- ->setConnectionParams($params)
- ->setElasticCloudId('foo:' . base64_encode('localhost:9200$foo'))
- ->build();
-
- $this->assertInstanceOf(Client::class, $client);
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- $this->assertContains('deflate', $request['request']['client']['curl']);
- $this->assertNotContains('gzip', $request['request']['client']['curl']);
- }
- }
-
- /**
- * @see https://github.com/elastic/elasticsearch-php/issues/993
- */
- public function testIncludePortInHostHeader()
- {
- $host = "localhost";
- $url = "$host:1234";
- $params = [
- 'client' => [
- 'verbose' => true
- ]
- ];
- $client = ClientBuilder::create()
- ->setConnectionParams($params)
- ->setHosts([$url])
- ->includePortInHostHeader(true)
- ->build();
-
- $this->assertInstanceOf(Client::class, $client);
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- $this->assertTrue(isset($request['request']['headers']['Host'][0]));
- $this->assertEquals($url, $request['request']['headers']['Host'][0]);
- }
- }
-
- /**
- * @see https://github.com/elastic/elasticsearch-php/issues/993
- */
- public function testNotIncludePortInHostHeaderAsDefault()
- {
- $host = "localhost";
- $url = "$host:1234";
- $params = [
- 'client' => [
- 'verbose' => true
- ]
- ];
- $client = ClientBuilder::create()
- ->setConnectionParams($params)
- ->setHosts([$url])
- ->build();
-
- $this->assertInstanceOf(Client::class, $client);
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- $this->assertTrue(isset($request['request']['headers']['Host'][0]));
- $this->assertEquals($host, $request['request']['headers']['Host'][0]);
- }
- }
-
- /**
- * @see https://github.com/elastic/elasticsearch-php/issues/993
- */
- public function testNotIncludePortInHostHeader()
- {
- $host = "localhost";
- $url = "$host:1234";
- $params = [
- 'client' => [
- 'verbose' => true
- ]
- ];
- $client = ClientBuilder::create()
- ->setConnectionParams($params)
- ->setHosts([$url])
- ->includePortInHostHeader(false)
- ->build();
-
- $this->assertInstanceOf(Client::class, $client);
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- $this->assertTrue(isset($request['request']['headers']['Host'][0]));
- $this->assertEquals($host, $request['request']['headers']['Host'][0]);
- }
- }
-
- public function getCloudIdExamples()
- {
- return [
- ['cluster:d2VzdGV1cm9wZS5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo5MjQzJGM2NjM3ZjMxMmM1MjQzY2RhN2RlZDZlOTllM2QyYzE5JA==', 'c6637f312c5243cda7ded6e99e3d2c19.westeurope.azure.elastic-cloud.com:9243'],
- ['cluster:d2VzdGV1cm9wZS5henVyZS5lbGFzdGljLWNsb3VkLmNvbSRlN2RlOWYxMzQ1ZTQ0OTAyODNkOTAzYmU1YjZmOTE5ZSQ=', 'e7de9f1345e4490283d903be5b6f919e.westeurope.azure.elastic-cloud.com'],
- ['cluster:d2VzdGV1cm9wZS5henVyZS5lbGFzdGljLWNsb3VkLmNvbSQ4YWY3ZWUzNTQyMGY0NThlOTAzMDI2YjQwNjQwODFmMiQyMDA2MTU1NmM1NDA0OTg2YmZmOTU3ZDg0YTZlYjUxZg==', '8af7ee35420f458e903026b4064081f2.westeurope.azure.elastic-cloud.com']
- ];
- }
-
- /**
- * @dataProvider getCloudIdExamples
- */
- public function testSetCloudIdWithExplicitPortOnlyEsUuid(string $cloudId, string $url)
- {
- $client = ClientBuilder::create()
- ->setElasticCloudId($cloudId)
- ->build();
-
- $connection = $client->transport->getConnection();
-
- $this->assertEquals($url, $connection->getHost());
- }
-
- public function getConfig()
- {
- return [
- [[
- 'hosts' => ['localhost:9200']
- ]],
- [[
- 'hosts' => ['cloud:9200'],
- 'apiKey' => ['id-value', 'apikey-value']
- ]],
- [[
- 'hosts' => ['cloud:9200'],
- 'basicAuthentication' => ['username-value', 'password-value']
- ]]
- ];
- }
-
- /**
- * @dataProvider getConfig
- * @see https://github.com/elastic/elasticsearch-php/issues/1074
- */
- public function testFromConfig(array $params)
- {
- $client = ClientBuilder::fromConfig($params);
- $this->assertInstanceOf(Client::class, $client);
- }
-
- public function testFromConfigQuiteTrueWithUnknownKey()
- {
- $client = ClientBuilder::fromConfig(
- [
- 'hosts' => ['localhost:9200'],
- 'foo' => 'bar'
- ],
- true
- );
- }
-
- public function testFromConfigQuiteFalseWithUnknownKey()
- {
- $this->expectException(RuntimeException::class);
- $client = ClientBuilder::fromConfig(
- [
- 'hosts' => ['localhost:9200'],
- 'foo' => 'bar'
- ],
- false
- );
- }
-
- public function testElasticClientMetaHeaderIsSentByDefault()
- {
- $client = ClientBuilder::create()
- ->build();
- $this->assertInstanceOf(Client::class, $client);
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- $this->assertTrue(isset($request['request']['headers']['x-elastic-client-meta']));
- $this->assertEquals(
- 1,
- preg_match(
- '/^[a-z]{1,}=[a-z0-9\.\-]{1,}(?:,[a-z]{1,}=[a-z0-9\.\-]+)*$/',
- $request['request']['headers']['x-elastic-client-meta'][0]
- )
- );
- }
- }
-
- public function testElasticClientMetaHeaderIsSentWhenEnabled()
- {
- $client = ClientBuilder::create()
- ->setElasticMetaHeader(true)
- ->build();
- $this->assertInstanceOf(Client::class, $client);
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- $this->assertTrue(isset($request['request']['headers']['x-elastic-client-meta']));
- $this->assertEquals(
- 1,
- preg_match(
- '/^[a-z]{1,}=[a-z0-9\.\-]{1,}(?:,[a-z]{1,}=[a-z0-9\.\-]+)*$/',
- $request['request']['headers']['x-elastic-client-meta'][0]
- )
- );
- }
- }
-
- public function testElasticClientMetaHeaderIsNotSentWhenDisabled()
- {
- $client = ClientBuilder::create()
- ->setElasticMetaHeader(false)
- ->build();
- $this->assertInstanceOf(Client::class, $client);
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- $this->assertFalse(isset($request['request']['headers']['x-elastic-client-meta']));
- }
- }
-
- public function getCompatibilityHeaders()
- {
- return [
- ['true', true],
- ['1', true],
- ['false', false],
- ['0', false]
- ];
- }
-
- /**
- * @dataProvider getCompatibilityHeaders
- */
- public function testCompatibilityHeader($env, $compatibility)
- {
- putenv("ELASTIC_CLIENT_APIVERSIONING=$env");
-
- $client = ClientBuilder::create()
- ->build();
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- if ($compatibility) {
- $this->assertContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Content-Type']);
- $this->assertContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Accept']);
- } else {
- $this->assertNotContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Content-Type']);
- $this->assertNotContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Accept']);
- }
- }
- }
-
- public function testCompatibilityHeaderDefaultIsOff()
- {
- $client = ClientBuilder::create()
- ->build();
-
- try {
- $result = $client->info();
- } catch (ElasticsearchException $e) {
- $request = $client->transport->getLastConnection()->getLastRequestInfo();
- $this->assertNotContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Content-Type']);
- $this->assertNotContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Accept']);
- }
- }
-}
diff --git a/tests/Elasticsearch/Tests/ClientIntegrationTest.php b/tests/Elasticsearch/Tests/ClientIntegrationTest.php
deleted file mode 100644
index 1b66c3019..000000000
--- a/tests/Elasticsearch/Tests/ClientIntegrationTest.php
+++ /dev/null
@@ -1,165 +0,0 @@
-host = Utility::getHost();
- if (null == $this->host) {
- $this->markTestSkipped('I cannot execute integration test without TEST_SUITE env');
- }
- $this->logger = new ArrayLogger();
- }
-
- private function getClient(): Client
- {
- $client = ClientBuilder::create()
- ->setHosts([$this->host])
- ->setLogger($this->logger);
-
- if (getenv('TEST_SUITE') === 'platinum') {
- $client->setSSLVerification(__DIR__ . '/../../../.ci/certs/ca.crt');
- }
- return $client->build();
- }
-
- public function testLogRequestSuccessHasInfoNotEmpty()
- {
- $client = $this->getClient();
-
- $result = $client->info();
-
- $this->assertNotEmpty($this->getLevelOutput(LogLevel::INFO, $this->logger->output));
- }
-
- public function testLogRequestSuccessHasPortInInfo()
- {
- $client = $this->getClient();
-
- $result = $client->info();
-
- $this->assertStringContainsString('"port"', $this->getLevelOutput(LogLevel::INFO, $this->logger->output));
- }
-
- public function testLogRequestFailHasWarning()
- {
- $client = $this->getClient();
-
- try {
- $result = $client->get([
- 'index' => 'foo',
- 'id' => 'bar'
- ]);
- } catch (Missing404Exception $e) {
- $this->assertNotEmpty($this->getLevelOutput(LogLevel::WARNING, $this->logger->output));
- }
- }
-
- public function testIndexCannotBeEmptyStringForDelete()
- {
- $client = $this->getClient();
-
- $this->expectException(Missing404Exception::class);
-
- $client->delete(
- [
- 'index' => '',
- 'id' => 'test'
- ]
- );
- }
-
- public function testIdCannotBeEmptyStringForDelete()
- {
- $client = $this->getClient();
-
- $this->expectException(BadRequest400Exception::class);
-
- $client->delete(
- [
- 'index' => 'test',
- 'id' => ''
- ]
- );
- }
-
- public function testIndexCannotBeArrayOfEmptyStringsForDelete()
- {
- $client = $this->getClient();
-
- $this->expectException(Missing404Exception::class);
-
- $client->delete(
- [
- 'index' => ['', '', ''],
- 'id' => 'test'
- ]
- );
- }
-
- public function testIndexCannotBeArrayOfNullsForDelete()
- {
- $client = $this->getClient();
-
- $this->expectException(Missing404Exception::class);
-
- $client->delete(
- [
- 'index' => [null, null, null],
- 'id' => 'test'
- ]
- );
- }
-
- private function getLevelOutput(string $level, array $output): string
- {
- foreach ($output as $out) {
- if (false !== strpos($out, $level)) {
- return $out;
- }
- }
- return '';
- }
-}
diff --git a/tests/Elasticsearch/Tests/ClientTest.php b/tests/Elasticsearch/Tests/ClientTest.php
deleted file mode 100644
index 562c51e39..000000000
--- a/tests/Elasticsearch/Tests/ClientTest.php
+++ /dev/null
@@ -1,410 +0,0 @@
-expectException(\Elasticsearch\Common\Exceptions\InvalidArgumentException::class);
- $this->expectExceptionMessage('Could not parse URI');
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(['localhost:abc'])->build();
- }
-
- public function testFromConfig()
- {
- $params = [
- 'hosts' => [
- 'localhost:9200'
- ],
- 'retries' => 2,
- 'handler' => ClientBuilder::multiHandler()
- ];
- $client = ClientBuilder::fromConfig($params);
-
- $this->assertInstanceOf(Client::class, $client);
- }
-
- public function testFromConfigBadParam()
- {
- $params = [
- 'hosts' => [
- 'localhost:9200'
- ],
- 'retries' => 2,
- 'imNotReal' => 5
- ];
-
- $this->expectException(\Elasticsearch\Common\Exceptions\RuntimeException::class);
- $this->expectExceptionMessage('Unknown parameters provided: imNotReal');
-
- $client = ClientBuilder::fromConfig($params);
- }
-
- public function testFromConfigBadParamQuiet()
- {
- $params = [
- 'hosts' => [
- 'localhost:9200'
- ],
- 'retries' => 2,
- 'imNotReal' => 5
- ];
- $client = ClientBuilder::fromConfig($params, true);
-
- $this->assertInstanceOf(Client::class, $client);
- }
-
- public function testIndexCannotBeNullForDelete()
- {
- $client = ClientBuilder::create()->build();
-
- $this->expectException(Elasticsearch\Common\Exceptions\RuntimeException::class);
- $this->expectExceptionMessage('index is required for delete');
-
- $client->delete(
- [
- 'index' => null,
- 'type' => 'test',
- 'id' => 'test'
- ]
- );
- }
-
- public function testIdCannotBeNullForDelete()
- {
- $client = ClientBuilder::create()->build();
-
- $this->expectException(Elasticsearch\Common\Exceptions\RuntimeException::class);
- $this->expectExceptionMessage('id is required for delete');
-
- $client->delete(
- [
- 'index' => 'test',
- 'id' => null
- ]
- );
- }
-
- public function testMaxRetriesException()
- {
- $client = Elasticsearch\ClientBuilder::create()
- ->setHosts(["localhost:1"])
- ->setRetries(0)
- ->build();
-
- $searchParams = [
- 'index' => 'test',
- 'body' => [
- 'query' => [
- 'match_all' => []
- ]
- ]
- ];
-
- $client = Elasticsearch\ClientBuilder::create()
- ->setHosts(["localhost:1"])
- ->setRetries(0)
- ->build();
-
- try {
- $client->search($searchParams);
- $this->fail("Should have thrown CouldNotConnectToHost");
- } catch (Elasticsearch\Common\Exceptions\Curl\CouldNotConnectToHost $e) {
- // All good
- $previous = $e->getPrevious();
- $this->assertInstanceOf(MaxRetriesException::class, $previous);
- } catch (\Exception $e) {
- throw $e;
- }
-
-
- $client = Elasticsearch\ClientBuilder::create()
- ->setHosts(["localhost:1"])
- ->setRetries(0)
- ->build();
-
- try {
- $client->search($searchParams);
- $this->fail("Should have thrown TransportException");
- } catch (Elasticsearch\Common\Exceptions\TransportException $e) {
- // All good
- $previous = $e->getPrevious();
- $this->assertInstanceOf(MaxRetriesException::class, $previous);
- } catch (\Exception $e) {
- throw $e;
- }
- }
-
- public function testInlineHosts()
- {
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- 'localhost:9200'
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("localhost", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("http", $host->getTransportSchema());
-
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- 'http://localhost:9200'
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("localhost", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("http", $host->getTransportSchema());
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- 'http://foo.com:9200'
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("http", $host->getTransportSchema());
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- 'https://foo.com:9200'
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("https", $host->getTransportSchema());
-
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- 'https://user:pass@foo.com:9200'
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("https", $host->getTransportSchema());
- $this->assertSame("user:pass", $host->getUserPass());
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- 'https://user:pass@the_foo.com:9200'
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("the_foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("https", $host->getTransportSchema());
- $this->assertSame("user:pass", $host->getUserPass());
- }
-
- public function testExtendedHosts()
- {
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- [
- 'host' => 'localhost',
- 'port' => 9200,
- 'scheme' => 'http'
- ]
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("localhost", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("http", $host->getTransportSchema());
-
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- [
- 'host' => 'foo.com',
- 'port' => 9200,
- 'scheme' => 'http'
- ]
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("http", $host->getTransportSchema());
-
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- [
- 'host' => 'foo.com',
- 'port' => 9200,
- 'scheme' => 'https'
- ]
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("https", $host->getTransportSchema());
-
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- [
- 'host' => 'foo.com',
- 'scheme' => 'http'
- ]
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("http", $host->getTransportSchema());
-
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- [
- 'host' => 'foo.com'
- ]
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("http", $host->getTransportSchema());
-
-
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- [
- 'host' => 'foo.com',
- 'port' => 9500,
- 'scheme' => 'https'
- ]
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("foo.com", $host->getHost());
- $this->assertSame(9500, $host->getPort());
- $this->assertSame("https", $host->getTransportSchema());
-
-
- try {
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- [
- 'port' => 9200,
- 'scheme' => 'http'
- ]
- ]
- )->build();
- $this->fail("Expected RuntimeException from missing host, none thrown");
- } catch (Elasticsearch\Common\Exceptions\RuntimeException $e) {
- // good
- }
-
- // Underscore host, questionably legal
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- [
- 'host' => 'the_foo.com'
- ]
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("the_foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("http", $host->getTransportSchema());
-
-
- // Special characters in user/pass, would break inline
- $client = Elasticsearch\ClientBuilder::create()->setHosts(
- [
- [
- 'host' => 'foo.com',
- 'user' => 'user',
- 'pass' => 'abc#$@?%!abc'
- ]
- ]
- )->build();
- $host = $client->transport->getConnection();
- $this->assertSame("foo.com", $host->getHost());
- $this->assertSame(9200, $host->getPort());
- $this->assertSame("http", $host->getTransportSchema());
- $this->assertSame("user:abc#$@?%!abc", $host->getUserPass());
- }
-
- public function testClientLazy()
- {
- $handler = new MockHandler([
- 'status' => 200,
- 'transfer_stats' => [
- 'total_time' => 100
- ],
- 'body' => '{test}',
- 'effective_url' => 'localhost'
- ]);
- $builder = ClientBuilder::create();
- $builder->setHosts(['somehost']);
- $builder->setHandler($handler);
- $client = $builder->build();
-
- $params = [
- 'client' => [
- 'future' => 'lazy',
- ]
- ];
- $result = $client->info($params);
- $this->assertInstanceOf(FutureArray::class, $result);
- }
-
- public function testExtractArgumentIterable()
- {
- $client = Elasticsearch\ClientBuilder::create()->build();
- // array iterator can be casted to array back, so make more real with IteratorIterator
- $body = new \IteratorIterator(new \ArrayIterator([1, 2, 3]));
- $params = ['body' => $body];
- $argument = $client->extractArgument($params, 'body');
- $this->assertEquals($body, $argument);
- $this->assertCount(0, $params);
- $this->assertInstanceOf(\IteratorIterator::class, $argument);
- }
-}
diff --git a/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php b/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php
deleted file mode 100644
index e6e58f2ea..000000000
--- a/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php
+++ /dev/null
@@ -1,112 +0,0 @@
-getMockBuilder(ConnectionInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- }
-
- // select ten
- $this->assertSame($mockConnections[0], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[1], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[2], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[3], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[4], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[5], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[6], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[7], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[8], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[9], $roundRobin->select($mockConnections));
-
- // select five - should start from the first one (index: 0)
- $this->assertSame($mockConnections[0], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[1], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[2], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[3], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[4], $roundRobin->select($mockConnections));
- }
-
- /**
- * Add Ten connections, select five, remove three, test another 10 to check
- * that the round-robining works after removing connections
- *
- * @covers \Elasticsearch\ConnectionPool\Selectors\RoundRobinSelector::select
- *
- * @return void
- */
- public function testAddTenConnectionsTestFiveRemoveThreeTestTen()
- {
- $roundRobin = new Elasticsearch\ConnectionPool\Selectors\RoundRobinSelector();
-
- $mockConnections = [];
- foreach (range(0, 9) as $index) {
- $mockConnections[$index] = $this->getMockBuilder(ConnectionInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- }
-
- // select five
- $this->assertSame($mockConnections[0], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[1], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[2], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[3], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[4], $roundRobin->select($mockConnections));
-
- // remove three
- unset($mockConnections[8]);
- unset($mockConnections[9]);
- unset($mockConnections[10]);
-
- // select ten after removal
- $this->assertSame($mockConnections[5], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[6], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[7], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[0], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[1], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[2], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[3], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[4], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[5], $roundRobin->select($mockConnections));
- $this->assertSame($mockConnections[6], $roundRobin->select($mockConnections));
- }
-}
diff --git a/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php b/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php
deleted file mode 100644
index d2c7cc952..000000000
--- a/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php
+++ /dev/null
@@ -1,77 +0,0 @@
-shouldReceive('isAlive')->times(16)->andReturn(true)->getMock();
-
- foreach (range(0, 9) as $index) {
- $mockConnections[] = m::mock(ConnectionInterface::class);
- }
-
- foreach (range(0, 15) as $index) {
- $retConnection = $roundRobin->select($mockConnections);
-
- $this->assertSame($mockConnections[0], $retConnection);
- }
- }
-
- public function testTenConnectionsFirstDies()
- {
- $roundRobin = new Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector();
-
- $mockConnections = [];
- $mockConnections[] = m::mock(ConnectionInterface::class)
- ->shouldReceive('isAlive')->once()->andReturn(false)->getMock();
-
- $mockConnections[] = m::mock(ConnectionInterface::class)
- ->shouldReceive('isAlive')->times(15)->andReturn(true)->getMock();
-
- foreach (range(0, 8) as $index) {
- $mockConnections[] = m::mock(ConnectionInterface::class);
- }
-
- foreach (range(0, 15) as $index) {
- $retConnection = $roundRobin->select($mockConnections);
-
- $this->assertSame($mockConnections[1], $retConnection);
- }
- }
-}
diff --git a/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php b/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php
deleted file mode 100644
index 0d036cf69..000000000
--- a/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php
+++ /dev/null
@@ -1,48 +0,0 @@
-setHosts([Utility::getHost()])
- ->setConnectionPool(SniffingConnectionPool::class, ['sniffingInterval' => -10])
- ->build();
-
- $pinged = $client->ping();
- $this->assertTrue($pinged);
- }
-}
diff --git a/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolTest.php b/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolTest.php
deleted file mode 100644
index 9e07184e5..000000000
--- a/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolTest.php
+++ /dev/null
@@ -1,460 +0,0 @@
-shouldReceive('ping')
- ->andReturn(true)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(true)
- ->getMock();
-
- /**
- * @var \Elasticsearch\Connections\Connection[]&\Mockery\MockInterface[] $connections
-*/
- $connections = [$mockConnection];
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturn($connections[0])
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class);
-
- $connectionPoolParams = ['randomizeHosts' => false];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $retConnection = $connectionPool->nextConnection();
-
- $this->assertSame($mockConnection, $retConnection);
- }
-
- public function testAddOneHostAndTriggerSniff()
- {
- $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"Bl2ihSr7TcuUHxhu1GA_YQ":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}}}', true);
-
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->andReturn(true)->getMock()
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('getTransportSchema')->once()->andReturn('http')->getMock()
- ->shouldReceive('sniff')->once()->andReturn($clusterState)->getMock();
-
- /**
- * @var \Elasticsearch\Connections\Connection[]&\Mockery\MockInterface[] $connections
-*/
- $connections = [$mockConnection];
- $mockNewConnection = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(true)->getMock();
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')->twice()
- ->andReturn($mockNewConnection)
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class)
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($mockNewConnection)->getMock();
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- 'sniffingInterval' => -1
- ];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $retConnection = $connectionPool->nextConnection();
-
- $this->assertSame($mockNewConnection, $retConnection);
- }
-
- public function testAddOneHostAndForceNext()
- {
- $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"Bl2ihSr7TcuUHxhu1GA_YQ":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}}}', true);
-
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->andReturn(true)->getMock()
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('getTransportSchema')->once()->andReturn('http')->getMock()
- ->shouldReceive('sniff')->once()->andReturn($clusterState)->getMock();
-
- /**
- * @var \Elasticsearch\Connections\Connection[]&\Mockery\MockInterface[] $connections
-*/
- $connections = [$mockConnection];
- $mockNewConnection = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(true)->getMock();
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')->once()->andReturn($mockConnection)->getMock()
- ->shouldReceive('select')->once()->andReturn($mockNewConnection)->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class)
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($mockNewConnection)->getMock();
-
- $connectionPoolParams = [
- 'randomizeHosts' => false
- ];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $retConnection = $connectionPool->nextConnection(true);
-
- $this->assertSame($mockNewConnection, $retConnection);
- }
-
- public function testAddTenNodesThenGetConnection()
- {
- $connections = [];
-
- foreach (range(1, 10) as $index) {
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')
- ->andReturn(true)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(true)
- ->getMock();
-
- $connections[] = $mockConnection;
- }
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturn($connections[0])
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class);
-
- $connectionPoolParams = ['randomizeHosts' => false];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $retConnection = $connectionPool->nextConnection();
-
- $this->assertSame($connections[0], $retConnection);
- }
-
- public function testAddTenNodesTimeoutAllButLast()
- {
- $connections = [];
-
- foreach (range(1, 9) as $index) {
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(false)
- ->getMock();
-
- $connections[] = $mockConnection;
- }
-
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')
- ->andReturn(true)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(true)
- ->getMock();
-
- $connections[] = $mockConnection;
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturnValues($connections)
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class);
-
- $connectionPoolParams = ['randomizeHosts' => false];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $retConnection = $connectionPool->nextConnection();
-
- $this->assertSame($connections[9], $retConnection);
- }
-
- public function testAddTenNodesAllTimeout()
- {
- $connections = [];
-
- foreach (range(1, 10) as $index) {
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(false)
- ->getMock();
-
- $connections[] = $mockConnection;
- }
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturnValues($connections)
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class);
-
- $connectionPoolParams = ['randomizeHosts' => false];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $this->expectException(\Elasticsearch\Common\Exceptions\NoNodesAvailableException::class);
- $this->expectExceptionMessage('No alive nodes found in your cluster');
-
- $retConnection = $connectionPool->nextConnection();
- }
-
- public function testAddOneHostSniffTwo()
- {
- $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"node1":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}, "node2":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9301]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9201]"}}}', true);
-
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->andReturn(true)->getMock()
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('getTransportSchema')->twice()->andReturn('http')->getMock()
- ->shouldReceive('sniff')->twice()->andReturn($clusterState)->getMock();
-
- /**
- * @var \Elasticsearch\Connections\Connection[]&\Mockery\MockInterface[] $connections
-*/
- $connections = [$mockConnection];
-
- $newConnections = [];
- $newConnections[] = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(true)->getMock();
-
- $newConnections[] = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(true)->getMock();
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturnValues(
- [ //selects provided node first, then the new cluster list
- $mockConnection,
- $newConnections[0],
- $newConnections[1]
- ]
- )
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class)
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($newConnections[0])->getMock()
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9201])->andReturn($newConnections[1])->getMock();
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- 'sniffingInterval' => -1
- ];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $retConnection = $connectionPool->nextConnection();
- $this->assertSame($newConnections[0], $retConnection);
-
- $retConnection = $connectionPool->nextConnection();
- $this->assertSame($newConnections[1], $retConnection);
- }
-
- public function testAddSeedSniffTwoTimeoutTwo()
- {
- $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"node1":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}, "node2":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9301]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9201]"}}}', true);
-
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->andReturn(true)->getMock()
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('getTransportSchema')->once()->andReturn('http')->getMock()
- ->shouldReceive('sniff')->once()->andReturn($clusterState)->getMock();
-
- /**
- * @var \Elasticsearch\Connections\Connection[]&\Mockery\MockInterface[] $connections
- */
- $connections = [$mockConnection];
-
- $newConnections = [];
- $newConnections[] = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(false)->getMock()
- ->shouldReceive('ping')->andReturn(false)->getMock();
-
- $newConnections[] = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(false)->getMock()
- ->shouldReceive('ping')->andReturn(false)->getMock();
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturnValues(
- [ //selects provided node first, then the new cluster list
- $mockConnection,
- $newConnections[0],
- $newConnections[1]
- ]
- )
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class)
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($newConnections[0])->getMock()
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9201])->andReturn($newConnections[1])->getMock();
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- 'sniffingInterval' => -1
- ];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $this->expectException(\Elasticsearch\Common\Exceptions\NoNodesAvailableException::class);
- $this->expectExceptionMessage('No alive nodes found in your cluster');
-
- $retConnection = $connectionPool->nextConnection();
- }
-
- public function testTenTimeoutNineSniffTenthAddTwoAlive()
- {
- $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"node1":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}, "node2":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9301]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9201]"}}}', true);
-
- $connections = [];
-
- foreach (range(1, 10) as $index) {
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->andReturn(false)->getMock()
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock();
-
- $connections[] = $mockConnection;
- }
-
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->andReturn(true)->getMock()
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('sniff')->andReturn($clusterState)->getMock()
- ->shouldReceive('getTransportSchema')->twice()->andReturn('http')->getMock();
-
- $connections[] = $mockConnection;
-
- $newConnections = $connections;
- $newConnections[] = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('ping')->andReturn(true)->getMock();
-
- $newConnections[] = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('ping')->andReturn(true)->getMock();
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturnValues($newConnections)
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class)
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($newConnections[10])->getMock()
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9201])->andReturn($newConnections[11])->getMock();
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- 'sniffingInterval' => -1
- ];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $retConnection = $connectionPool->nextConnection();
- $this->assertSame($newConnections[11], $retConnection);
-
- $retConnection = $connectionPool->nextConnection();
- $this->assertSame($newConnections[12], $retConnection);
- }
-
- public function testTenTimeoutNineSniffTenthAddTwoDeadTimeoutEveryone()
- {
- $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"node1":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}, "node2":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9301]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9201]"}}}', true);
-
- $connections = [];
-
- foreach (range(1, 10) as $index) {
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->andReturn(false)->getMock()
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock();
-
- $connections[] = $mockConnection;
- }
-
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->andReturn(true)->getMock()
- ->shouldReceive('isAlive')->andReturn(true)->getMock()
- ->shouldReceive('sniff')->andReturn($clusterState)->getMock()
- ->shouldReceive('getTransportSchema')->once()->andReturn('http')->getMock()
- ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock();
-
- $connections[] = $mockConnection;
-
- $newConnections = $connections;
- $newConnections[] = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(false)->getMock()
- ->shouldReceive('ping')->andReturn(false)->getMock()
- ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock();
-
- $newConnections[] = m::mock(Connection::class)
- ->shouldReceive('isAlive')->andReturn(false)->getMock()
- ->shouldReceive('ping')->andReturn(false)->getMock()
- ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock();
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturnValues($newConnections)
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class)
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($newConnections[10])->getMock()
- ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9201])->andReturn($newConnections[11])->getMock();
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- 'sniffingInterval' => -1
- ];
- $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $this->expectException(\Elasticsearch\Common\Exceptions\NoNodesAvailableException::class);
- $this->expectExceptionMessage('No alive nodes found in your cluster');
-
- $retConnection = $connectionPool->nextConnection();
- }
-}
diff --git a/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php b/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php
deleted file mode 100644
index 3a82faaf5..000000000
--- a/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php
+++ /dev/null
@@ -1,67 +0,0 @@
-host = Utility::getHost();
- if (null == $this->host) {
- $this->markTestSkipped(sprintf(
- "I cannot execute %s without TEST_SUITE env",
- __CLASS__
- ));
- }
- }
-
- // Issue #636
- public function test404Liveness()
- {
- $client = \Elasticsearch\ClientBuilder::create()
- ->setHosts([$this->host])
- ->setConnectionPool(\Elasticsearch\ConnectionPool\StaticConnectionPool::class)
- ->build();
-
- $connection = $client->transport->getConnection();
-
- // Ensure connection is dead
- $connection->markDead();
-
- // The index doesn't exist, but the server is up so this will return a 404
- $this->assertFalse($client->indices()->exists(['index' => 'not_existing_index']));
-
- // But the node should be marked as alive since the server responded
- $this->assertTrue($connection->isAlive());
- }
-}
diff --git a/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolTest.php b/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolTest.php
deleted file mode 100644
index 85a93c869..000000000
--- a/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolTest.php
+++ /dev/null
@@ -1,254 +0,0 @@
-shouldReceive('ping')
- ->andReturn(true)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(true)
- ->getMock()
- ->shouldReceive('markDead')->once()->getMock();
-
- /**
- * @var \Elasticsearch\Connections\Connection[]&\Mockery\MockInterface[] $connections
-*/
- $connections = [$mockConnection];
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturn($connections[0])
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class);
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- ];
- $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $retConnection = $connectionPool->nextConnection();
-
- $this->assertSame($mockConnection, $retConnection);
- }
-
- public function testAddMultipleHostsThenGetFirst()
- {
- $connections = [];
-
- foreach (range(1, 10) as $index) {
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')
- ->andReturn(true)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(true)
- ->getMock()
- ->shouldReceive('markDead')->once()->getMock();
-
- $connections[] = $mockConnection;
- }
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturn($connections[0])
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class);
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- ];
- $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $retConnection = $connectionPool->nextConnection();
-
- $this->assertSame($connections[0], $retConnection);
- }
-
- public function testAllHostsFailPing()
- {
- $connections = [];
-
- foreach (range(1, 10) as $index) {
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('markDead')->once()->getMock()
- ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock()
- ->shouldReceive('getLastPing')->andReturn(time())->once()->getMock();
-
- $connections[] = $mockConnection;
- }
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturnValues($connections)
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class);
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- ];
- $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $this->expectException(\Elasticsearch\Common\Exceptions\NoNodesAvailableException::class);
- $this->expectExceptionMessage('No alive nodes found in your cluster');
-
- $connectionPool->nextConnection();
- }
-
- public function testAllExceptLastHostFailPingRevivesInSkip()
- {
- $connections = [];
-
- foreach (range(1, 9) as $index) {
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('markDead')->once()->getMock()
- ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock()
- ->shouldReceive('getLastPing')->andReturn(time())->once()->getMock();
-
- $connections[] = $mockConnection;
- }
-
- $goodConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->once()
- ->andReturn(true)
- ->getMock()
- ->shouldReceive('isAlive')->once()
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('markDead')->once()->getMock()
- ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock()
- ->shouldReceive('getLastPing')->andReturn(time())->once()->getMock();
-
- $connections[] = $goodConnection;
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturnValues($connections)
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class);
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- ];
- $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $ret = $connectionPool->nextConnection();
- $this->assertSame($goodConnection, $ret);
- }
-
- public function testAllExceptLastHostFailPingRevivesPreSkip()
- {
- $connections = [];
-
- foreach (range(1, 9) as $index) {
- $mockConnection = m::mock(Connection::class)
- ->shouldReceive('ping')
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('isAlive')
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('markDead')->once()->getMock()
- ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock()
- ->shouldReceive('getLastPing')->andReturn(time())->once()->getMock();
-
- $connections[] = $mockConnection;
- }
-
- $goodConnection = m::mock(Connection::class)
- ->shouldReceive('ping')->once()
- ->andReturn(true)
- ->getMock()
- ->shouldReceive('isAlive')->once()
- ->andReturn(false)
- ->getMock()
- ->shouldReceive('markDead')->once()->getMock()
- ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock()
- ->shouldReceive('getLastPing')->andReturn(time()-10000)->once()->getMock();
-
- $connections[] = $goodConnection;
-
- $selector = m::mock(RoundRobinSelector::class)
- ->shouldReceive('select')
- ->andReturnValues($connections)
- ->getMock();
-
- $connectionFactory = m::mock(ConnectionFactory::class);
-
- $connectionPoolParams = [
- 'randomizeHosts' => false,
- ];
- $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams);
-
- $ret = $connectionPool->nextConnection();
- $this->assertSame($goodConnection, $ret);
- }
-
- public function testCustomConnectionPoolIT()
- {
- $clientBuilder = \Elasticsearch\ClientBuilder::create();
- $clientBuilder->setHosts(['localhost:1']);
- $client = $clientBuilder
- ->setRetries(0)
- ->setConnectionPool(StaticConnectionPool::class, [])
- ->build();
-
- $this->expectException(Elasticsearch\Common\Exceptions\NoNodesAvailableException::class);
- $this->expectExceptionMessage('No alive nodes found in your cluster');
-
- $client->search([]);
- }
-}
diff --git a/tests/Elasticsearch/Tests/Connections/ConnectionTest.php b/tests/Elasticsearch/Tests/Connections/ConnectionTest.php
deleted file mode 100644
index 608bb64df..000000000
--- a/tests/Elasticsearch/Tests/Connections/ConnectionTest.php
+++ /dev/null
@@ -1,552 +0,0 @@
-logger = $this->createMock(LoggerInterface::class);
- $this->trace = $this->createMock(LoggerInterface::class);
- $this->serializer = $this->createMock(SerializerInterface::class);
- }
-
- /**
- * @covers \Connection
- */
- public function testConstructor()
- {
- $host = [
- 'host' => 'localhost'
- ];
-
- $connection = new Connection(
- function () {
- },
- $host,
- [],
- $this->serializer,
- $this->logger,
- $this->trace
- );
-
- $this->assertInstanceOf(Connection::class, $connection);
- }
-
- /**
- * @depends testConstructor
- *
- * @covers \Connection::getHeaders
- */
- public function testGetHeadersContainUserAgent()
- {
- $params = [];
- $host = [
- 'host' => 'localhost'
- ];
-
- $connection = new Connection(
- function () {
- },
- $host,
- $params,
- $this->serializer,
- $this->logger,
- $this->trace
- );
-
- $headers = $connection->getHeaders();
-
- $this->assertArrayHasKey('User-Agent', $headers);
- $this->assertStringContainsString('elasticsearch-php/'. Client::VERSION, $headers['User-Agent'][0]);
- }
-
- /**
- * @depends testGetHeadersContainUserAgent
- *
- * @covers \Connection::getHeaders
- * @covers \Connection::performRequest
- * @covers \Connection::getLastRequestInfo
- */
- public function testUserAgentHeaderIsSent()
- {
- $params = [];
- $host = [
- 'host' => 'localhost'
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- $params,
- $this->serializer,
- $this->logger,
- $this->trace
- );
- $result = $connection->performRequest('GET', '/');
- $request = $connection->getLastRequestInfo()['request'];
-
- $this->assertArrayHasKey('User-Agent', $request['headers']);
- $this->assertStringContainsString('elasticsearch-php/'. Client::VERSION, $request['headers']['User-Agent'][0]);
- }
-
- /**
- * @depends testConstructor
- *
- * @covers \Connection::getHeaders
- * @covers \Connection::performRequest
- * @covers \Connection::getLastRequestInfo
- */
- public function testGetHeadersContainsHostArrayConfig()
- {
- $host = [
- 'host' => 'localhost',
- 'user' => 'foo',
- 'pass' => 'bar',
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- [],
- $this->serializer,
- $this->logger,
- $this->trace
- );
- $result = $connection->performRequest('GET', '/');
- $request = $connection->getLastRequestInfo()['request'];
-
- $this->assertArrayHasKey(CURLOPT_HTTPAUTH, $request['client']['curl']);
- $this->assertArrayHasKey(CURLOPT_USERPWD, $request['client']['curl']);
- $this->assertArrayNotHasKey('Authorization', $request['headers']);
- $this->assertStringContainsString('foo:bar', $request['client']['curl'][CURLOPT_USERPWD]);
- }
-
- /**
- * @depends testGetHeadersContainsHostArrayConfig
- *
- * @covers \Connection::getHeaders
- * @covers \Connection::performRequest
- * @covers \Connection::getLastRequestInfo
- */
- public function testGetHeadersContainApiKeyAuth()
- {
- $params = ['client' => ['headers' => [
- 'Authorization' => [
- 'ApiKey ' . base64_encode(sha1((string)time()))
- ]
- ] ] ];
- $host = [
- 'host' => 'localhost'
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- $params,
- $this->serializer,
- $this->logger,
- $this->trace
- );
- $result = $connection->performRequest('GET', '/');
- $request = $connection->getLastRequestInfo()['request'];
-
- $this->assertArrayHasKey('Authorization', $request['headers']);
- $this->assertArrayNotHasKey(CURLOPT_HTTPAUTH, $request['headers']);
- $this->assertStringContainsString($params['client']['headers']['Authorization'][0], $request['headers']['Authorization'][0]);
- }
-
- /**
- * @depends testGetHeadersContainApiKeyAuth
- *
- * @covers \Connection::getHeaders
- * @covers \Connection::performRequest
- * @covers \Connection::getLastRequestInfo
- */
- public function testGetHeadersContainApiKeyAuthOverHostArrayConfig()
- {
- $params = ['client' => ['headers' => [
- 'Authorization' => [
- 'ApiKey ' . base64_encode(sha1((string)time()))
- ]
- ] ] ];
- $host = [
- 'host' => 'localhost',
- 'user' => 'foo',
- 'pass' => 'bar',
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- $params,
- $this->serializer,
- $this->logger,
- $this->trace
- );
- $result = $connection->performRequest('GET', '/');
- $request = $connection->getLastRequestInfo()['request'];
-
- $this->assertArrayHasKey('Authorization', $request['headers']);
- $this->assertArrayNotHasKey(CURLOPT_HTTPAUTH, $request['headers']);
- $this->assertStringContainsString($params['client']['headers']['Authorization'][0], $request['headers']['Authorization'][0]);
- }
-
- /**
- * @depends testGetHeadersContainsHostArrayConfig
- *
- * @covers \Connection::getHeaders
- * @covers \Connection::performRequest
- * @covers \Connection::getLastRequestInfo
- */
- public function testGetHeadersContainBasicAuth()
- {
- $params = ['client' => ['curl' => [
- CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
- CURLOPT_USERPWD => 'username:password',
- ] ] ];
- $host = [
- 'host' => 'localhost'
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- $params,
- $this->serializer,
- $this->logger,
- $this->trace
- );
- $result = $connection->performRequest('GET', '/');
- $request = $connection->getLastRequestInfo()['request'];
-
- $this->assertArrayHasKey(CURLOPT_HTTPAUTH, $request['client']['curl']);
- $this->assertArrayHasKey(CURLOPT_USERPWD, $request['client']['curl']);
- $this->assertArrayNotHasKey('Authorization', $request['headers']);
- $this->assertStringContainsString($params['client']['curl'][CURLOPT_USERPWD], $request['client']['curl'][CURLOPT_USERPWD]);
- }
-
- /**
- * @depends testGetHeadersContainBasicAuth
- *
- * @covers \Connection::getHeaders
- * @covers \Connection::performRequest
- * @covers \Connection::getLastRequestInfo
- */
- public function testGetHeadersContainBasicAuthOverHostArrayConfig()
- {
- $params = ['client' => ['curl' => [
- CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
- CURLOPT_USERPWD => 'username:password',
- ] ] ];
- $host = [
- 'host' => 'localhost',
- 'user' => 'foo',
- 'pass' => 'bar',
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- $params,
- $this->serializer,
- $this->logger,
- $this->trace
- );
- $result = $connection->performRequest('GET', '/');
- $request = $connection->getLastRequestInfo()['request'];
-
- $this->assertArrayHasKey(CURLOPT_HTTPAUTH, $request['client']['curl']);
- $this->assertArrayHasKey(CURLOPT_USERPWD, $request['client']['curl']);
- $this->assertArrayNotHasKey('Authorization', $request['headers']);
- $this->assertStringContainsString('username:password', $request['client']['curl'][CURLOPT_USERPWD]);
- }
-
- /**
- * @see https://github.com/elastic/elasticsearch-php/issues/977
- */
- public function testTryDeserializeErrorWithMasterNotDiscoveredException()
- {
- $host = [
- 'host' => 'localhost'
- ];
-
- $connection = new Connection(
- function () {
- },
- $host,
- [],
- new SmartSerializer(),
- $this->logger,
- $this->trace
- );
-
- $reflection = new ReflectionClass(Connection::class);
- $tryDeserializeError = $reflection->getMethod('tryDeserializeError');
- $tryDeserializeError->setAccessible(true);
-
- $body = '{"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":null}],"type":"master_not_discovered_exception","reason":null},"status":503}';
- $response = [
- 'transfer_stats' => [],
- 'status' => 503,
- 'body' => $body
- ];
-
- $result = $tryDeserializeError->invoke($connection, $response, ServerErrorResponseException::class);
- $this->assertInstanceOf(ServerErrorResponseException::class, $result);
- $this->assertStringContainsString('master_not_discovered_exception', $result->getMessage());
- }
-
- public function testHeaderClientParamIsResetAfterSent()
- {
- $host = [
- 'host' => 'localhost'
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- [],
- new SmartSerializer(),
- $this->logger,
- $this->trace
- );
-
- $options = [
- 'client' => [
- 'headers' => [
- 'Foo' => [ 'Bar' ]
- ]
- ]
- ];
-
- $headersBefore = $connection->getHeaders();
- $result = $connection->performRequest('GET', '/', null, null, $options);
- $headersAfter = $connection->getHeaders();
- $this->assertEquals($headersBefore, $headersAfter);
- }
-
- /**
- * Test if the x-elastic-client-meta header is sent if $params['client']['x-elastic-client-meta'] is true
- */
- public function testElasticMetaClientHeaderIsSentWhenParameterIsTrue()
- {
- $params = [
- 'client' => [
- 'x-elastic-client-meta'=> true
- ]
- ];
- $host = [
- 'host' => 'localhost'
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- $params,
- $this->serializer,
- $this->logger,
- $this->trace
- );
- $result = $connection->performRequest('GET', '/');
- $request = $connection->getLastRequestInfo()['request'];
-
- $this->assertArrayHasKey('x-elastic-client-meta', $request['headers']);
- $this->assertEquals(
- 1,
- preg_match(
- '/^[a-z]{1,}=[a-z0-9\.\-]{1,}(?:,[a-z]{1,}=[a-z0-9\.\-]+)*$/',
- $request['headers']['x-elastic-client-meta'][0]
- )
- );
- }
-
- /**
- * Test if the x-elastic-client-meta header is sent if $params['client']['x-elastic-client-meta'] is true
- */
- public function testElasticMetaClientHeaderIsNotSentWhenParameterIsFalse()
- {
- $params = [
- 'client' => [
- 'x-elastic-client-meta'=> false
- ]
- ];
- $host = [
- 'host' => 'localhost'
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- $params,
- $this->serializer,
- $this->logger,
- $this->trace
- );
- $result = $connection->performRequest('GET', '/');
- $request = $connection->getLastRequestInfo()['request'];
-
- $this->assertArrayNotHasKey('x-elastic-client-meta', $request['headers']);
- }
-
- public function testParametersAreSent()
- {
- $connectionParams = [];
- $host = [
- 'host' => 'localhost'
- ];
- $requestParams = [
- 'foo' => true,
- 'baz' => false,
- 'bar' => 'baz'
- ];
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- $host,
- $connectionParams,
- $this->serializer,
- $this->logger,
- $this->trace
- );
- $result = $connection->performRequest('GET', '/', $requestParams);
- $request = $connection->getLastRequestInfo()['request'];
-
- $this->assertEquals('/?foo=true&baz=false&bar=baz', $request['uri']);
- }
-
- public function testPortInUrlWhenLogRequestSuccess()
- {
- $logger = new ArrayLogger();
- $trace = new ArrayLogger();
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- [
- 'host' => 'localhost',
- 'port' => 9200,
- 'scheme' => 'http',
- 'path' => '/info'
- ],
- [],
- $this->serializer,
- $logger,
- $trace
- );
- $request = [
- 'body' => '{}',
- 'http_method' => 'GET',
- 'headers' => [
- 'User-Agent: Testing'
- ]
- ];
- $response = [
- 'effective_url' => 'http://localhost/info',
- 'status' => 200,
- 'transfer_stats' => [
- 'primary_port' => 9200,
- 'total_time' => 1
- ],
- 'body' => '{}'
- ];
- $connection->logRequestSuccess($request, $response);
- // Check for localhost:9200 in trace
- foreach ($trace->output as $row) {
- $this->assertStringContainsString('localhost:9200', $row);
- }
- // Check for localhost:9200 in logger
- foreach ($logger->output as $row) {
- if (false !== strpos('info: Request Success', $row)) {
- $this->assertStringContainsString('localhost:9200', $row);
- }
- }
- }
-
- public function testPortInLogUrlWhenLogRequestFail()
- {
- $logger = new ArrayLogger();
- $trace = new ArrayLogger();
-
- $connection = new Connection(
- ClientBuilder::defaultHandler(),
- [
- 'host' => 'localhost',
- 'port' => 9200,
- 'scheme' => 'http',
- 'path' => '/info'
- ],
- [],
- $this->serializer,
- $logger,
- $trace
- );
- $request = [
- 'body' => '{}',
- 'http_method' => 'GET',
- 'headers' => [
- 'User-Agent: Testing'
- ]
- ];
- $response = [
- 'effective_url' => 'http://localhost/info',
- 'status' => 400,
- 'transfer_stats' => [
- 'primary_port' => 9200,
- 'total_time' => 1
- ],
- 'body' => '{}'
- ];
- $connection->logRequestFail($request, $response, new Exception());
-
- // Check for localhost:9200 in trace
- foreach ($trace->output as $row) {
- $this->assertStringContainsString('localhost:9200', $row);
- }
- // Check for localhost:9200 in logger
- foreach ($logger->output as $row) {
- if (false !== strpos('warning: Request Failure:', $row)) {
- $this->assertStringContainsString('localhost:9200', $row);
- }
- }
- }
-}
diff --git a/tests/Elasticsearch/Tests/Endpoints/AbstractEndpointTest.php b/tests/Elasticsearch/Tests/Endpoints/AbstractEndpointTest.php
deleted file mode 100644
index 369627a6f..000000000
--- a/tests/Elasticsearch/Tests/Endpoints/AbstractEndpointTest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-endpoint = $this->getMockForAbstractClass(AbstractEndpoint::class);
- }
-
- public static function invalidParameters(): array
- {
- return [
- [['invalid' => 10]],
- [['invalid' => 10, 'invalid2' => 'another']],
- ];
- }
-
- /**
- * @dataProvider invalidParameters
- *
- * @covers AbstractEndpoint::setParams
- */
- public function testInvalidParamsCauseErrorsWhenProvidedToSetParams(array $params)
- {
- $this->endpoint->expects($this->once())
- ->method('getParamWhitelist')
- ->willReturn(['one', 'two']);
-
- $this->expectException(\Elasticsearch\Common\Exceptions\UnexpectedValueException::class);
-
- $this->endpoint->setParams($params);
- }
-
- /**
- * @covers AbstractEndpoint::setParams
- * @covers AbstractEndpoint::extractOptions
- * @covers AbstractEndpoint::getOptions
- */
- public function testOpaqueIdInHeaders()
- {
- $params = ['client' => ['opaqueId' => 'test_id_' . rand(1000, 9999)]];
- $this->endpoint->setParams($params);
-
- $options = $this->endpoint->getOptions();
- $this->assertArrayHasKey('client', $options);
- $this->assertArrayHasKey('headers', $options['client']);
- $this->assertArrayHasKey('x-opaque-id', $options['client']['headers']);
- $this->assertNotEmpty($options['client']['headers']['x-opaque-id']);
- $this->assertEquals($params['client']['opaqueId'], $options['client']['headers']['x-opaque-id'][0]);
- }
-}
diff --git a/tests/Elasticsearch/Tests/Endpoints/StatusEndpointTest.php b/tests/Elasticsearch/Tests/Endpoints/StatusEndpointTest.php
deleted file mode 100644
index fc376caed..000000000
--- a/tests/Elasticsearch/Tests/Endpoints/StatusEndpointTest.php
+++ /dev/null
@@ -1,67 +0,0 @@
-endpoint = new Status();
- }
-
- public static function statusParams()
- {
- return [
- [
- 'repository' => 'my_backup',
- 'snapshot' => null,
- 'expected' => '/_snapshot/my_backup/_status',
- ],
- [
- 'repository' => 'my_backup',
- 'snapshot' => 'snapshot_1',
- 'expected' => '/_snapshot/my_backup/snapshot_1/_status',
- ],
- ];
- }
-
- /**
- * @dataProvider statusParams
- */
- public function testGetUriReturnsAppropriateUri($repository, $snapshot, $expected)
- {
- if ($repository) {
- $this->endpoint->setRepository($repository);
- }
-
- if ($snapshot) {
- $this->endpoint->setSnapshot($snapshot);
- }
-
- $this->assertSame($expected, $this->endpoint->getURI());
- }
-}
diff --git a/tests/Elasticsearch/Tests/Helper/Iterators/SearchHitIteratorTest.php b/tests/Elasticsearch/Tests/Helper/Iterators/SearchHitIteratorTest.php
deleted file mode 100644
index 78980bead..000000000
--- a/tests/Elasticsearch/Tests/Helper/Iterators/SearchHitIteratorTest.php
+++ /dev/null
@@ -1,135 +0,0 @@
-searchResponse = Mockery::mock(SearchResponseIterator::class);
- }
-
- public function tearDown(): void
- {
- Mockery::close();
- }
-
- public function testWithNoResults()
- {
- $searchHit = new SearchHitIterator($this->searchResponse);
- $this->assertCount(0, $searchHit);
- }
-
- public function testWithHits()
- {
- $this->searchResponse->shouldReceive('rewind')
- ->once()
- ->ordered();
-
- $this->searchResponse->shouldReceive('current')
- ->andReturn(
- [
- 'hits' => [
- 'hits' => [
- [ 'foo' => 'bar0' ],
- [ 'foo' => 'bar1' ],
- [ 'foo' => 'bar2' ]
- ],
- 'total' => 3
- ]
- ],
- [
- 'hits' => [
- 'hits' => [
- [ 'foo' => 'bar0' ],
- [ 'foo' => 'bar1' ],
- [ 'foo' => 'bar2' ]
- ],
- 'total' => 3
- ]
- ],
- [
- 'hits' => [
- 'hits' => [
- [ 'foo' => 'bar0' ],
- [ 'foo' => 'bar1' ],
- [ 'foo' => 'bar2' ]
- ],
- 'total' => 3
- ]
- ],
- [
- 'hits' => [
- 'hits' => [
- [ 'foo' => 'bar0' ],
- [ 'foo' => 'bar1' ],
- [ 'foo' => 'bar2' ]
- ],
- 'total' => 3
- ]
- ],
- [
- 'hits' => [
- 'hits' => [
- [ 'foo' => 'bar3' ],
- [ 'foo' => 'bar4' ]
- ],
- 'total' => 2
- ]
- ],
- [
- 'hits' => [
- 'hits' => [
- [ 'foo' => 'bar3' ],
- [ 'foo' => 'bar4' ]
- ],
- 'total' => 2
- ]
- ]
- );
-
- $this->searchResponse->shouldReceive('valid')
- ->andReturn(true, true, true, false);
-
- $this->searchResponse->shouldReceive('next')
- ->times(2)
- ->ordered();
-
- $responses = new SearchHitIterator($this->searchResponse);
- $i = 0;
- foreach ($responses as $key => $value) {
- $this->assertEquals($i, $key);
- $this->assertEquals("bar$i", $value['foo']);
- $i++;
- }
- }
-}
diff --git a/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php b/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php
deleted file mode 100644
index 07a56f559..000000000
--- a/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php
+++ /dev/null
@@ -1,183 +0,0 @@
- '5m',
- 'index' => 'twitter',
- 'size' => 1000,
- 'body' => [
- 'query' => [
- 'match_all' => new \stdClass
- ]
- ]
- ];
-
- $mock_client = m::mock(Client::class);
-
- $mock_client->shouldReceive('search')
- ->twice()
- ->with($search_params)
- ->andReturn(['_scroll_id' => 'scroll_id_01']);
-
- $mock_client->shouldReceive('clearScroll')
- ->twice()
- ->withAnyArgs();
-
- $responses = new SearchResponseIterator($mock_client, $search_params);
-
- $this->assertCount(0, $responses);
- }
-
- public function testWithHits()
- {
- $search_params = [
- 'scroll' => '5m',
- 'index' => 'twitter',
- 'size' => 1000,
- 'body' => [
- 'query' => [
- 'match_all' => new \stdClass
- ]
- ]
- ];
-
- $mock_client = m::mock(Client::class);
-
- $mock_client->shouldReceive('search')
- ->once()
- ->ordered()
- ->with($search_params)
- ->andReturn(
- [
- '_scroll_id' => 'scroll_id_01',
- 'hits' => [
- 'hits' => [
- [
- 'foo' => 'bar'
- ]
- ]
- ]
- ]
- );
-
- $mock_client->shouldReceive('scroll')
- ->once()
- ->ordered()
- ->with(
- [
- 'scroll_id' => 'scroll_id_01',
- 'scroll' => '5m'
- ]
- )
- ->andReturn(
- [
- '_scroll_id' => 'scroll_id_02',
- 'hits' => [
- 'hits' => [
- [
- 'foo' => 'bar'
- ]
- ]
- ]
- ]
- );
-
- $mock_client->shouldReceive('scroll')
- ->once()
- ->ordered()
- ->with(
- [
- 'scroll_id' => 'scroll_id_02',
- 'scroll' => '5m'
- ]
- )
- ->andReturn(
- [
- '_scroll_id' => 'scroll_id_03',
- 'hits' => [
- 'hits' => [
- [
- 'foo' => 'bar'
- ]
- ]
- ]
- ]
- );
-
- $mock_client->shouldReceive('scroll')
- ->once()
- ->ordered()
- ->with(
- [
- 'scroll_id' => 'scroll_id_03',
- 'scroll' => '5m'
- ]
- )
- ->andReturn(
- [
- '_scroll_id' => 'scroll_id_04',
- 'hits' => [
- 'hits' => []
- ]
- ]
- );
-
- $mock_client->shouldReceive('scroll')
- ->never()
- ->with(
- [
- 'scroll_id' => 'scroll_id_04',
- 'scroll' => '5m'
- ]
- );
-
- $mock_client->shouldReceive('clearScroll')
- ->once()
- ->ordered()
- ->withAnyArgs();
-
- $responses = new SearchResponseIterator($mock_client, $search_params);
- $count = 0;
- $i = 0;
- foreach ($responses as $response) {
- $count += count($response['hits']['hits']);
- $this->assertEquals($response['_scroll_id'], sprintf("scroll_id_%02d", ++$i));
- }
- $this->assertEquals(3, $count);
- }
-}
diff --git a/tests/Elasticsearch/Tests/RegisteredNamespaceTest.php b/tests/Elasticsearch/Tests/RegisteredNamespaceTest.php
deleted file mode 100644
index caa38f287..000000000
--- a/tests/Elasticsearch/Tests/RegisteredNamespaceTest.php
+++ /dev/null
@@ -1,80 +0,0 @@
-registerNamespace($builder)->build();
- $this->assertSame("123", $client->foo()->fooMethod());
- }
-
- public function testNonExistingNamespace()
- {
- $builder = new FooNamespaceBuilder();
- $client = ClientBuilder::create()->registerNamespace($builder)->build();
-
- $this->expectException(\Elasticsearch\Common\Exceptions\BadMethodCallException::class);
- $this->expectExceptionMessage('Namespace [bar] not found');
-
- $client->bar()->fooMethod();
- }
-}
-
-// @codingStandardsIgnoreStart "Each class must be in a file by itself" - not worth the extra work here
-class FooNamespaceBuilder implements Elasticsearch\Namespaces\NamespaceBuilderInterface
-{
- public function getName(): string
- {
- return "foo";
- }
-
- public function getObject(Transport $transport, SerializerInterface $serializer)
- {
- return new FooNamespace();
- }
-}
-
-class FooNamespace
-{
- public function fooMethod()
- {
- return "123";
- }
-}
-// @codingStandardsIgnoreEnd
diff --git a/tests/Elasticsearch/Tests/Serializers/ArrayToJSONSerializerTest.php b/tests/Elasticsearch/Tests/Serializers/ArrayToJSONSerializerTest.php
deleted file mode 100644
index c2f8775ed..000000000
--- a/tests/Elasticsearch/Tests/Serializers/ArrayToJSONSerializerTest.php
+++ /dev/null
@@ -1,66 +0,0 @@
- 'field'];
-
- $ret = $serializer->serialize($body);
-
- $body = json_encode($body, JSON_PRESERVE_ZERO_FRACTION);
- $this->assertSame($body, $ret);
- }
-
- public function testSerializeString()
- {
- $serializer = new ArrayToJSONSerializer();
- $body = 'abc';
-
- $ret = $serializer->serialize($body);
-
- $this->assertSame($body, $ret);
- }
-
- public function testDeserializeJSON()
- {
- $serializer = new ArrayToJSONSerializer();
- $body = '{"field":"value"}';
-
- $ret = $serializer->deserialize($body, []);
-
- $body = json_decode($body, true);
- $this->assertSame($body, $ret);
- }
-}
diff --git a/tests/Elasticsearch/Tests/Serializers/EverythingToJSONSerializerTest.php b/tests/Elasticsearch/Tests/Serializers/EverythingToJSONSerializerTest.php
deleted file mode 100644
index 65882ff89..000000000
--- a/tests/Elasticsearch/Tests/Serializers/EverythingToJSONSerializerTest.php
+++ /dev/null
@@ -1,67 +0,0 @@
- 'field'];
-
- $ret = $serializer->serialize($body);
-
- $body = json_encode($body, JSON_PRESERVE_ZERO_FRACTION);
- $this->assertSame($body, $ret);
- }
-
- public function testSerializeString()
- {
- $serializer = new EverythingToJSONSerializer();
- $body = 'abc';
-
- $ret = $serializer->serialize($body);
-
- $body = '"abc"';
- $this->assertSame($body, $ret);
- }
-
- public function testDeserializeJSON()
- {
- $serializer = new EverythingToJSONSerializer();
- $body = '{"field":"value"}';
-
- $ret = $serializer->deserialize($body, []);
-
- $body = json_decode($body, true);
- $this->assertSame($body, $ret);
- }
-}
diff --git a/tests/Elasticsearch/Tests/Serializers/SmartSerializerTest.php b/tests/Elasticsearch/Tests/Serializers/SmartSerializerTest.php
deleted file mode 100644
index 7ad77e794..000000000
--- a/tests/Elasticsearch/Tests/Serializers/SmartSerializerTest.php
+++ /dev/null
@@ -1,48 +0,0 @@
-serializer = new SmartSerializer();
- }
-
- /**
- * @requires PHP 7.3
- * @see https://github.com/elastic/elasticsearch-php/issues/1012
- */
- public function testThrowJsonErrorException()
- {
- $this->expectException(JsonErrorException::class);
- $this->expectExceptionCode(JSON_ERROR_SYNTAX);
-
- $result = $this->serializer->deserialize('{ "foo" : bar" }', []);
- }
-}
diff --git a/tests/Elasticsearch/Tests/TransportTest.php b/tests/Elasticsearch/Tests/TransportTest.php
deleted file mode 100644
index 7d8f4a59f..000000000
--- a/tests/Elasticsearch/Tests/TransportTest.php
+++ /dev/null
@@ -1,85 +0,0 @@
-logger = $this->createMock(LoggerInterface::class);
- $this->trace = $this->createMock(LoggerInterface::class);
- $this->serializer = $this->createMock(SerializerInterface::class);
- $this->connectionPool = $this->createMock(AbstractConnectionPool::class);
- $this->connection = $this->createMock(Connection::class);
- }
-
- public function testPerformRequestWithServerErrorResponseException404Result()
- {
- $deferred = new Deferred();
- $deferred->reject(new ServerErrorResponseException('foo', 404));
- $future = new FutureArray($deferred->promise());
-
- $this->connection->method('performRequest')
- ->willReturn($future);
-
- $this->connectionPool->method('nextConnection')
- ->willReturn($this->connection);
-
- $this->connectionPool->expects($this->never())
- ->method('scheduleCheck');
-
- $transport = new Transport(1, $this->connectionPool, $this->logger);
-
- $result = $transport->performRequest('GET', '/');
- $this->assertInstanceOf(FutureArrayInterface::class, $result);
- }
-
- public function testPerformRequestWithServerErrorResponseException500Result()
- {
- $deferred = new Deferred();
- $deferred->reject(new ServerErrorResponseException('foo', 500));
- $future = new FutureArray($deferred->promise());
-
- $this->connection->method('performRequest')
- ->willReturn($future);
-
- $this->connectionPool->method('nextConnection')
- ->willReturn($this->connection);
-
- $this->connectionPool->expects($this->once())
- ->method('scheduleCheck');
-
- $transport = new Transport(1, $this->connectionPool, $this->logger);
-
- $result = $transport->performRequest('GET', '/');
- $this->assertInstanceOf(FutureArrayInterface::class, $result);
- }
-}
diff --git a/tests/Response/ElasticsearchTest.php b/tests/Response/ElasticsearchTest.php
new file mode 100644
index 000000000..9b9cc6d96
--- /dev/null
+++ b/tests/Response/ElasticsearchTest.php
@@ -0,0 +1,203 @@
+psr17Factory = new Psr17Factory();
+ $this->elasticsearch = new Elasticsearch();
+
+ $this->response200 = $this->psr17Factory->createResponse(200)
+ ->withHeader('X-Elastic-Product', 'Elasticsearch')
+ ->withHeader('Content-Type', 'application/json');
+
+ $this->response400 = $this->psr17Factory->createResponse(400)
+ ->withHeader('X-Elastic-Product', 'Elasticsearch')
+ ->withHeader('Content-Type', 'application/json');
+
+ $this->response500 = $this->psr17Factory->createResponse(500)
+ ->withHeader('X-Elastic-Product', 'Elasticsearch')
+ ->withHeader('Content-Type', 'application/json');
+ }
+
+ public function testAsArray()
+ {
+ $array = ['foo' => 'bar'];
+ $body = $this->psr17Factory->createStream(json_encode($array));
+ $this->elasticsearch->setResponse($this->response200->withBody($body));
+ $this->assertEquals($array, $this->elasticsearch->asArray());
+ }
+
+ public function testAsString()
+ {
+ $json = json_encode(['foo' => 'bar']);
+ $body = $this->psr17Factory->createStream($json);
+ $this->elasticsearch->setResponse($this->response200->withBody($body));
+ $this->assertEquals($json, $this->elasticsearch->asString());
+ }
+
+ public function testAsObject()
+ {
+ $json = json_encode(['foo' => 'bar']);
+ $body = $this->psr17Factory->createStream($json);
+ $this->elasticsearch->setResponse($this->response200->withBody($body));
+ $obj = $this->elasticsearch->asObject();
+ $this->assertIsObject($obj);
+ $this->assertEquals('bar', $obj->foo);
+ }
+
+ public function testAsBoolIsTrueWith200()
+ {
+ $this->elasticsearch->setResponse($this->response200);
+ $this->assertTrue($this->elasticsearch->asBool());
+ }
+
+ public function testAsBoolIsFalseWith400()
+ {
+ try {
+ $this->elasticsearch->setResponse($this->response400);
+ } catch (ClientResponseException $e) {
+ $this->assertFalse($this->elasticsearch->asBool());
+ }
+ }
+
+ /**
+ * @covers Elastic\Elasticsearch\Response\Elasticsearch::__toString()
+ */
+ public function testSerializeAsString()
+ {
+ $json = json_encode(['foo' => 'bar']);
+ $body = $this->psr17Factory->createStream($json);
+ $this->elasticsearch->setResponse($this->response200->withBody($body));
+ $this->assertEquals($json, (string) $this->elasticsearch);
+ }
+
+ /**
+ * @doesNotPerformAssertions
+ */
+ public function testSetResponse()
+ {
+ $this->elasticsearch->setResponse($this->response200);
+ }
+
+ public function testSetResponseFromUnknownSourceThrowProductCheckException()
+ {
+ $response = $this->psr17Factory->createResponse(200)
+ ->withHeader('Content-Type', 'application/json');
+
+ $this->expectException(ProductCheckException::class);
+ $this->elasticsearch->setResponse($response);
+ }
+
+ public function testSetResponseWith400ThrowException()
+ {
+ $this->expectException(ClientResponseException::class);
+ $this->elasticsearch->setResponse($this->response400);
+ }
+
+ public function testSetResponseWith500ThrowException()
+ {
+ $this->expectException(ServerResponseException::class);
+ $this->elasticsearch->setResponse($this->response500);
+ }
+
+ /**
+ * @doesNotPerformAssertions
+ */
+ public function testSetResponseWith400AndThrowFalseDoesNotThrowException()
+ {
+ $this->elasticsearch->setResponse($this->response400, false);
+ }
+
+ /**
+ * @doesNotPerformAssertions
+ */
+ public function testSetResponseWith500AndThrowFalseDoesNotThrowException()
+ {
+ $this->elasticsearch->setResponse($this->response500, false);
+ }
+
+ /**
+ * @covers Elastic\Elasticsearch\Response\Elasticsearch::offsetGet
+ */
+ public function testAccessAsArray()
+ {
+ $array = ['foo' => 'bar'];
+ $body = $this->psr17Factory->createStream(json_encode($array));
+ $this->elasticsearch->setResponse($this->response200->withBody($body));
+
+ $this->assertEquals($array['foo'], $this->elasticsearch['foo']);
+ }
+
+ /**
+ * @covers Elastic\Elasticsearch\Response\Elasticsearch::offsetExists
+ */
+ public function testIsSetArrayAccess()
+ {
+ $array = ['foo' => 'bar'];
+ $body = $this->psr17Factory->createStream(json_encode($array));
+ $this->elasticsearch->setResponse($this->response200->withBody($body));
+
+ $this->assertTrue(isset($this->elasticsearch['foo']));
+ }
+
+ /**
+ * @covers Elastic\Elasticsearch\Response\Elasticsearch::offsetSet
+ */
+ public function testSetArrayAccessThrowException()
+ {
+ $array = ['foo' => 'bar'];
+ $body = $this->psr17Factory->createStream(json_encode($array));
+ $this->elasticsearch->setResponse($this->response200->withBody($body));
+
+ $this->expectException(ArrayAccessException::class);
+ $this->elasticsearch['foo'] = 'test';
+ }
+
+ /**
+ * @covers Elastic\Elasticsearch\Response\Elasticsearch::offsetSet
+ */
+ public function testUnsetArrayAccessThrowException()
+ {
+ $array = ['foo' => 'bar'];
+ $body = $this->psr17Factory->createStream(json_encode($array));
+ $this->elasticsearch->setResponse($this->response200->withBody($body));
+
+ $this->expectException(ArrayAccessException::class);
+ unset($this->elasticsearch['foo']);
+ }
+
+ /**
+ * @covers Elastic\Elasticsearch\Response\Elasticsearch::__get()
+ */
+ public function testAccessAsObject()
+ {
+ $array = ['foo' => 'bar'];
+ $body = $this->psr17Factory->createStream(json_encode($array));
+ $this->elasticsearch->setResponse($this->response200->withBody($body));
+
+ $this->assertEquals($array['foo'], $this->elasticsearch->foo);
+ }
+}
\ No newline at end of file
diff --git a/tests/Transport/AsyncOnSuccessNoExceptionTest.php b/tests/Transport/AsyncOnSuccessNoExceptionTest.php
new file mode 100644
index 000000000..0fe67ca61
--- /dev/null
+++ b/tests/Transport/AsyncOnSuccessNoExceptionTest.php
@@ -0,0 +1,59 @@
+asyncOnSuccess = new AsyncOnSuccessNoException();
+ $this->psr17Factory = new Psr17Factory();
+ }
+
+ public function testSuccessWith200()
+ {
+ $response = $this->psr17Factory->createResponse(200)
+ ->withHeader('X-Elastic-Product', 'Elasticsearch')
+ ->withHeader('Content-Type', 'application/json');
+
+ $result = $this->asyncOnSuccess->success($response, 0);
+ $this->assertInstanceOf(Elasticsearch::class, $result);
+ }
+
+ public function testSuccessWith400DoesNotThrowException()
+ {
+ $response = $this->psr17Factory->createResponse(400)
+ ->withHeader('X-Elastic-Product', 'Elasticsearch')
+ ->withHeader('Content-Type', 'application/json');
+
+ $result = $this->asyncOnSuccess->success($response, 0);
+ $this->assertInstanceOf(Elasticsearch::class, $result);
+ }
+
+ public function testSuccessWith500DoesNotThrowException()
+ {
+ $response = $this->psr17Factory->createResponse(500)
+ ->withHeader('X-Elastic-Product', 'Elasticsearch')
+ ->withHeader('Content-Type', 'application/json');
+
+ $result = $this->asyncOnSuccess->success($response, 0);
+ $this->assertInstanceOf(Elasticsearch::class, $result);
+ }
+}
\ No newline at end of file
diff --git a/tests/Transport/AsyncOnSuccessTest.php b/tests/Transport/AsyncOnSuccessTest.php
new file mode 100644
index 000000000..e3d6689dc
--- /dev/null
+++ b/tests/Transport/AsyncOnSuccessTest.php
@@ -0,0 +1,61 @@
+asyncOnSuccess = new AsyncOnSuccess();
+ $this->psr17Factory = new Psr17Factory();
+ }
+
+ public function testSuccessWith200()
+ {
+ $response = $this->psr17Factory->createResponse(200)
+ ->withHeader('X-Elastic-Product', 'Elasticsearch')
+ ->withHeader('Content-Type', 'application/json');
+
+ $result = $this->asyncOnSuccess->success($response, 0);
+ $this->assertInstanceOf(Elasticsearch::class, $result);
+ }
+
+ public function testSuccessWith400ThrowClientResponseException()
+ {
+ $response = $this->psr17Factory->createResponse(400)
+ ->withHeader('X-Elastic-Product', 'Elasticsearch')
+ ->withHeader('Content-Type', 'application/json');
+
+ $this->expectException(ClientResponseException::class);
+ $result = $this->asyncOnSuccess->success($response, 0);
+ }
+
+ public function testSuccessWith500ThrowServerResponseException()
+ {
+ $response = $this->psr17Factory->createResponse(500)
+ ->withHeader('X-Elastic-Product', 'Elasticsearch')
+ ->withHeader('Content-Type', 'application/json');
+
+ $this->expectException(ServerResponseException::class);
+ $result = $this->asyncOnSuccess->success($response, 0);
+ }
+}
\ No newline at end of file
diff --git a/tests/Elasticsearch/Tests/Utility.php b/tests/Utility.php
similarity index 95%
rename from tests/Elasticsearch/Tests/Utility.php
rename to tests/Utility.php
index dbef1094d..1f928fdbf 100644
--- a/tests/Elasticsearch/Tests/Utility.php
+++ b/tests/Utility.php
@@ -1,27 +1,23 @@
setHosts([self::getHost()]);
- $clientBuilder->setConnectionParams([
- 'client' => [
- 'headers' => [
- 'Accept' => []
- ]
- ]
- ]);
- $clientBuilder->setSSLVerification(false);
- return $clientBuilder->build();
+ return ClientBuilder::create()
+ ->setHosts([self::getHost()])
+ ->setBasicAuthentication('elastic', 'changeme')
+ ->setSSLVerification(false)
+ ->build();
}
/**
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
deleted file mode 100644
index 5b6593e1d..000000000
--- a/tests/bootstrap.php
+++ /dev/null
@@ -1,34 +0,0 @@
-namespace = $namespace;
- $this->version = $version;
- $this->buildhash = $buildhash;
- }
-
- public function renderClass(): string
- {
- if (empty($this->endpoints)) {
- throw new Exception("No endpoints has been added. I cannot render the class");
- }
- $class = file_get_contents(self::CLIENT_CLASS_TEMPLATE);
- // use Namespace
- $useNamespace = '';
- foreach ($this->namespace as $name) {
- if (empty($name)) {
- continue;
- }
- $useNamespace .= sprintf("use Elasticsearch\Namespaces\%sNamespace;\n", NamespaceEndpoint::normalizeName($name));
- }
- $class = str_replace(':use-namespaces', $useNamespace, $class);
-
- // new Namespace
- $newNamespace = '';
- foreach ($this->namespace as $name) {
- if (empty($name)) {
- continue;
- }
- $normNamespace = NamespaceEndpoint::normalizeName($name);
- $newName = file_get_contents(self::NEW_NAMESPACE_TEMPLATE);
- $newName = str_replace(':namespace',$normNamespace . 'Namespace', $newName);
- $newName = str_replace(':name', lcfirst($normNamespace), $newName);
- $newNamespace .= $newName;
- }
- $class = str_replace(':new-namespaces', $newNamespace, $class);
-
- // Properties
- $properties = '';
- foreach ($this->namespace as $name) {
- if (empty($name)) {
- continue;
- }
- $normNamespace = NamespaceEndpoint::normalizeName($name);
- $prop = file_get_contents(self::PROPERTY_CLASS_TEMPLATE);
- $prop = str_replace(':namespace', $normNamespace, $prop);
- $prop = str_replace(':var_namespace', lcfirst($normNamespace), $prop);
- $properties .= $prop . "\n";
- }
- $class = str_replace(':namespace_properties', $properties, $class);
-
- // Endpoints
- $endpoints = '';
- foreach ($this->endpoints as $endpoint) {
- $endpoints .= $this->renderEndpoint($endpoint);
- }
- $class = str_replace(':endpoints', $endpoints, $class);
-
- // Namespace functions
- $functions = '';
- foreach ($this->namespace as $name) {
- if (empty($name)) {
- continue;
- }
- $normNamespace = NamespaceEndpoint::normalizeName($name);
- $func = file_get_contents(self::NAMESPACE_FUNC_TEMPLATE);
- $func = str_replace(':namespace', $normNamespace . 'Namespace', $func);
- $func = str_replace(':name', lcfirst($normNamespace), $func);
- $functions .= $func;
- }
- $class = str_replace(':functions', $functions, $class);
- $class = str_replace(':version', $this->version, $class);
- $class = str_replace(':buildhash', $this->buildhash, $class);
-
- return $class;
- }
-}
diff --git a/util/Endpoint.php b/util/Endpoint.php
deleted file mode 100644
index 92a0efab7..000000000
--- a/util/Endpoint.php
+++ /dev/null
@@ -1,558 +0,0 @@
- 'NodeAttrs',
- 'Indices\Forcemerge' => 'ForceMerge',
- 'Mtermvectors' => 'MTermVectors',
- 'Termvectors' => 'TermVectors'
- ];
-
- public $namespace;
- public $name;
- public $apiName;
- protected $content;
- protected $version;
- protected $buildhash;
- protected $parts = [];
- protected $requiredParts = [];
- protected $useNamespace = [];
- private $addedPartInDoc = [];
- private $properties = [];
-
- /**
- * @param $fileName name of the file with the API specification
- * @param $content content of the API specification in JSON
- * @param $version Elasticsearch version of the API specification
- * @param $buildhash Elasticsearch build hash of the API specification
- */
- public function __construct(
- string $fileName,
- string $content,
- string $version,
- string $buildhash
- ) {
- $this->apiName = basename($fileName, '.json');
- $parts = explode('.', $this->apiName);
- if (count($parts) === 1) {
- $this->namespace = '';
- $this->name = $parts[0];
- } elseif (count($parts) === 2) {
- $this->namespace = $parts[0];
- $this->name = $parts[1];
- }
- try {
- $this->content = json_decode(
- $content,
- true,
- 512,
- JSON_THROW_ON_ERROR
- );
- } catch (JsonException $e) {
- throw new Exception(sprintf(
- "The content of the endpoint is not JSON: %s\n",
- $e->getMessage()
- ));
- }
- $this->content = $this->content[$this->apiName];
- $this->version = $version;
- $this->buildhash = $buildhash;
-
- $this->parts = $this->getPartsFromContent($this->content);
- $this->requiredParts = $this->getRequiredParts($this->content);
- }
-
- public function getParts(): array
- {
- return $this->parts;
- }
-
- private function getPartsFromContent(array $content): array
- {
- $parts = [];
- foreach ($content['url']['paths'] as $url) {
- if (isset($url['parts'])) {
- $parts = array_merge($parts, $url['parts']);
- }
- }
- return $parts;
- }
-
- private function getRequiredParts(array $content): array
- {
- $required = [];
- // Get the list of required parts
- foreach ($content['url']['paths'] as $path) {
- $required[] = isset($path['parts']) ? array_keys($path['parts']) : [];
- }
- if (count($required) > 1) {
- return call_user_func_array('array_intersect', $required);
- }
- return $required;
- }
-
- public function getDocUrl(): string
- {
- return $this->content['documentation']['url'] ?? '';
- }
-
- public function renderClass(): string
- {
- if (isset($this->content['body']['serialize']) &&
- $this->content['body']['serialize'] === 'bulk') {
- $class = file_get_contents(self::ENDPOINT_BULK_CLASS_TEMPLATE);
- } else {
- $class = file_get_contents(self::ENDPOINT_CLASS_TEMPLATE);
- }
- $class = str_replace(
- ':uri',
- $this->extractUrl($this->content['url']['paths']),
- $class
- );
- $class = str_replace(
- ':params',
- $this->extractParameters(),
- $class
- );
- $class = str_replace(
- ':namespace',
- $this->namespace === ''
- ? $this->normalizeName($this->namespace)
- : '\\' . $this->normalizeName($this->namespace),
- $class
- );
-
- // Set the HTTP method
- $action = $this->getMethod();
- if (!empty($this->content['body']) &&
- ($action === ['GET', 'POST'] || $action === ['POST', 'GET'])) {
- $method = 'isset($this->body) ? \'POST\' : \'GET\'';
- } else {
- $method = sprintf("'%s'", reset($action));
- }
- $class = str_replace(':method', $method, $class);
-
- $parts = '';
- // Set parts
- if (!empty($this->content['body'])) {
- if (isset($this->content['body']['serialize']) &&
- $this->content['body']['serialize'] === 'bulk') {
- $parts .= $this->getSetBulkBody();
- } else {
- $parts .= $this->getSetPart('body');
- }
- }
- foreach ($this->parts as $part => $value) {
- if (in_array($part, ['type', 'index', 'id'])) {
- continue;
- }
- if (isset($value['type']) && $value['type'] === 'list') {
- $parts .= $this->getSetPartList($part);
- } else {
- $parts .= $this->getSetPart($part);
- }
- }
- $class = str_replace(':set-parts', $parts, $class);
- $class = str_replace(':endpoint', $this->getClassName(), $class);
- $class = str_replace(':version', $this->version, $class);
- $class = str_replace(':buildhash', $this->buildhash, $class);
- $class = str_replace(':use-namespace', $this->getNamespaces(), $class);
- $class = str_replace(':properties', $this->getProperties(), $class);
-
- return str_replace(':apiname', $this->apiName, $class);
- }
-
- public function getMethod(): array
- {
- $methods = $this->content['url']['paths'][0]['methods'];
- foreach ($this->content['url']['paths'] as $path) {
- $methods = array_intersect($methods, $path['methods']);
- }
- return $methods;
- }
-
- private function extractParameters(): string
- {
- if (!isset($this->content['params'])) {
- return '';
- }
- $tab12 = str_repeat(' ', 12);
- $tab8 = str_repeat(' ', 8);
- $result = '';
- foreach (array_keys($this->content['params']) as $param) {
- $result .= "'$param',\n" . $tab12;
- }
- return "\n". $tab12 . rtrim(trim($result), ',') . "\n". $tab8;
- }
-
- private function getDeprecatedMessage(string $part): string
- {
- foreach ($this->content['url']['paths'] as $path) {
- if (isset($path['parts'][$part]) && isset($path['parts'][$part]['deprecated']) &&
- $path['parts'][$part]['deprecated']) {
- return $path['deprecated']['description'] ?? '';
- }
- }
- return '';
- }
-
- private function extractUrl(array $paths): string
- {
- $skeleton = file_get_contents(self::REQUIRED_PART_TEMPLATE);
- $checkPart = '';
- $params = '';
- $deprecated = '';
-
- $tab8 = str_repeat(' ', 8);
- $tab12 = str_repeat(' ', 12);
-
- if (!empty($this->parts)) {
- foreach ($this->parts as $part => $value) {
- if (in_array($part, $this->requiredParts)) {
- $checkPart .= str_replace(
- ':endpoint',
- $this->name,
- str_replace(':part', $part, $skeleton)
- );
- $this->addNamespace('Elasticsearch\Common\Exceptions\RuntimeException');
- } else {
- $params .= sprintf("%s\$%s = \$this->%s ?? null;\n", $tab8, $part, $part);
- }
- if ($part === 'type') {
- $deprecated .= str_replace(
- ':msg',
- 'Specifying types in urls has been deprecated',
- str_replace(':part', $part, file_get_contents(self::DEPRECATED_PART))
- );
- } elseif (isset($value['deprecated']) && $value['deprecated']) {
- $deprecated .= str_replace(
- ':msg',
- $this->getDeprecatedMessage($part),
- str_replace(':part', $part, file_get_contents(self::DEPRECATED_PART))
- );
- }
- }
- }
- $else = '';
- $urls = '';
- // Extract the paths to manage (removing deprecated path, duplicate, etc)
- $pathsToManage = $this->extractPaths($paths);
-
- $lastUrlReturn = false;
- foreach ($pathsToManage as $path) {
- $parts = $this->getPartsFromUrl($path);
- if (empty($parts)) {
- $else = sprintf("\n%sreturn \"%s\";", $tab8, $path);
- $lastUrlReturn = true;
- continue;
- }
- $check = '';
- if (!in_array($parts[0], $this->requiredParts)) {
- $check = sprintf("isset(\$%s)", $parts[0]);
- }
- $url = str_replace('{' . $parts[0] .'}', '$' . $parts[0], $path);
- for ($i=1; $irequiredParts)) {
- continue;
- }
- $check .= sprintf("%sisset(\$%s)", empty($check) ? '' : ' && ', $parts[$i]);
- }
- // Fix for missing / at the beginning of URL
- // @see https://github.com/elastic/elasticsearch-php/pull/970
- if ($url[0] !== '/') {
- $url = '/' . $url;
- }
- if (empty($check)) {
- $urls .= sprintf("\n%sreturn \"%s\";", $tab8, $url);
- $lastUrlReturn = true;
- } else {
- $urls .= sprintf("\n%sif (%s) {\n%sreturn \"%s\";\n%s}", $tab8, $check, $tab12, $url, $tab8);
- }
- }
- if (!$lastUrlReturn) {
- $urls .= sprintf(
- "\n%sthrow new RuntimeException('Missing parameter for the endpoint %s');",
- $tab8,
- $this->apiName
- );
- $this->addNamespace('Elasticsearch\Common\Exceptions\RuntimeException');
- }
- return $checkPart . $params . $deprecated . $urls . $else;
- }
-
- private function removePathWithSameParts(array $paths): array
- {
- $urls = [];
- $parsed = [];
- foreach ($paths as $path) {
- if (!isset($path['parts'])) {
- $urls[] = $path['path'];
- continue;
- }
- $parts = array_keys($path['parts']);
- $exist = false;
- foreach ($parsed as $parse) {
- if ($parts == $parse) {
- $exist = true;
- break;
- }
- }
- if (!$exist) {
- $urls[] = $path['path'];
- $parsed[] = $parts;
- };
- }
- return $urls;
- }
-
- private function extractPaths(array $paths): array
- {
- $urls = $this->removePathWithSameParts($paths);
- // Order the url based on descendant length
- usort($urls, function($a,$b){
- return strlen($b)-strlen($a);
- });
-
- return $urls;
- }
-
- private function getPartsFromUrl(string $url): array
- {
- preg_match_all('#\{([a-z_]+)\}#', $url, $match);
- return $match[1];
- }
-
- private function addNamespace(string $namespace): void
- {
- $this->useNamespace[$namespace] = sprintf("use %s;", $namespace);
- }
-
- private function getNamespaces(): string
- {
- if (empty($this->useNamespace)) {
- return '';
- }
- return "\n" . implode("\n", $this->useNamespace);
- }
-
- private function getSetPartList(string $param): string
- {
- $setPart = file_get_contents(self::SET_PART_LIST_TEMPLATE);
- $setPart = str_replace(':endpoint', $this->getClassName(), $setPart);
- $setPart = str_replace(':part', $param, $setPart);
- $this->addProperty($param);
- return str_replace(':Part', $this->normalizeName($param), $setPart);
- }
-
- private function getSetPart(string $param): string
- {
- $setPart = file_get_contents(self::SET_PART_TEMPLATE);
- $setPart = str_replace(':endpoint', $this->getClassName(), $setPart);
- $setPart = str_replace(':part', $param, $setPart);
- $this->addProperty($param);
- return str_replace(':Part', $this->normalizeName($param), $setPart);
- }
-
- private function getSetBulkBody(): string
- {
- $setPart = file_get_contents(self::SET_BULK_BODY_TEMPLATE);
- $this->addNamespace('Elasticsearch\Common\Exceptions\InvalidArgumentException');
-
- return str_replace(':endpoint', $this->getClassName(), $setPart);
- }
-
- protected function addProperty(string $name)
- {
- if (!in_array($name, ['body', 'type', 'index', 'id'])) {
- $this->properties[$name] = sprintf(" protected \$%s;", $name);
- }
- }
-
- protected function getProperties(): string
- {
- if (empty($this->properties)) {
- return '';
- }
- return implode("\n", $this->properties) . "\n";
- }
-
- protected function normalizeName(string $name): string
- {
- return str_replace('_', '', ucwords($name, '_'));
- }
-
- public function getClassName(): string
- {
- if (in_array(strtolower($this->name), static::PHP_RESERVED_WORDS)) {
- return $this->normalizeName($this->name . ucwords($this->namespace));
- }
- $normalizedName = $this->normalizeName($this->name);
- $normalizedFullName = empty($this->namespace) ? $normalizedName : ucwords($this->namespace) . '\\' . $normalizedName;
-
- return static::BC_CLASS_NAME[$normalizedFullName] ?? $normalizedName;
- }
-
- public function renderDocParams(): string
- {
- $space = $this->getMaxLengthBodyPartsParams();
-
- $result = "\n /**\n";
- if (isset($this->content['documentation']['description'])) {
- $result .= sprintf(" * %s\n", str_replace("\n", '', $this->content['documentation']['description']));
- $result .= " *\n";
- }
- $result .= $this->extractPartsDescription($space);
- $result .= $this->extractParamsDescription($space);
- $result .= $this->extractBodyDescription($space);
- $result .= " *\n";
- $result .= " * @param array \$params Associative array of parameters\n";
- $result .= sprintf(" * @return %s\n", $this->getMethod() === ['HEAD'] ? 'bool' : 'array');
-
- if (isset($this->content['documentation']['url'])) {
- $result .= " * @see {$this->content['documentation']['url']}\n";
- }
- if ($this->content['stability'] !== 'stable') {
- switch ($this->content['stability']) {
- case 'experimental':
- $note = 'This API is EXPERIMENTAL and may be changed or removed completely in a future release';
- break;
- case 'beta':
- $note = 'This API is BETA and may change in ways that are not backwards compatible';
- break;
- }
- if (isset($note)) {
- $result .= sprintf(" *\n * @note %s\n *\n", $note);
- }
- }
- $result .= " */";
-
- return $result;
- }
-
- private function extractBodyDescription(int $space): string
- {
- if (isset($this->content['body']) && isset($this->content['body']['description'])) {
- return sprintf(
- " * \$params['body']%s = (array) %s%s\n",
- str_repeat(' ', $space - 4),
- $this->content['body']['description'],
- isset($this->content['body']['required']) && $this->content['body']['required'] ? ' (Required)' : ''
- );
- }
- return '';
- }
-
- private function extractPartsDescription(int $space): string
- {
- $result = '';
- if (empty($this->parts)) {
- return $result;
- }
- foreach ($this->parts as $part => $values) {
- $result .= sprintf(
- " * \$params['%s']%s = %s(%s) %s%s\n",
- $part,
- str_repeat(' ', $space - strlen($part)),
- $part ==='type' || (isset($values['deprecated']) && $values['deprecated']) ? 'DEPRECATED ' : '',
- $values['type'],
- $values['description'] ?? '',
- in_array($part, $this->requiredParts) ? ' (Required)' : ''
- );
- $this->addedPartInDoc[] = $part;
- }
- return $result;
- }
-
- private function extractParamsDescription(int $space): string
- {
- $result = '';
- if (!isset($this->content['params'])) {
- return $result;
- }
- foreach ($this->content['params'] as $param => $values) {
- if (in_array($param, $this->addedPartInDoc)) {
- continue;
- }
- $result .= sprintf(
- " * \$params['%s']%s = (%s) %s%s%s%s\n",
- $param,
- str_repeat(' ', $space - strlen($param)),
- $values['type'],
- $values['description'] ?? '',
- isset($values['required']) && $values['required'] ? ' (Required)' : '',
- isset($values['options']) ? sprintf(" (Options = %s)", implode(',', $values['options'])) : '',
- isset($values['default']) ? sprintf(" (Default = %s)", $values['type'] === 'boolean' ? ($values['default'] ? 'true' : 'false') : (is_array($values['default']) ? implode(',', $values['default']) : $values['default'])) : ''
- );
- }
- return $result;
- }
-
- private function getMaxLengthBodyPartsParams(): int
- {
- $max = isset($this->content['body']) ? 4 : 0;
- if (!empty($this->parts)) {
- foreach ($this->parts as $name => $value) {
- $len = strlen($name);
- if ($len > $max) {
- $max = $len;
- }
- }
- }
- if (!empty($this->content['params'])) {
- foreach ($this->content['params'] as $name => $value) {
- $len = strlen($name);
- if ($len > $max) {
- $max = $len;
- }
- }
- }
- return $max;
- }
-
- public function isBodyNull(): bool
- {
- return empty($this->content['body']);
- }
-}
diff --git a/util/GenerateEndpoints.php b/util/GenerateEndpoints.php
deleted file mode 100644
index cbea6c88a..000000000
--- a/util/GenerateEndpoints.php
+++ /dev/null
@@ -1,277 +0,0 @@
-info();
-} catch (NoNodesAvailableException $e) {
- printf ("ERROR: Host %s is offline\n", Utility::getHost());
- exit(1);
-}
-$version = $serverInfo['version']['number'];
-$buildHash = $serverInfo['version']['build_hash'];
-
-if (version_compare($version, '7.4.0', '<')) {
- printf("Error: the ES version must be >= 7.4.0\n");
- exit(1);
-}
-
-$backupFileName = sprintf(
- "%s/backup_endpoint_namespace_%s.zip",
- __DIR__,
- Client::VERSION
-);
-
-printf ("Backup Endpoints and Namespaces in:\n%s\n", $backupFileName);
-backup($backupFileName);
-
-$start = microtime(true);
-printf ("Generating endpoints for Elasticsearch\n");
-
-$success = true;
-// Check if the rest-spec folder with the build hash exists
-if (!is_dir(sprintf("%s/rest-spec/%s", __DIR__, $buildHash))) {
- printf("ERROR: I cannot find the rest-spec for build hash %s\n", $buildHash);
- printf("You need to execute 'php util/RestSpecRunner.php'\n");
- exit(1);
-}
-
-$files = glob(sprintf("%s/rest-spec/%s/rest-api-spec/api/*.json", __DIR__, $buildHash));
-
-$outputDir = __DIR__ . "/output";
-if (!file_exists($outputDir)) {
- mkdir($outputDir);
-}
-
-$endpointDir = "$outputDir/Endpoints/";
-if (!file_exists($endpointDir)) {
- mkdir($endpointDir);
-}
-
-$countEndpoint = 0;
-$namespaces = [];
-
-// Generate endpoints
-foreach ($files as $file) {
- if (empty($file) || (basename($file) === '_common.json')) {
- continue;
- }
- printf("Generating %s...", basename($file));
-
- $endpoint = new Endpoint($file, file_get_contents($file), $version, $buildHash);
-
- $dir = $endpointDir . NamespaceEndpoint::normalizeName($endpoint->namespace);
- if (!file_exists($dir)) {
- mkdir($dir);
- }
- $outputFile = sprintf("%s/%s.php", $dir, $endpoint->getClassName());
- file_put_contents(
- $outputFile,
- $endpoint->renderClass()
- );
- if (!isValidPhpSyntax($outputFile)) {
- printf("Error: syntax error in %s\n", $outputFile);
- exit(1);
- }
-
- printf("done\n");
-
- $namespaces[$endpoint->namespace][] = $endpoint;
- $countEndpoint++;
-}
-
-// Generate namespaces
-$namespaceDir = "$outputDir/Namespaces/";
-if (!file_exists($namespaceDir)) {
- mkdir($namespaceDir);
-}
-
-$countNamespace = 0;
-$clientFile = "$outputDir/Client.php";
-
-foreach ($namespaces as $name => $endpoints) {
- if (empty($name)) {
- $clientEndpoint = new ClientEndpoint(array_keys($namespaces), $version, $buildHash);
- foreach ($endpoints as $ep) {
- $clientEndpoint->addEndpoint($ep);
- }
- file_put_contents(
- $clientFile,
- $clientEndpoint->renderClass()
- );
- if (!isValidPhpSyntax($clientFile)) {
- printf("Error: syntax error in %s\n", $clientFile);
- exit(1);
- }
- $countNamespace++;
- continue;
- }
- $namespace = new NamespaceEndpoint($name, $version, $buildHash);
- foreach ($endpoints as $ep) {
- $namespace->addEndpoint($ep);
- }
- $namespaceFile = $namespaceDir . $namespace->getNamespaceName() . 'Namespace.php';
- file_put_contents(
- $namespaceFile,
- $namespace->renderClass()
- );
- if (!isValidPhpSyntax($namespaceFile)) {
- printf("Error: syntax error in %s\n", $namespaceFile);
- exit(1);
- }
- $countNamespace++;
-}
-
-$destDir = __DIR__ . "/../src/Elasticsearch";
-
-printf("Copying the generated files to %s\n", $destDir);
-cleanFolders();
-moveSubFolder($outputDir . "/Endpoints", $destDir . "/Endpoints");
-moveSubFolder($outputDir . "/Namespaces", $destDir . "/Namespaces");
-rename($outputDir . "/Client.php", $destDir . "/Client.php");
-
-$end = microtime(true);
-printf("\nGenerated %d endpoints and %d namespaces in %.3f seconds\n", $countEndpoint, $countNamespace, $end - $start);
-printf("\n");
-
-removeDirectory($outputDir);
-
-/**
- * ---------------------------------- FUNCTIONS ----------------------------------
- */
-
-/**
- * Remove a directory recursively
- */
-function removeDirectory($directory, array $omit = [])
-{
- foreach(glob("{$directory}/*") as $file)
- {
- if(is_dir($file)) {
- if (!in_array($file, $omit)) {
- removeDirectory($file, $omit);
- }
- } else {
- if (!in_array($file, $omit)) {
- @unlink($file);
- }
- }
- }
- if (is_dir($directory)) {
- @rmdir($directory);
- }
-}
-
-/**
- * Remove Endpoints, Namespaces and Client in src/Elasticsearch
- */
-function cleanFolders()
-{
- removeDirectory(__DIR__ . '/../src/Elasticsearch/Endpoints', [
- __DIR__ . '/../src/Elasticsearch/Endpoints/AbstractEndpoint.php',
- ]);
- removeDirectory(__DIR__ . '/../src/Elasticsearch/Namespaces', [
- __DIR__ . '/../src/Elasticsearch/Namespaces/AbstractNamespace.php',
- __DIR__ . '/../src/Elasticsearch/Namespaces/BooleanRequestWrapper.php',
- __DIR__ . '/../src/Elasticsearch/Namespaces/NamespaceBuilderInterface.php'
- ]);
- @unlink(__DIR__ . '/../src/Elasticsearch/Client.php');
-}
-
-/**
- * Move subfolder
- */
-function moveSubFolder(string $origin, string $destination)
-{
- foreach (glob("{$origin}/*") as $file) {
- rename($file, $destination . "/" . basename($file));
- }
-}
-
-/**
- * Backup Endpoints, Namespaces and Client in src/Elasticsearch
- */
-function backup(string $fileName)
-{
- $zip = new ZipArchive();
- $result = $zip->open($fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE);
- if ($result !== true) {
- printf("Error opening the zip file %s: %s\n", $fileName, $result);
- exit(1);
- } else {
- $zip->addFile(__DIR__ . '/../src/Elasticsearch/Client.php', 'Client.php');
- $zip->addGlob(__DIR__ . '/../src/Elasticsearch/Namespaces/*.php', GLOB_BRACE, [
- 'remove_path' => __DIR__ . '/../src/Elasticsearch'
- ]);
- // Add the Endpoints (including subfolders)
- foreach(glob(__DIR__ . '/../src/Elasticsearch/Endpoints/*') as $file) {
- if (is_dir($file)) {
- $zip->addGlob("$file/*.php", GLOB_BRACE, [
- 'remove_path' => __DIR__ . '/../src/Elasticsearch'
- ]);
- } else {
- $zip->addGlob("$file", GLOB_BRACE, [
- 'remove_path' => __DIR__ . '/../src/Elasticsearch'
- ]);
- }
- }
- $zip->close();
- }
-}
-
-/**
- * Restore Endpoints, Namespaces and Client in src/Elasticsearch
- */
-function restore(string $fileName)
-{
- $zip = new ZipArchive();
- $result = $zip->open($fileName);
- if ($result !== true) {
- printf("Error opening the zip file %s: %s\n", $fileName, $result);
- exit(1);
- }
- $zip->extractTo(__DIR__ . '/../src/Elasticsearch');
- $zip->close();
-}
-
-/**
- * Check if the generated code has a valid PHP syntax
- */
-function isValidPhpSyntax(string $filename): bool
-{
- if (file_exists($filename)) {
- $result = exec("php -l $filename");
- return false !== strpos($result, "No syntax errors");
- }
- return false;
-}
\ No newline at end of file
diff --git a/util/NamespaceEndpoint.php b/util/NamespaceEndpoint.php
deleted file mode 100644
index 7486646ff..000000000
--- a/util/NamespaceEndpoint.php
+++ /dev/null
@@ -1,173 +0,0 @@
-name = $name;
- $this->version = $version;
- $this->buildhash = $buildhash;
- }
-
- public function renderClass(): string
- {
- if (empty($this->endpoints)) {
- throw new Exception("No endpoints has been added. I cannot render the class");
- }
- $class = file_get_contents(static::NAMESPACE_CLASS_TEMPLATE);
- $class = str_replace(':namespace', $this->getNamespaceName() . 'Namespace', $class);
-
- $endpoints = '';
- foreach ($this->endpoints as $endpoint) {
- $endpoints .= $this->renderEndpoint($endpoint);
- }
- // Fix for BC in 7.2.0
- switch ($this->name) {
- case 'indices':
- $endpoints .= $this->getAliasesProxy();
- break;
- case 'tasks':
- $endpoints .= $this->tasksListProxy();
- break;
- }
- $class = str_replace(':endpoints', $endpoints, $class);
- $class = str_replace(':version', $this->version, $class);
- $class = str_replace(':buildhash', $this->buildhash, $class);
-
- return $class;
- }
-
- public function addEndpoint(Endpoint $endpoint): NamespaceEndpoint
- {
- if (in_array($endpoint->name, $this->endpointNames)) {
- throw new Exception(sprintf(
- "The endpoint %s has been already added",
- $endpoint->namespace
- ));
- }
- $this->endpoints[] = $endpoint;
- $this->endpointNames[] = $endpoint->name;
-
- return $this;
- }
-
- protected function renderEndpoint(Endpoint $endpoint): string
- {
- $code = file_get_contents(
- $endpoint->getMethod() === ['HEAD']
- ? self::ENDPOINT_FUNCTION_BOOL_TEMPLATE
- : self::ENDPOINT_FUNCTION_TEMPLATE
- );
-
- $code = str_replace(':apidoc', $endpoint->renderDocParams(), $code);
- $code = str_replace(':endpoint', $this->getEndpointName($endpoint->name), $code);
-
- $extract = '';
- $setParams = '';
- foreach ($endpoint->getParts() as $part => $value) {
- $extract .= str_replace(':part', $part, file_get_contents(self::EXTRACT_ARG_TEMPLATE));
-
- $param = str_replace(':param', $part, file_get_contents(self::SET_PARAM_TEMPLATE));
-
- $setParams .= str_replace(':Param', $this->normalizeName($part), $param);
- }
- if (!$endpoint->isBodyNull()) {
- $extract .= str_replace(':part', 'body', file_get_contents(self::EXTRACT_ARG_TEMPLATE));
-
- $param = str_replace(':param', 'body', file_get_contents(self::SET_PARAM_TEMPLATE));
- $setParams .= str_replace(':Param', 'Body', $param);
- }
- $code = str_replace(':extract', $extract, $code);
- $code = str_replace(':setparam', $setParams, $code);
-
- if (empty($endpoint->namespace)) {
- $endpointClass = $endpoint->getClassName();
- } else {
- $endpointClass = NamespaceEndpoint::normalizeName($endpoint->namespace) . '\\' . $endpoint->getClassName();
- }
- return str_replace(':EndpointClass', $endpointClass, $code);
- }
-
- public static function normalizeName(string $name): string
- {
- return str_replace('_', '', ucwords($name, '_'));
- }
-
- public function getNamespaceName(): string
- {
- return $this->normalizeName($this->name);
- }
-
- protected function getEndpointName(string $name): string
- {
- return preg_replace_callback(
- '/_(.?)/',
- function ($matches) {
- return strtoupper($matches[1]);
- },
- $name
- );
- }
-
- protected function getAliasesProxy(): string
- {
- return <<<'EOD'
-
- /**
- * Alias function to getAlias()
- *
- * @deprecated added to prevent BC break introduced in 7.2.0
- * @see https://github.com/elastic/elasticsearch-php/issues/940
- */
- public function getAliases(array $params = [])
- {
- return $this->getAlias($params);
- }
-EOD;
- }
-
- protected function tasksListProxy(): string
- {
- return <<<'EOD'
-
- /**
- * Proxy function to list() to prevent BC break since 7.4.0
- */
- public function tasksList(array $params = [])
- {
- return $this->list($params);
- }
-EOD;
- }
-}
diff --git a/util/RestSpecRunner.php b/util/RestSpecRunner.php
index 46f4db765..b76d854e8 100644
--- a/util/RestSpecRunner.php
+++ b/util/RestSpecRunner.php
@@ -16,8 +16,8 @@
declare(strict_types = 1);
-use Elasticsearch\Common\Exceptions\NoNodesAvailableException;
-use Elasticsearch\Tests\Utility;
+use Elastic\Transport\Exception\NoNodeAvailableException;
+use Elastic\Elasticsearch\Tests\Utility;
// Set the default timezone. While this doesn't cause any tests to fail, PHP
// complains if it is not set in 'date.timezone' of php.ini.
@@ -41,8 +41,8 @@
printf ("Getting the Elasticsearch build_hash:\n");
try {
$serverInfo = $client->info();
- print_r($serverInfo);
-} catch (NoNodesAvailableException $e) {
+ print_r($serverInfo->asArray());
+} catch (NoNodeAvailableException $e) {
printf ("ERROR: Host %s is offline\n", Utility::getHost());
exit(1);
}
diff --git a/util/YamlTests.php b/util/YamlTests.php
index 4eb6eefe1..52b0dc09c 100644
--- a/util/YamlTests.php
+++ b/util/YamlTests.php
@@ -15,9 +15,8 @@
declare(strict_types = 1);
-namespace Elasticsearch\Util;
+namespace Elastic\Elasticsearch\Util;
-use Elasticsearch\Util\ActionTest;
use Exception;
use ParseError;
use RecursiveDirectoryIterator;
@@ -225,7 +224,7 @@ public function build(): array
$test = self::render(
self::TEMPLATE_UNIT_TEST_SKIPPED,
[
- ':namespace' => sprintf("Elasticsearch\Tests\Yaml\%s\%s", self::$testSuite, $namespace),
+ ':namespace' => sprintf("Elastic\Elasticsearch\Tests\Yaml\%s\%s", self::$testSuite, $namespace),
':test-name' => $testName,
':tests' => $functions,
':yamlfile' => sprintf(self::ELASTICSEARCH_GIT_URL, self::$minorEsVersion, $yamlFileName),
@@ -238,7 +237,7 @@ public function build(): array
? self::TEMPLATE_UNIT_TEST_OSS
: self::TEMPLATE_UNIT_TEST_XPACK,
[
- ':namespace' => sprintf("Elasticsearch\Tests\Yaml\%s\%s", self::$testSuite, $namespace),
+ ':namespace' => sprintf("Elastic\Elasticsearch\Tests\Yaml\%s\%s", self::$testSuite, $namespace),
':test-name' => $testName,
':tests' => $functions,
':setup' => $setup,
diff --git a/util/add_header.pl b/util/add_header.pl
deleted file mode 100644
index 9e4c27226..000000000
--- a/util/add_header.pl
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-use File::Find;
-use File::Basename;
-use File::Slurp;
-use Cwd qw(abs_path);
-use v5.12;
-
-my $root = dirname(abs_path(__FILE__ . '/..'));
-
-my @dir_to_search = (
- $root . '/src',
- $root . '/util',
- $root . '/tests'
-);
-
-my $header = < 1} @suffix;
-
-say "SEARCH for PHP files...";
-find(\&add_header, @dir_to_search);
-say "END";
-
-sub add_header {
- my ($filename, $dirs, $suffix) = fileparse($File::Find::name, @suffix);
-
- return if !$hash{$suffix};
-
- my $file_content = read_file($File::Find::name);
- if (index($file_content, $header) == -1) {
- printf("\tAdding header to %s\n", $File::Find::name);
-
- my @phpdoc_to_remove = (
- 'author',
- 'category',
- 'package',
- 'license',
- 'link',
- );
-
- # Remove previous @phpdocumentor tag
- foreach my $tag ( @phpdoc_to_remove ) {
- $file_content =~ s/\s\*\s\@$tag.*\n//g;
- }
- # Insert the $header at the top of the file
- $file_content =~ s/<\?php/<\?php\n$header/;
-
- write_file($File::Find::name, $file_content);
- }
-}
\ No newline at end of file
diff --git a/util/alternatives_report.spec.json b/util/alternatives_report.spec.json
deleted file mode 100644
index 750464239..000000000
--- a/util/alternatives_report.spec.json
+++ /dev/null
@@ -1,78246 +0,0 @@
-[
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 167
- },
- "digest": "f8cc4b331a19ff4df8e4a490f906ee69",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cat/health?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 251
- },
- "digest": "311c4b632a29b9ead63b02d01f10096b",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /customer/_doc/1\n{\n \"name\": \"John Doe\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/customer/_doc/1",
- "query": null,
- "body": {
- "name": "John Doe"
- },
- "params": {
- "index": "customer",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 266
- },
- "digest": "2f3590ba3141cbe0c766bd6e7c1bf5f1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"customer\",\n \"_id\" : \"1\",\n \"_version\" : 1,\n \"result\" : \"created\",\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 2,\n \"failed\" : 0\n },\n \"_seq_no\" : 26,\n \"_primary_term\" : 4\n}"
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 290
- },
- "digest": "3f3b3e207f79303ce6f86e03e928e062",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /customer/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/customer/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "customer",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 299
- },
- "digest": "6e62b5dec4c82e5dfb37df8473c84998",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"customer\",\n \"_id\" : \"1\",\n \"_version\" : 1,\n \"_seq_no\" : 26,\n \"_primary_term\" : 4,\n \"found\" : true,\n \"_source\" : {\n \"name\": \"John Doe\"\n }\n}"
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 392
- },
- "digest": "506844befdc5691d835771bcbb1c1a60",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": { \"match_all\": {} },\n \"sort\": [\n { \"account_number\": \"asc\" }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "sort": [
- {
- "account_number": "asc"
- }
- ]
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 407
- },
- "digest": "d12b87347bfd1270258ed9bafb232842",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 63,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 5,\n \"successful\" : 5,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\": 1000,\n \"relation\": \"eq\"\n },\n \"max_score\" : null,\n \"hits\" : [ {\n \"_index\" : \"bank\",\n \"_id\" : \"0\",\n \"sort\": [0],\n \"_score\" : null,\n \"_source\" : {\"account_number\":0,\"balance\":16623,\"firstname\":\"Bradshaw\",\"lastname\":\"Mckenzie\",\"age\":29,\"gender\":\"F\",\"address\":\"244 Columbus Place\",\"employer\":\"Euron\",\"email\":\"bradshawmckenzie@euron.com\",\"city\":\"Hobucken\",\"state\":\"CO\"}\n }, {\n \"_index\" : \"bank\",\n \"_id\" : \"1\",\n \"sort\": [1],\n \"_score\" : null,\n \"_source\" : {\"account_number\":1,\"balance\":39225,\"firstname\":\"Amber\",\"lastname\":\"Duke\",\"age\":32,\"gender\":\"M\",\"address\":\"880 Holmes Lane\",\"employer\":\"Pyrami\",\"email\":\"amberduke@pyrami.com\",\"city\":\"Brogan\",\"state\":\"IL\"}\n }, ...\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 461
- },
- "digest": "4b90feb9d5d3dbfce424dac0341320b7",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": { \"match_all\": {} },\n \"sort\": [\n { \"account_number\": \"asc\" }\n ],\n \"from\": 10,\n \"size\": 10\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "sort": [
- {
- "account_number": "asc"
- }
- ],
- "from": 10,
- "size": 10
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 482
- },
- "digest": "cd247f267968aa0927bfdad56852f8f5",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": { \"match\": { \"address\": \"mill lane\" } }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "address": "mill lane"
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 495
- },
- "digest": "231aa0bb39c35fe199d28fe0e4a62b2e",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": { \"match_phrase\": { \"address\": \"mill lane\" } }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "address": "mill lane"
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 512
- },
- "digest": "47bb632c6091ad0cd94bc660bdd309a5",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": [\n { \"match\": { \"age\": \"40\" } }\n ],\n \"must_not\": [\n { \"match\": { \"state\": \"ID\" } }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "age": "40"
- }
- }
- ],
- "must_not": [
- {
- "match": {
- "state": "ID"
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 544
- },
- "digest": "251ea12c1248385ab409906ac64d9ee9",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": { \"match_all\": {} },\n \"filter\": {\n \"range\": {\n \"balance\": {\n \"gte\": 20000,\n \"lte\": 30000\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "range": {
- "balance": {
- "gte": 20000,
- "lte": 30000
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 578
- },
- "digest": "feefeb68144002fd1fff57b77b95b85e",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"group_by_state\": {\n \"terms\": {\n \"field\": \"state.keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "group_by_state": {
- "terms": {
- "field": "state.keyword"
- }
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 599
- },
- "digest": "741af8f842967afbb493f133e34a3b0d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 29,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 5,\n \"successful\": 5,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\": 1000,\n \"relation\": \"eq\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"group_by_state\" : {\n \"doc_count_error_upper_bound\": 20,\n \"sum_other_doc_count\": 770,\n \"buckets\" : [ {\n \"key\" : \"ID\",\n \"doc_count\" : 27\n }, {\n \"key\" : \"TX\",\n \"doc_count\" : 27\n }, {\n \"key\" : \"AL\",\n \"doc_count\" : 25\n }, {\n \"key\" : \"MD\",\n \"doc_count\" : 25\n }, {\n \"key\" : \"TN\",\n \"doc_count\" : 23\n }, {\n \"key\" : \"MA\",\n \"doc_count\" : 21\n }, {\n \"key\" : \"NC\",\n \"doc_count\" : 21\n }, {\n \"key\" : \"ND\",\n \"doc_count\" : 21\n }, {\n \"key\" : \"ME\",\n \"doc_count\" : 20\n }, {\n \"key\" : \"MO\",\n \"doc_count\" : 20\n } ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 665
- },
- "digest": "cfbaea6f0df045c5d940bbb6a9c69cd8",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"group_by_state\": {\n \"terms\": {\n \"field\": \"state.keyword\"\n },\n \"aggs\": {\n \"average_balance\": {\n \"avg\": {\n \"field\": \"balance\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "group_by_state": {
- "terms": {
- "field": "state.keyword"
- },
- "aggs": {
- "average_balance": {
- "avg": {
- "field": "balance"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 691
- },
- "digest": "645796e8047967ca4a7635a22a876f4c",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"group_by_state\": {\n \"terms\": {\n \"field\": \"state.keyword\",\n \"order\": {\n \"average_balance\": \"desc\"\n }\n },\n \"aggs\": {\n \"average_balance\": {\n \"avg\": {\n \"field\": \"balance\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "group_by_state": {
- "terms": {
- "field": "state.keyword",
- "order": {
- "average_balance": "desc"
- }
- },
- "aggs": {
- "average_balance": {
- "avg": {
- "field": "balance"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/secure-settings.asciidoc",
- "line": 35
- },
- "digest": "32732207b66d0fd661e8e7638aef5176",
- "lang": "console",
- "found": [],
- "source": "POST _nodes/reload_secure_settings\n{\n \"reload_secure_settings\": \"s3cr3t\" <1>\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_nodes/reload_secure_settings",
- "query": null,
- "body": {
- "reload_secure_settings": "s3cr3t"
- },
- "params": null,
- "api": "nodes.reload_secure_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/logging-config.asciidoc",
- "line": 155
- },
- "digest": "8e6bfb4441ffa15c86d5dc20fa083571",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT /_cluster/settings\n{\n \"transient\": {\n \"logger.org.elasticsearch.transport\": \"trace\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "logger.org.elasticsearch.transport": "trace"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/sysconfig/swap.asciidoc",
- "line": 71
- },
- "digest": "ed250b74bc77c15bb794f55a12d762c3",
- "lang": "console",
- "found": [],
- "source": "GET _nodes?filter_path=**.mlockall",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes",
- "query": {
- "filter_path": "**.mlockall"
- },
- "body": null,
- "params": null,
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/sysconfig/file-descriptors.asciidoc",
- "line": 29
- },
- "digest": "c5bc577ff92f889225b0d2617adcb48c",
- "lang": "console",
- "found": [],
- "source": "GET _nodes/stats/process?filter_path=**.max_file_descriptors",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/process",
- "query": {
- "filter_path": "**.max_file_descriptors"
- },
- "body": null,
- "params": {
- "metric": "process"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 30
- },
- "digest": "1cd3b9d65576a9212eef898eb3105758",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": \"primaries\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": "primaries"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 30
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 50
- },
- "digest": "a21a7bf052b41f5b996dc58f7b69770f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 89
- },
- "digest": "c0a4b0c1c6eff14da8b152ceb19c1c31",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "GET _cat/health\n\nGET _cat/nodes",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.health"
- },
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 123
- },
- "digest": "45ef5156dbd2d3fd4fd22b8d99f7aad4",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 143
- },
- "digest": "2d9b30acd6b5683f39d53494c0dd779c",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "GET _cat/health\n\nGET _cat/recovery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.health"
- },
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 158
- },
- "digest": "3c5d5a5c34a62724942329658c688f5e",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 30
- },
- "digest": "1cd3b9d65576a9212eef898eb3105758",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": \"primaries\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": "primaries"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 30
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 50
- },
- "digest": "a21a7bf052b41f5b996dc58f7b69770f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 204
- },
- "digest": "7e49705769c42895fb7b1e2ca028ff47",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "GET _cat/nodes",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 218
- },
- "digest": "45ef5156dbd2d3fd4fd22b8d99f7aad4",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 158
- },
- "digest": "3c5d5a5c34a62724942329658c688f5e",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 46
- },
- "digest": "1cd3b9d65576a9212eef898eb3105758",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": \"primaries\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": "primaries"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 47
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 82
- },
- "digest": "a21a7bf052b41f5b996dc58f7b69770f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 97
- },
- "digest": "7e49705769c42895fb7b1e2ca028ff47",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "GET _cat/nodes",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 110
- },
- "digest": "45ef5156dbd2d3fd4fd22b8d99f7aad4",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 128
- },
- "digest": "5c53944aec2ce3e55854e315f0482029",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "GET _cat/health?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 158
- },
- "digest": "6b74ff6df5d7583add837b34a6c80a43",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "GET _cat/recovery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 175
- },
- "digest": "f8cc4b331a19ff4df8e4a490f906ee69",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cat/health?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 182
- },
- "digest": "c4270d3851c76898fc8b112c6c597444",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodes?h=ip,name,version&v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "h": "ip,name,version",
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 197
- },
- "digest": "3c5d5a5c34a62724942329658c688f5e",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 32
- },
- "digest": "1cd3b9d65576a9212eef898eb3105758",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": \"primaries\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": "primaries"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 31
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 66
- },
- "digest": "a21a7bf052b41f5b996dc58f7b69770f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 91
- },
- "digest": "c0a4b0c1c6eff14da8b152ceb19c1c31",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "GET _cat/health\n\nGET _cat/nodes",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.health"
- },
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 124
- },
- "digest": "45ef5156dbd2d3fd4fd22b8d99f7aad4",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 143
- },
- "digest": "2d9b30acd6b5683f39d53494c0dd779c",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "GET _cat/health\n\nGET _cat/recovery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.health"
- },
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 159
- },
- "digest": "3c5d5a5c34a62724942329658c688f5e",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/reindex_upgrade.asciidoc",
- "line": 160
- },
- "digest": "acd65c045139fef38ef5cd20c8c1cfc1",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"remote\": {\n \"host\": \"http://oldhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "remote": {
- "host": "http://oldhost:9200",
- "username": "user",
- "password": "pass"
- },
- "index": "source",
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "dest": {
- "index": "dest"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 10
- },
- "digest": "d9d28e9e9d7021a72c983f8e79aa8c6c",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"avg_grade\" : { \"avg\" : { \"field\" : \"grade\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "avg_grade": {
- "avg": {
- "field": "grade"
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 23
- },
- "digest": "aeb4454d959a0dc33d71380075657346",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"avg_grade\": {\n \"value\": 75.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 42
- },
- "digest": "d05bbafb8c88850879b5990119a96f5e",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"avg_grade\" : {\n \"avg\" : {\n \"script\" : {\n \"source\" : \"doc.grade.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "avg_grade": {
- "avg": {
- "script": {
- "source": "doc.grade.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 61
- },
- "digest": "c04f4a48d0cb550a879fdc93454852de",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"avg_grade\" : {\n \"avg\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"grade\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "avg_grade": {
- "avg": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "grade"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 85
- },
- "digest": "91994d98e766230911b3e659b3e51f17",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"avg_corrected_grade\" : {\n \"avg\" : {\n \"field\" : \"grade\",\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"_value * params.correction\",\n \"params\" : {\n \"correction\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "avg_corrected_grade": {
- "avg": {
- "field": "grade",
- "script": {
- "lang": "painless",
- "source": "_value * params.correction",
- "params": {
- "correction": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 113
- },
- "digest": "2ec33e09d6080723ee2013bad694f35a",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grade_avg\" : {\n \"avg\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grade_avg": {
- "avg": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 55
- },
- "digest": "c15dead46d351f62cfc066f1ca1a24eb",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"weighted_grade\": {\n \"weighted_avg\": {\n \"value\": {\n \"field\": \"grade\"\n },\n \"weight\": {\n \"field\": \"weight\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "weighted_grade": {
- "weighted_avg": {
- "value": {
- "field": "grade"
- },
- "weight": {
- "field": "weight"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 78
- },
- "digest": "476e06fa321ef1237e40aaaec3b3d642",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"weighted_grade\": {\n \"value\": 70.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 101
- },
- "digest": "4c15a4b054c7d0aaaa17deaff853bb28",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_doc?refresh\n{\n \"grade\": [1, 2, 3],\n \"weight\": 2\n}\n\nPOST /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"weighted_grade\": {\n \"weighted_avg\": {\n \"value\": {\n \"field\": \"grade\"\n },\n \"weight\": {\n \"field\": \"weight\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "grade": [
- 1,
- 2,
- 3
- ],
- "weight": 2
- },
- "params": {
- "index": "exams"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "weighted_grade": {
- "weighted_avg": {
- "value": {
- "field": "grade"
- },
- "weight": {
- "field": "weight"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 130
- },
- "digest": "d1823ccb5a2e9d8699555b94a5b32093",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"weighted_grade\": {\n \"value\": 2.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 151
- },
- "digest": "e88e8c78ed50936c8b7436c90b988ddf",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"weighted_grade\": {\n \"weighted_avg\": {\n \"value\": {\n \"script\": \"doc.grade.value + 1\"\n },\n \"weight\": {\n \"script\": \"doc.weight.value + 1\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "weighted_grade": {
- "weighted_avg": {
- "value": {
- "script": "doc.grade.value + 1"
- },
- "weight": {
- "script": "doc.weight.value + 1"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 183
- },
- "digest": "cebfe0fed62091eb38b6348c89643f89",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"weighted_grade\": {\n \"weighted_avg\": {\n \"value\": {\n \"field\": \"grade\",\n \"missing\": 2\n },\n \"weight\": {\n \"field\": \"weight\",\n \"missing\": 3\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "weighted_grade": {
- "weighted_avg": {
- "value": {
- "field": "grade",
- "missing": 2
- },
- "weight": {
- "field": "weight",
- "missing": 3
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 11
- },
- "digest": "826140cdd3d5fe9a728239605c6dc71a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_count\" : {\n \"cardinality\" : {\n \"field\" : \"type\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_count": {
- "cardinality": {
- "field": "type"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 28
- },
- "digest": "ea974de430642c6289d33f750583a1cf",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"type_count\" : {\n \"value\" : 3\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 45
- },
- "digest": "edbd54e71e56f3a5617aa012b100aa0f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_count\" : {\n \"cardinality\" : {\n \"field\" : \"type\",\n \"precision_threshold\": 100 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_count": {
- "cardinality": {
- "field": "type",
- "precision_threshold": 100
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 185
- },
- "digest": "ef3a3e292e9e74d42703555178ed5fb6",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_promoted_count\" : {\n \"cardinality\" : {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['type'].value + ' ' + doc['promoted'].value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_promoted_count": {
- "cardinality": {
- "script": {
- "lang": "painless",
- "source": "doc['type'].value + ' ' + doc['promoted'].value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 205
- },
- "digest": "6969b29883eefa552475ae1837dc5f96",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_promoted_count\" : {\n \"cardinality\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"type_field\": \"type\",\n \"promoted_field\": \"promoted\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_promoted_count": {
- "cardinality": {
- "script": {
- "id": "my_script",
- "params": {
- "type_field": "type",
- "promoted_field": "promoted"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 232
- },
- "digest": "7d86ff090cbd87f144edb72e949470b3",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"tag_cardinality\" : {\n \"cardinality\" : {\n \"field\" : \"tag\",\n \"missing\": \"N/A\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "tag_cardinality": {
- "cardinality": {
- "field": "tag",
- "missing": "N/A"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 11
- },
- "digest": "b1c3e5c4a1a22ac329bbdec4d0de1082",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : { \"extended_stats\" : { \"field\" : \"grade\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "field": "grade"
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 26
- },
- "digest": "ba29123e4866e81ee18631a7c94df4f7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"grades_stats\": {\n \"count\": 2,\n \"min\": 50.0,\n \"max\": 100.0,\n \"avg\": 75.0,\n \"sum\": 150.0,\n \"sum_of_squares\": 12500.0,\n \"variance\": 625.0,\n \"std_deviation\": 25.0,\n \"std_deviation_bounds\": {\n \"upper\": 125.0,\n \"lower\": 25.0\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 58
- },
- "digest": "eb8df98231df40c61f5feef4946b1a92",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"field\" : \"grade\",\n \"sigma\" : 3 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "field": "grade",
- "sigma": 3
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 91
- },
- "digest": "83476d04b393850da0697e1bfae58b4a",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"script\" : {\n \"source\" : \"doc['grade'].value\",\n \"lang\" : \"painless\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "script": {
- "source": "doc['grade'].value",
- "lang": "painless"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 112
- },
- "digest": "2cf036d054901b5d7b4a84780c320f2d",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"grade\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "grade"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 137
- },
- "digest": "533b447e1ca8c575e38ecd9b1917c17c",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"field\" : \"grade\",\n \"script\" : {\n \"lang\" : \"painless\",\n \"source\": \"_value * params.correction\",\n \"params\" : {\n \"correction\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "field": "grade",
- "script": {
- "lang": "painless",
- "source": "_value * params.correction",
- "params": {
- "correction": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 166
- },
- "digest": "44a7cf8482bdc3d1c11f4b3b35683b99",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"field\" : \"grade\",\n \"missing\": 0 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "field": "grade",
- "missing": 0
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geobounds-aggregation.asciidoc",
- "line": 10
- },
- "digest": "34cabdecfe9c2cb8dd929853882564eb",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"query\" : {\n \"match\" : { \"name\" : \"musée\" }\n },\n \"aggs\" : {\n \"viewport\" : {\n \"geo_bounds\" : {\n \"field\" : \"location\", <1>\n \"wrap_longitude\" : true <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "match": {
- "name": "musée"
- }
- },
- "aggs": {
- "viewport": {
- "geo_bounds": {
- "field": "location",
- "wrap_longitude": true
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geobounds-aggregation.asciidoc",
- "line": 60
- },
- "digest": "bd82ab8462b3dcd1bef1892e75277e67",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"viewport\": {\n \"bounds\": {\n \"top_left\": {\n \"lat\": 48.86111099738628,\n \"lon\": 2.3269999679178\n },\n \"bottom_right\": {\n \"lat\": 48.85999997612089,\n \"lon\": 2.3363889567553997\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 9
- },
- "digest": "d0cf6057bc87042819a7ac961d1b2273",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"city\": \"Amsterdam\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"city\": \"Amsterdam\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"city\": \"Amsterdam\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"city\": \"Antwerp\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"city\": \"Paris\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"city\": \"Paris\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"aggs\" : {\n \"centroid\" : {\n \"geo_centroid\" : {\n \"field\" : \"location\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "city": "Amsterdam",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "city": "Amsterdam",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "city": "Amsterdam",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "city": "Antwerp",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "city": "Paris",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "city": "Paris",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "centroid": {
- "geo_centroid": {
- "field": "location"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 54
- },
- "digest": "85da750740194c53e24eb140564f22b6",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"centroid\": {\n \"location\": {\n \"lat\": 51.00982965203002,\n \"lon\": 3.9662131341174245\n },\n \"count\": 6\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 75
- },
- "digest": "6dec421bf327ecaf189109d9aaa35919",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"cities\" : {\n \"terms\" : { \"field\" : \"city.keyword\" },\n \"aggs\" : {\n \"centroid\" : {\n \"geo_centroid\" : { \"field\" : \"location\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "cities": {
- "terms": {
- "field": "city.keyword"
- },
- "aggs": {
- "centroid": {
- "geo_centroid": {
- "field": "location"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 99
- },
- "digest": "abd50e099fcc1119a285e9b83c66d1e0",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"cities\": {\n \"sum_other_doc_count\": 0,\n \"doc_count_error_upper_bound\": 0,\n \"buckets\": [\n {\n \"key\": \"Amsterdam\",\n \"doc_count\": 3,\n \"centroid\": {\n \"location\": {\n \"lat\": 52.371655656024814,\n \"lon\": 4.909563297405839\n },\n \"count\": 3\n }\n },\n {\n \"key\": \"Paris\",\n \"doc_count\": 2,\n \"centroid\": {\n \"location\": {\n \"lat\": 48.86055548675358,\n \"lon\": 2.3316944623366\n },\n \"count\": 2\n }\n },\n {\n \"key\": \"Antwerp\",\n \"doc_count\": 1,\n \"centroid\": {\n \"location\": {\n \"lat\": 51.22289997059852,\n \"lon\": 4.40519998781383\n },\n \"count\": 1\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 16
- },
- "digest": "9498a707be49e14dad801db6b6824e34",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"max_price\" : { \"max\" : { \"field\" : \"price\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "max_price": {
- "max": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 29
- },
- "digest": "389b810e5524c81eaa863d850635492e",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"max_price\": {\n \"value\": 200.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 51
- },
- "digest": "736fc5448b66962ceef1e6d5948ef691",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"max_price\" : {\n \"max\" : {\n \"script\" : {\n \"source\" : \"doc.price.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "max_price": {
- "max": {
- "script": {
- "source": "doc.price.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 71
- },
- "digest": "b5e782e309a2a10db272414e8483d8dc",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"max_price\" : {\n \"max\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"price\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "max_price": {
- "max": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 98
- },
- "digest": "23fdba37454d6d7abf6bfbb4fd01692f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"max_price_in_euros\" : {\n \"max\" : {\n \"field\" : \"price\",\n \"script\" : {\n \"source\" : \"_value * params.conversion_rate\",\n \"params\" : {\n \"conversion_rate\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "max_price_in_euros": {
- "max": {
- "field": "price",
- "script": {
- "source": "_value * params.conversion_rate",
- "params": {
- "conversion_rate": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 125
- },
- "digest": "41518c094db4a5b03cca3b21497f79cf",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"grade_max\" : {\n \"max\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "grade_max": {
- "max": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 16
- },
- "digest": "bbd52c02b078e650f1a871f7fe7ff343",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"min_price\" : { \"min\" : { \"field\" : \"price\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "min_price": {
- "min": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 29
- },
- "digest": "8eb0082e9853f7e8ba01313e9345307c",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"min_price\": {\n \"value\": 10.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 52
- },
- "digest": "27cf2556b606f91d1fe3db3d7b6fd21a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"min_price\" : {\n \"min\" : {\n \"script\" : {\n \"source\" : \"doc.price.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "min_price": {
- "min": {
- "script": {
- "source": "doc.price.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 72
- },
- "digest": "f76eb7821cb7855339ffcaab3460d934",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"min_price\" : {\n \"min\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"price\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "min_price": {
- "min": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 99
- },
- "digest": "57ec3af2f4b3ce90722de51efc9d2cf1",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"min_price_in_euros\" : {\n \"min\" : {\n \"field\" : \"price\",\n \"script\" : {\n \"source\" : \"_value * params.conversion_rate\",\n \"params\" : {\n \"conversion_rate\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "min_price_in_euros": {
- "min": {
- "field": "price",
- "script": {
- "source": "_value * params.conversion_rate",
- "params": {
- "conversion_rate": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 126
- },
- "digest": "05161bf816a98dd2a57b8cd2a3d39db4",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"grade_min\" : {\n \"min\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "grade_min": {
- "min": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 28
- },
- "digest": "9baaa0c37e787738507aceee7626c88b",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"field\" : \"load_time\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time"
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 48
- },
- "digest": "f05a6a8b26e79c9903efe57b7c6408f1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_outlier\": {\n \"values\" : {\n \"1.0\": 5.0,\n \"5.0\": 25.0,\n \"25.0\": 165.0,\n \"50.0\": 445.0,\n \"75.0\": 725.0,\n \"95.0\": 945.0,\n \"99.0\": 985.0\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 79
- },
- "digest": "4273ecf0448faf65b16952ada3d48a30",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"field\" : \"load_time\",\n \"percents\" : [95, 99, 99.9] <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time",
- "percents": [
- 95,
- 99,
- 99.9
- ]
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 101
- },
- "digest": "e6f49e5325fe0e9b816a837bd3e65a7c",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"load_time_outlier\": {\n \"percentiles\": {\n \"field\": \"load_time\",\n \"keyed\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time",
- "keyed": false
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 120
- },
- "digest": "b1f54ec2ea685f82d1f0cfe35f8bd141",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_outlier\": {\n \"values\": [\n {\n \"key\": 1.0,\n \"value\": 5.0\n },\n {\n \"key\": 5.0,\n \"value\": 25.0\n },\n {\n \"key\": 25.0,\n \"value\": 165.0\n },\n {\n \"key\": 50.0,\n \"value\": 445.0\n },\n {\n \"key\": 75.0,\n \"value\": 725.0\n },\n {\n \"key\": 95.0,\n \"value\": 945.0\n },\n {\n \"key\": 99.0,\n \"value\": 985.0\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 169
- },
- "digest": "823b97820ce96abcc3a9292d14292849",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['load_time'].value / params.timeUnit\", <1>\n \"params\" : {\n \"timeUnit\" : 1000 <2>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "script": {
- "lang": "painless",
- "source": "doc['load_time'].value / params.timeUnit",
- "params": {
- "timeUnit": 1000
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 197
- },
- "digest": "dae483a5a412dcf4c20161fea25a87ba",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"load_time\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "load_time"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 268
- },
- "digest": "829d345e5e15e371aeb820f4d62a1b2a",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"field\" : \"load_time\",\n \"tdigest\": {\n \"compression\" : 200 <1>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time",
- "tdigest": {
- "compression": 200
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 320
- },
- "digest": "db17a10cf64c84bd2fc4ebb073e59cec",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"field\" : \"load_time\",\n \"percents\" : [95, 99, 99.9],\n \"hdr\": { <1>\n \"number_of_significant_value_digits\" : 3 <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time",
- "percents": [
- 95,
- 99,
- 99.9
- ],
- "hdr": {
- "number_of_significant_value_digits": 3
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 352
- },
- "digest": "e557ce02e192939944ebc6bae87e98a6",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grade_percentiles\" : {\n \"percentiles\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grade_percentiles": {
- "percentiles": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 26
- },
- "digest": "daaa9e0df859d764ca0a4a4ebcfbdb26",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"field\" : \"load_time\", <1>\n \"values\" : [500, 600]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "field": "load_time",
- "values": [
- 500,
- 600
- ]
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 47
- },
- "digest": "dc82882f7f4bbb70b175c0ad758f8521",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_ranks\": {\n \"values\" : {\n \"500.0\": 90.01,\n \"600.0\": 100.0\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 73
- },
- "digest": "156dd311073c8c825e608becf63ae7fe",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"load_time_ranks\": {\n \"percentile_ranks\": {\n \"field\": \"load_time\",\n \"values\": [500, 600],\n \"keyed\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "field": "load_time",
- "values": [
- 500,
- 600
- ],
- "keyed": false
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 93
- },
- "digest": "526fc4a2b6bbff6d2026ee68ac52bff5",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_ranks\": {\n \"values\": [\n {\n \"key\": 500.0,\n \"value\": 90.01\n },\n {\n \"key\": 600.0,\n \"value\": 100.0\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 125
- },
- "digest": "c9ea558335446fc64006724cb72684e1",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"values\" : [500, 600],\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['load_time'].value / params.timeUnit\", <1>\n \"params\" : {\n \"timeUnit\" : 1000 <2>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "values": [
- 500,
- 600
- ],
- "script": {
- "lang": "painless",
- "source": "doc['load_time'].value / params.timeUnit",
- "params": {
- "timeUnit": 1000
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 154
- },
- "digest": "59bcc5d1ed0aac1aa949f84d80a4fa1d",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"values\" : [500, 600],\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"load_time\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "values": [
- 500,
- 600
- ],
- "script": {
- "id": "my_script",
- "params": {
- "field": "load_time"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 189
- },
- "digest": "214d704d18485ab75ef53aa9c0524590",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"field\" : \"load_time\",\n \"values\" : [500, 600],\n \"hdr\": { <1>\n \"number_of_significant_value_digits\" : 3 <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "field": "load_time",
- "values": [
- 500,
- 600
- ],
- "hdr": {
- "number_of_significant_value_digits": 3
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 221
- },
- "digest": "77f575b0cc37dd7a2415cbf6417d3148",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"field\" : \"load_time\",\n \"values\" : [500, 600],\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "field": "load_time",
- "values": [
- 500,
- 600
- ],
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/scripted-metric-aggregation.asciidoc",
- "line": 9
- },
- "digest": "20600097aa51aa3386536bdc681e92b6",
- "lang": "console",
- "found": [],
- "source": "POST ledger/_search?size=0\n{\n \"query\" : {\n \"match_all\" : {}\n },\n \"aggs\": {\n \"profit\": {\n \"scripted_metric\": {\n \"init_script\" : \"state.transactions = []\", <1>\n \"map_script\" : \"state.transactions.add(doc.type.value == 'sale' ? doc.amount.value : -1 * doc.amount.value)\",\n \"combine_script\" : \"double profit = 0; for (t in state.transactions) { profit += t } return profit\",\n \"reduce_script\" : \"double profit = 0; for (a in states) { profit += a } return profit\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/ledger/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "match_all": {}
- },
- "aggs": {
- "profit": {
- "scripted_metric": {
- "init_script": "state.transactions = []",
- "map_script": "state.transactions.add(doc.type.value == 'sale' ? doc.amount.value : -1 * doc.amount.value)",
- "combine_script": "double profit = 0; for (t in state.transactions) { profit += t } return profit",
- "reduce_script": "double profit = 0; for (a in states) { profit += a } return profit"
- }
- }
- }
- },
- "params": {
- "index": "ledger"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/scripted-metric-aggregation.asciidoc",
- "line": 36
- },
- "digest": "644df9962eb12424fc93ad42f1d939cd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 218,\n ...\n \"aggregations\": {\n \"profit\": {\n \"value\": 240.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/scripted-metric-aggregation.asciidoc",
- "line": 53
- },
- "digest": "129ce418d8dd1f71087678725a0df19f",
- "lang": "console",
- "found": [],
- "source": "POST ledger/_search?size=0\n{\n \"aggs\": {\n \"profit\": {\n \"scripted_metric\": {\n \"init_script\" : {\n \"id\": \"my_init_script\"\n },\n \"map_script\" : {\n \"id\": \"my_map_script\"\n },\n \"combine_script\" : {\n \"id\": \"my_combine_script\"\n },\n \"params\": {\n \"field\": \"amount\" <1>\n },\n \"reduce_script\" : {\n \"id\": \"my_reduce_script\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/ledger/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "profit": {
- "scripted_metric": {
- "init_script": {
- "id": "my_init_script"
- },
- "map_script": {
- "id": "my_map_script"
- },
- "combine_script": {
- "id": "my_combine_script"
- },
- "params": {
- "field": "amount"
- },
- "reduce_script": {
- "id": "my_reduce_script"
- }
- }
- }
- }
- },
- "params": {
- "index": "ledger"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/scripted-metric-aggregation.asciidoc",
- "line": 147
- },
- "digest": "75e360d03fb416f0a65ca37c662c2e9c",
- "lang": "console",
- "found": [],
- "source": "PUT /transactions/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"type\": \"sale\",\"amount\": 80}\n{\"index\":{\"_id\":2}}\n{\"type\": \"cost\",\"amount\": 10}\n{\"index\":{\"_id\":3}}\n{\"type\": \"cost\",\"amount\": 30}\n{\"index\":{\"_id\":4}}\n{\"type\": \"sale\",\"amount\": 130}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/transactions/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "type": "sale",
- "amount": 80
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "type": "cost",
- "amount": 10
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "type": "cost",
- "amount": 30
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "type": "sale",
- "amount": 130
- }
- ],
- "params": {
- "index": "transactions"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 11
- },
- "digest": "6f04f3c1afe94e03d26ff5966fd4b98d",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : { \"stats\" : { \"field\" : \"grade\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "field": "grade"
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 25
- },
- "digest": "b34f77613fdfc280bcd958a542d438a1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"grades_stats\": {\n \"count\": 2,\n \"min\": 50.0,\n \"max\": 100.0,\n \"avg\": 75.0,\n \"sum\": 150.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 49
- },
- "digest": "9ed80262680e67c629a08f6754a7c5c9",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : {\n \"stats\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['grade'].value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "script": {
- "lang": "painless",
- "source": "doc['grade'].value"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 69
- },
- "digest": "2ba8575100b37b85d0052d46a00ce4cd",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : {\n \"stats\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\" : {\n \"field\" : \"grade\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "grade"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 93
- },
- "digest": "1341888a2677cf6e1db11e6cab2dd8ce",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : {\n \"stats\" : {\n \"field\" : \"grade\",\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"_value * params.correction\",\n \"params\" : {\n \"correction\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "field": "grade",
- "script": {
- "lang": "painless",
- "source": "_value * params.correction",
- "params": {
- "correction": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 121
- },
- "digest": "7371dcfe4adb43996f4c26684318302b",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : {\n \"stats\" : {\n \"field\" : \"grade\",\n \"missing\": 0 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "field": "grade",
- "missing": 0
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 22
- },
- "digest": "5507b01f713674781996a07718785444",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : { \"string_stats\" : { \"field\" : \"message.keyword\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "field": "message.keyword"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 37
- },
- "digest": "5f196374e1b1e008eca06b7d35ad496b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"message_stats\" : {\n \"count\" : 5,\n \"min_length\" : 24,\n \"max_length\" : 30,\n \"avg_length\" : 28.8,\n \"entropy\" : 3.94617750050791\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 63
- },
- "digest": "a1d02ab1549dbd3f1874f6a2fd48ec48",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"field\" : \"message.keyword\",\n \"show_distribution\": true <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "field": "message.keyword",
- "show_distribution": true
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 81
- },
- "digest": "947b84333fcecc39a23f10a8d6b16751",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"message_stats\" : {\n \"count\" : 5,\n \"min_length\" : 24,\n \"max_length\" : 30,\n \"avg_length\" : 28.8,\n \"entropy\" : 3.94617750050791,\n \"distribution\" : {\n \" \" : 0.1527777777777778,\n \"e\" : 0.14583333333333334,\n \"s\" : 0.09722222222222222,\n \"m\" : 0.08333333333333333,\n \"t\" : 0.0763888888888889,\n \"h\" : 0.0625,\n \"a\" : 0.041666666666666664,\n \"i\" : 0.041666666666666664,\n \"r\" : 0.041666666666666664,\n \"g\" : 0.034722222222222224,\n \"n\" : 0.034722222222222224,\n \"o\" : 0.034722222222222224,\n \"u\" : 0.034722222222222224,\n \"b\" : 0.027777777777777776,\n \"w\" : 0.027777777777777776,\n \"c\" : 0.013888888888888888,\n \"E\" : 0.006944444444444444,\n \"l\" : 0.006944444444444444,\n \"1\" : 0.006944444444444444,\n \"2\" : 0.006944444444444444,\n \"3\" : 0.006944444444444444,\n \"4\" : 0.006944444444444444,\n \"y\" : 0.006944444444444444\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 130
- },
- "digest": "24b22f8b83e9b199964036a170e4299e",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['message.keyword'].value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "script": {
- "lang": "painless",
- "source": "doc['message.keyword'].value"
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 151
- },
- "digest": "a89a22d4f41ee3538bbfec8ac9e7ac74",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\" : {\n \"field\" : \"message.keyword\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "message.keyword"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 175
- },
- "digest": "46078bde3789b5e7e83ab458857bc9c9",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"field\" : \"message.keyword\",\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"params.prefix + _value\",\n \"params\" : {\n \"prefix\" : \"Message: \"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "field": "message.keyword",
- "script": {
- "lang": "painless",
- "source": "params.prefix + _value",
- "params": {
- "prefix": "Message: "
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 202
- },
- "digest": "437f4009a93d46b6b76e7db366b34ce6",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"field\" : \"message.keyword\",\n \"missing\": \"[empty message]\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "field": "message.keyword",
- "missing": "[empty message]"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 10
- },
- "digest": "43159621ffaa30dbfd60459a5e7b8e54",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"hat_prices\" : { \"sum\" : { \"field\" : \"price\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "hat_prices": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 30
- },
- "digest": "e3fe09a765f8ddad554e74a8256c8b78",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"hat_prices\": {\n \"value\": 450.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 49
- },
- "digest": "4b5f2bd0db1a94614f4d2e46a5159bd2",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"hat_prices\" : {\n \"sum\" : {\n \"script\" : {\n \"source\": \"doc.price.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "hat_prices": {
- "sum": {
- "script": {
- "source": "doc.price.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 75
- },
- "digest": "49a4032ac0cbc413b47660bcf998ef5f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"hat_prices\" : {\n \"sum\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\" : {\n \"field\" : \"price\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "hat_prices": {
- "sum": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 107
- },
- "digest": "82a2031f77972b713f75ed05c4bd9815",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"square_hats\" : {\n \"sum\" : {\n \"field\" : \"price\",\n \"script\" : {\n \"source\": \"_value * _value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "square_hats": {
- "sum": {
- "field": "price",
- "script": {
- "source": "_value * _value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 139
- },
- "digest": "a78c3f4389502fe2dbd1cd10a017d1ed",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"hat_prices\" : {\n \"sum\" : {\n \"field\" : \"price\",\n \"missing\": 100 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "hat_prices": {
- "sum": {
- "field": "price",
- "missing": 100
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 36
- },
- "digest": "12b4b34f9958ed157ac2d812d612cda6",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"top_tags\": {\n \"terms\": {\n \"field\": \"type\",\n \"size\": 3\n },\n \"aggs\": {\n \"top_sales_hits\": {\n \"top_hits\": {\n \"sort\": [\n {\n \"date\": {\n \"order\": \"desc\"\n }\n }\n ],\n \"_source\": {\n \"includes\": [ \"date\", \"price\" ]\n },\n \"size\" : 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "top_tags": {
- "terms": {
- "field": "type",
- "size": 3
- },
- "aggs": {
- "top_sales_hits": {
- "top_hits": {
- "sort": [
- {
- "date": {
- "order": "desc"
- }
- }
- ],
- "_source": {
- "includes": [
- "date",
- "price"
- ]
- },
- "size": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 71
- },
- "digest": "ac5c534e77684388b5126e2960db0d3f",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"top_tags\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"hat\",\n \"doc_count\": 3,\n \"top_sales_hits\": {\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": [\n {\n \"_index\": \"sales\",\n \"_id\": \"AVnNBmauCQpcRyxw6ChK\",\n \"_source\": {\n \"date\": \"2015/03/01 00:00:00\",\n \"price\": 200\n },\n \"sort\": [\n 1425168000000\n ],\n \"_score\": null\n }\n ]\n }\n }\n },\n {\n \"key\": \"t-shirt\",\n \"doc_count\": 3,\n \"top_sales_hits\": {\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": [\n {\n \"_index\": \"sales\",\n \"_id\": \"AVnNBmauCQpcRyxw6ChL\",\n \"_source\": {\n \"date\": \"2015/03/01 00:00:00\",\n \"price\": 175\n },\n \"sort\": [\n 1425168000000\n ],\n \"_score\": null\n }\n ]\n }\n }\n },\n {\n \"key\": \"bag\",\n \"doc_count\": 1,\n \"top_sales_hits\": {\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": [\n {\n \"_index\": \"sales\",\n \"_id\": \"AVnNBmatCQpcRyxw6ChH\",\n \"_source\": {\n \"date\": \"2015/01/01 00:00:00\",\n \"price\": 150\n },\n \"sort\": [\n 1420070400000\n ],\n \"_score\": null\n }\n ]\n }\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 185
- },
- "digest": "30db2702dd0071c72a090b8311d0db09",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"query\": {\n \"match\": {\n \"body\": \"elections\"\n }\n },\n \"aggs\": {\n \"top_sites\": {\n \"terms\": {\n \"field\": \"domain\",\n \"order\": {\n \"top_hit\": \"desc\"\n }\n },\n \"aggs\": {\n \"top_tags_hits\": {\n \"top_hits\": {}\n },\n \"top_hit\" : {\n \"max\": {\n \"script\": {\n \"source\": \"_score\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "body": "elections"
- }
- },
- "aggs": {
- "top_sites": {
- "terms": {
- "field": "domain",
- "order": {
- "top_hit": "desc"
- }
- },
- "aggs": {
- "top_tags_hits": {
- "top_hits": {}
- },
- "top_hit": {
- "max": {
- "script": {
- "source": "_score"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 238
- },
- "digest": "2720c5e463876c415419c426697d15e4",
- "lang": "console",
- "found": [],
- "source": "PUT /sales\n{\n \"mappings\": {\n \"properties\" : {\n \"tags\" : { \"type\" : \"keyword\" },\n \"comments\" : { <1>\n \"type\" : \"nested\",\n \"properties\" : {\n \"username\" : { \"type\" : \"keyword\" },\n \"comment\" : { \"type\" : \"text\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/sales",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "tags": {
- "type": "keyword"
- },
- "comments": {
- "type": "nested",
- "properties": {
- "username": {
- "type": "keyword"
- },
- "comment": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 261
- },
- "digest": "6ac67f7e30219d85fcc68b99459a39a4",
- "lang": "console",
- "found": [],
- "source": "PUT /sales/_doc/1?refresh\n{\n \"tags\": [\"car\", \"auto\"],\n \"comments\": [\n {\"username\": \"baddriver007\", \"comment\": \"This car could have better brakes\"},\n {\"username\": \"dr_who\", \"comment\": \"Where's the autopilot? Can't find it\"},\n {\"username\": \"ilovemotorbikes\", \"comment\": \"This car has two extra wheels\"}\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/sales/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "tags": [
- "car",
- "auto"
- ],
- "comments": [
- {
- "username": "baddriver007",
- "comment": "This car could have better brakes"
- },
- {
- "username": "dr_who",
- "comment": "Where's the autopilot? Can't find it"
- },
- {
- "username": "ilovemotorbikes",
- "comment": "This car has two extra wheels"
- }
- ]
- },
- "params": {
- "index": "sales",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 277
- },
- "digest": "f1b8612151a660264fb62dc6c74b19be",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"query\": {\n \"term\": { \"tags\": \"car\" }\n },\n \"aggs\": {\n \"by_sale\": {\n \"nested\" : {\n \"path\" : \"comments\"\n },\n \"aggs\": {\n \"by_user\": {\n \"terms\": {\n \"field\": \"comments.username\",\n \"size\": 1\n },\n \"aggs\": {\n \"by_nested\": {\n \"top_hits\":{}\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "tags": "car"
- }
- },
- "aggs": {
- "by_sale": {
- "nested": {
- "path": "comments"
- },
- "aggs": {
- "by_user": {
- "terms": {
- "field": "comments.username",
- "size": 1
- },
- "aggs": {
- "by_nested": {
- "top_hits": {}
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 311
- },
- "digest": "7360e36c8ba3511fa133472ec101fff3",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_sale\": {\n \"by_user\": {\n \"buckets\": [\n {\n \"key\": \"baddriver007\",\n \"doc_count\": 1,\n \"by_nested\": {\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.3616575,\n \"hits\": [\n {\n \"_index\": \"sales\",\n \"_id\": \"1\",\n \"_nested\": {\n \"field\": \"comments\", <1>\n \"offset\": 0 <2>\n },\n \"_score\": 0.3616575,\n \"_source\": {\n \"comment\": \"This car could have better brakes\", <3>\n \"username\": \"baddriver007\"\n }\n }\n ]\n }\n }\n }\n ...\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 12
- },
- "digest": "26904dd89a3c9f1a93b032c9c1eaae62",
- "lang": "console",
- "found": [],
- "source": "POST /test/_bulk?refresh\n{\"index\": {}}\n{\"s\": 1, \"v\": 3.1415}\n{\"index\": {}}\n{\"s\": 2, \"v\": 1}\n{\"index\": {}}\n{\"s\": 3, \"v\": 2.71828}\nPOST /test/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metric\": {\"field\": \"v\"},\n \"sort\": {\"s\": \"desc\"}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {}
- },
- {
- "s": 1,
- "v": 3.1415
- },
- {
- "index": {}
- },
- {
- "s": 2,
- "v": 1
- },
- {
- "index": {}
- },
- {
- "s": 3,
- "v": 2.71828
- }
- ],
- "params": {
- "index": "test"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "tm": {
- "top_metrics": {
- "metric": {
- "field": "v"
- },
- "sort": {
- "s": "desc"
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 85
- },
- "digest": "a4f89e46f108ddab069bd4b3f798f2c6",
- "lang": "console",
- "found": [],
- "source": "PUT /node\n{\n \"mappings\": {\n \"properties\": {\n \"ip\": {\"type\": \"ip\"},\n \"date\": {\"type\": \"date\"}\n }\n }\n}\nPOST /node/_bulk?refresh\n{\"index\": {}}\n{\"ip\": \"192.168.0.1\", \"date\": \"2020-01-01T01:01:01\", \"v\": 1}\n{\"index\": {}}\n{\"ip\": \"192.168.0.1\", \"date\": \"2020-01-01T02:01:01\", \"v\": 2}\n{\"index\": {}}\n{\"ip\": \"192.168.0.2\", \"date\": \"2020-01-01T02:01:01\", \"v\": 3}\nPOST /node/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"ip\": {\n \"terms\": {\n \"field\": \"ip\"\n },\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metric\": {\"field\": \"v\"},\n \"sort\": {\"date\": \"desc\"}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/node",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "ip": {
- "type": "ip"
- },
- "date": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "node"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/node/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {}
- },
- {
- "ip": "192.168.0.1",
- "date": "2020-01-01T01:01:01",
- "v": 1
- },
- {
- "index": {}
- },
- {
- "ip": "192.168.0.1",
- "date": "2020-01-01T02:01:01",
- "v": 2
- },
- {
- "index": {}
- },
- {
- "ip": "192.168.0.2",
- "date": "2020-01-01T02:01:01",
- "v": 3
- }
- ],
- "params": {
- "index": "node"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/node/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "ip": {
- "terms": {
- "field": "ip"
- },
- "aggs": {
- "tm": {
- "top_metrics": {
- "metric": {
- "field": "v"
- },
- "sort": {
- "date": "desc"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "node"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 156
- },
- "digest": "1ba79a9bfab9275c2095e720f5664fab",
- "lang": "console",
- "found": [],
- "source": "POST /node/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"ip\": {\n \"terms\": {\n \"field\": \"ip\",\n \"order\": {\"tm.v\": \"desc\"}\n },\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metric\": {\"field\": \"v\"},\n \"sort\": {\"date\": \"desc\"}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/node/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "ip": {
- "terms": {
- "field": "ip",
- "order": {
- "tm.v": "desc"
- }
- },
- "aggs": {
- "tm": {
- "top_metrics": {
- "metric": {
- "field": "v"
- },
- "sort": {
- "date": "desc"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "node"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 217
- },
- "digest": "b160996a6ab06abeed6899e63c2d192b",
- "lang": "console",
- "found": [],
- "source": "POST /test/_bulk?refresh\n{\"index\": {\"_index\": \"test1\"}}\n{\"s\": 1, \"v\": 3.1415}\n{\"index\": {\"_index\": \"test1\"}}\n{\"s\": 2, \"v\": 1}\n{\"index\": {\"_index\": \"test2\"}}\n{\"s\": 3.1, \"v\": 2.71828}\nPOST /test*/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metric\": {\"field\": \"v\"},\n \"sort\": {\"s\": \"asc\"}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_index": "test1"
- }
- },
- {
- "s": 1,
- "v": 3.1415
- },
- {
- "index": {
- "_index": "test1"
- }
- },
- {
- "s": 2,
- "v": 1
- },
- {
- "index": {
- "_index": "test2"
- }
- },
- {
- "s": 3.1,
- "v": 2.71828
- }
- ],
- "params": {
- "index": "test"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/test*/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "tm": {
- "top_metrics": {
- "metric": {
- "field": "v"
- },
- "sort": {
- "s": "asc"
- }
- }
- }
- }
- },
- "params": {
- "index": "test*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 257
- },
- "digest": "efc492b00b90206ae795f9afda4a1307",
- "lang": "console",
- "found": [],
- "source": "POST /test*/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metric\": {\"field\": \"v\"},\n \"sort\": {\"s\": {\"order\": \"asc\", \"numeric_type\": \"double\"}}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test*/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "tm": {
- "top_metrics": {
- "metric": {
- "field": "v"
- },
- "sort": {
- "s": {
- "order": "asc",
- "numeric_type": "double"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 10
- },
- "digest": "5dd695679b5141d9142d3d30ba8d300a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"types_count\" : { \"value_count\" : { \"field\" : \"type\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "types_count": {
- "value_count": {
- "field": "type"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 23
- },
- "digest": "73900a92a107ce4fe9cd10942ff494d7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"types_count\": {\n \"value\": 7\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 43
- },
- "digest": "3722cb3705b6bc7f486969deace3dd83",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_count\" : {\n \"value_count\" : {\n \"script\" : {\n \"source\" : \"doc['type'].value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_count": {
- "value_count": {
- "script": {
- "source": "doc['type'].value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 62
- },
- "digest": "213ab768f1b6a895e09403a0880e259a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"types_count\" : {\n \"value_count\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\" : {\n \"field\" : \"type\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "types_count": {
- "value_count": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "type"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 28
- },
- "digest": "25ed47fcb890fcf8d8518ae067362d18",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_average\": {\n \"avg\": {\n \"field\": \"rating\"\n }\n },\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"field\": \"rating\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_average": {
- "avg": {
- "field": "rating"
- }
- },
- "review_variability": {
- "median_absolute_deviation": {
- "field": "rating"
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 54
- },
- "digest": "9fce71dbeb1f002696732ec60ccd2e6e",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"review_average\": {\n \"value\": 3.0\n },\n \"review_variability\": {\n \"value\": 2.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 87
- },
- "digest": "9d662fc9f943c287b7144f5e4e2ae358",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"field\": \"rating\",\n \"compression\": 100\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_variability": {
- "median_absolute_deviation": {
- "field": "rating",
- "compression": 100
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 116
- },
- "digest": "bb964122f7d31b2f17c299d47ab3bdf3",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['rating'].value * params.scaleFactor\",\n \"params\": {\n \"scaleFactor\": 2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_variability": {
- "median_absolute_deviation": {
- "script": {
- "lang": "painless",
- "source": "doc['rating'].value * params.scaleFactor",
- "params": {
- "scaleFactor": 2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 140
- },
- "digest": "920362adc347f4268b29751d638b2e87",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"script\": {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"rating\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_variability": {
- "median_absolute_deviation": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "rating"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 170
- },
- "digest": "87f854393d715aabf4d45e90a8eb74ce",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"field\": \"rating\",\n \"missing\": 5\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_variability": {
- "median_absolute_deviation": {
- "field": "rating",
- "missing": 5
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 30
- },
- "digest": "2203588f4793e0e99ccd9240b5afdff7",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_boxplot\" : {\n \"boxplot\" : {\n \"field\" : \"load_time\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_boxplot": {
- "boxplot": {
- "field": "load_time"
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 49
- },
- "digest": "4a44dd3daabcf9f3624dfdb7d26e1c72",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_boxplot\": {\n \"min\": 0.0,\n \"max\": 990.0,\n \"q1\": 165.0,\n \"q2\": 445.0,\n \"q3\": 725.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 73
- },
- "digest": "c2d1756ceca8fdc40a2b97ea275de676",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_boxplot\" : {\n \"boxplot\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['load_time'].value / params.timeUnit\", <1>\n \"params\" : {\n \"timeUnit\" : 1000 <2>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_boxplot": {
- "boxplot": {
- "script": {
- "lang": "painless",
- "source": "doc['load_time'].value / params.timeUnit",
- "params": {
- "timeUnit": 1000
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 102
- },
- "digest": "ae2331b7e35af4bbc4df7b98f2527c7f",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_boxplot\" : {\n \"boxplot\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"load_time\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_boxplot": {
- "boxplot": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "load_time"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 143
- },
- "digest": "195af3fda6cb2811d40e22fc54cd3286",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_boxplot\" : {\n \"boxplot\" : {\n \"field\" : \"load_time\",\n \"compression\" : 200 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_boxplot": {
- "boxplot": {
- "field": "load_time",
- "compression": 200
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 170
- },
- "digest": "71387a61dd965479b767c8dcea1478a9",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grade_boxplot\" : {\n \"boxplot\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grade_boxplot": {
- "boxplot": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/adjacency-matrix-aggregation.asciidoc",
- "line": 32
- },
- "digest": "f88cdb3a962bb6f305f4a7ccc07bc0b0",
- "lang": "console",
- "found": [],
- "source": "PUT /emails/_bulk?refresh\n{ \"index\" : { \"_id\" : 1 } }\n{ \"accounts\" : [\"hillary\", \"sidney\"]}\n{ \"index\" : { \"_id\" : 2 } }\n{ \"accounts\" : [\"hillary\", \"donald\"]}\n{ \"index\" : { \"_id\" : 3 } }\n{ \"accounts\" : [\"vladimir\", \"donald\"]}\n\nGET emails/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"interactions\" : {\n \"adjacency_matrix\" : {\n \"filters\" : {\n \"grpA\" : { \"terms\" : { \"accounts\" : [\"hillary\", \"sidney\"] }},\n \"grpB\" : { \"terms\" : { \"accounts\" : [\"donald\", \"mitt\"] }},\n \"grpC\" : { \"terms\" : { \"accounts\" : [\"vladimir\", \"nigel\"] }}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/emails/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "accounts": [
- "hillary",
- "sidney"
- ]
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "accounts": [
- "hillary",
- "donald"
- ]
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "accounts": [
- "vladimir",
- "donald"
- ]
- }
- ],
- "params": {
- "index": "emails"
- },
- "api": "bulk"
- },
- {
- "method": "GET",
- "url": "/emails/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "interactions": {
- "adjacency_matrix": {
- "filters": {
- "grpA": {
- "terms": {
- "accounts": [
- "hillary",
- "sidney"
- ]
- }
- },
- "grpB": {
- "terms": {
- "accounts": [
- "donald",
- "mitt"
- ]
- }
- },
- "grpC": {
- "terms": {
- "accounts": [
- "vladimir",
- "nigel"
- ]
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "emails"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/adjacency-matrix-aggregation.asciidoc",
- "line": 66
- },
- "digest": "c1f8e4dbfebddcfa68163f094929ff74",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 9,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"interactions\": {\n \"buckets\": [\n {\n \"key\":\"grpA\",\n \"doc_count\": 2\n },\n {\n \"key\":\"grpA&grpB\",\n \"doc_count\": 1\n },\n {\n \"key\":\"grpB\",\n \"doc_count\": 2\n },\n {\n \"key\":\"grpB&grpC\",\n \"doc_count\": 1\n },\n {\n \"key\":\"grpC\",\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 14
- },
- "digest": "9f9123f67baff22429bca73f7cf48622",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"auto_date_histogram\" : {\n \"field\" : \"date\",\n \"buckets\" : 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 10
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 40
- },
- "digest": "941466b290eaa9a2685bbe32c73e887a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"auto_date_histogram\" : {\n \"field\" : \"date\",\n \"buckets\" : 5,\n \"format\" : \"yyyy-MM-dd\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 5,
- "format": "yyyy-MM-dd"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 61
- },
- "digest": "6681cbb3757f4c51006cae44b6c6e06a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"sales_over_time\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-01-01\",\n \"key\": 1420070400000,\n \"doc_count\": 3\n },\n {\n \"key_as_string\": \"2015-02-01\",\n \"key\": 1422748800000,\n \"doc_count\": 2\n },\n {\n \"key_as_string\": \"2015-03-01\",\n \"key\": 1425168000000,\n \"doc_count\": 2\n }\n ],\n \"interval\": \"1M\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 121
- },
- "digest": "06cd928a050b75f2bb207a548ac43d40",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"date\": \"2015-10-01T00:30:00Z\"\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"date\": \"2015-10-01T01:30:00Z\"\n}\n\nPUT my_index/_doc/3?refresh\n{\n \"date\": \"2015-10-01T02:30:00Z\"\n}\n\nGET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"auto_date_histogram\": {\n \"field\": \"date\",\n \"buckets\" : 3\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T00:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T01:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T02:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 3
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 154
- },
- "digest": "861de90753e4d31aaba4aa57fc95400a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-10-01T00:00:00.000Z\",\n \"key\": 1443657600000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T01:00:00.000Z\",\n \"key\": 1443661200000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T02:00:00.000Z\",\n \"key\": 1443664800000,\n \"doc_count\": 1\n }\n ],\n \"interval\": \"1h\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 187
- },
- "digest": "e16449c0f4eadb394761e9c2aff50fe6",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"auto_date_histogram\": {\n \"field\": \"date\",\n \"buckets\" : 3,\n \"time_zone\": \"-01:00\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 3,
- "time_zone": "-01:00"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 209
- },
- "digest": "7a23b07f42ed52868b374883e4be1348",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-09-30T23:00:00.000-01:00\", <1>\n \"key\": 1443657600000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T00:00:00.000-01:00\",\n \"key\": 1443661200000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T01:00:00.000-01:00\",\n \"key\": 1443664800000,\n \"doc_count\": 1\n }\n ],\n \"interval\": \"1h\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 273
- },
- "digest": "00abcf63bffec42e5d2c15011e989b37",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sale_date\" : {\n \"auto_date_histogram\" : {\n \"field\" : \"date\",\n \"buckets\": 10,\n \"minimum_interval\": \"minute\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sale_date": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 10,
- "minimum_interval": "minute"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 296
- },
- "digest": "89fe7b404791770a2075f2870fd65c3e",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sale_date\" : {\n \"auto_date_histogram\" : {\n \"field\" : \"date\",\n \"buckets\": 10,\n \"missing\": \"2000/01/01\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sale_date": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 10,
- "missing": "2000/01/01"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 13
- },
- "digest": "9399cbbd133ec2b7aad2820fa617ae3a",
- "lang": "console",
- "found": [],
- "source": "PUT child_example\n{\n \"mappings\": {\n \"properties\": {\n \"join\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": \"answer\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/child_example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "join": {
- "type": "join",
- "relations": {
- "question": "answer"
- }
- }
- }
- }
- },
- "params": {
- "index": "child_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 36
- },
- "digest": "dfdf82b8d99436582f150117695190b3",
- "lang": "console",
- "found": [],
- "source": "PUT child_example/_doc/1\n{\n \"join\": {\n \"name\": \"question\"\n },\n \"body\": \"I have Windows 2003 server and i bought a new Windows 2008 server...\",\n \"title\": \"Whats the best way to file transfer my site from server to a newer one?\",\n \"tags\": [\n \"windows-server-2003\",\n \"windows-server-2008\",\n \"file-transfer\"\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/child_example/_doc/1",
- "query": null,
- "body": {
- "join": {
- "name": "question"
- },
- "body": "I have Windows 2003 server and i bought a new Windows 2008 server...",
- "title": "Whats the best way to file transfer my site from server to a newer one?",
- "tags": [
- "windows-server-2003",
- "windows-server-2008",
- "file-transfer"
- ]
- },
- "params": {
- "index": "child_example",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 56
- },
- "digest": "e9fe3b53b5b6e1ff9566b5237c0fa513",
- "lang": "console",
- "found": [],
- "source": "PUT child_example/_doc/2?routing=1\n{\n \"join\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n },\n \"owner\": {\n \"location\": \"Norfolk, United Kingdom\",\n \"display_name\": \"Sam\",\n \"id\": 48\n },\n \"body\": \"
Unfortunately you're pretty much limited to FTP...\",\n \"creation_date\": \"2009-05-04T13:45:37.030\"\n}\n\nPUT child_example/_doc/3?routing=1&refresh\n{\n \"join\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n },\n \"owner\": {\n \"location\": \"Norfolk, United Kingdom\",\n \"display_name\": \"Troll\",\n \"id\": 49\n },\n \"body\": \"
Use Linux...\",\n \"creation_date\": \"2009-05-05T13:45:37.030\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/child_example/_doc/2",
- "query": {
- "routing": "1"
- },
- "body": {
- "join": {
- "name": "answer",
- "parent": "1"
- },
- "owner": {
- "location": "Norfolk, United Kingdom",
- "display_name": "Sam",
- "id": 48
- },
- "body": "Unfortunately you're pretty much limited to FTP...",
- "creation_date": "2009-05-04T13:45:37.030"
- },
- "params": {
- "index": "child_example",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/child_example/_doc/3",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "join": {
- "name": "answer",
- "parent": "1"
- },
- "owner": {
- "location": "Norfolk, United Kingdom",
- "display_name": "Troll",
- "id": 49
- },
- "body": "Use Linux...",
- "creation_date": "2009-05-05T13:45:37.030"
- },
- "params": {
- "index": "child_example",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 92
- },
- "digest": "d5132d34ae922fa8e898889b627a1405",
- "lang": "console",
- "found": [],
- "source": "POST child_example/_search?size=0\n{\n \"aggs\": {\n \"top-tags\": {\n \"terms\": {\n \"field\": \"tags.keyword\",\n \"size\": 10\n },\n \"aggs\": {\n \"to-answers\": {\n \"children\": {\n \"type\" : \"answer\" <1>\n },\n \"aggs\": {\n \"top-names\": {\n \"terms\": {\n \"field\": \"owner.display_name.keyword\",\n \"size\": 10\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/child_example/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "top-tags": {
- "terms": {
- "field": "tags.keyword",
- "size": 10
- },
- "aggs": {
- "to-answers": {
- "children": {
- "type": "answer"
- },
- "aggs": {
- "top-names": {
- "terms": {
- "field": "owner.display_name.keyword",
- "size": 10
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "child_example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 129
- },
- "digest": "31a7e249ea2a328e8eccc76800219af0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 25,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": []\n },\n \"aggregations\": {\n \"top-tags\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"file-transfer\",\n \"doc_count\": 1, <1>\n \"to-answers\": {\n \"doc_count\": 2, <2>\n \"top-names\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"Sam\",\n \"doc_count\": 1\n },\n {\n \"key\": \"Troll\",\n \"doc_count\": 1\n }\n ]\n }\n }\n },\n {\n \"key\": \"windows-server-2003\",\n \"doc_count\": 1, <1>\n \"to-answers\": {\n \"doc_count\": 2, <2>\n \"top-names\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"Sam\",\n \"doc_count\": 1\n },\n {\n \"key\": \"Troll\",\n \"doc_count\": 1\n }\n ]\n }\n }\n },\n {\n \"key\": \"windows-server-2008\",\n \"doc_count\": 1, <1>\n \"to-answers\": {\n \"doc_count\": 2, <2>\n \"top-names\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"Sam\",\n \"doc_count\": 1\n },\n {\n \"key\": \"Troll\",\n \"doc_count\": 1\n }\n ]\n }\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 117
- },
- "digest": "b0d7068cff901f2b91f8387628e3c2c0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"product\": { \"terms\" : { \"field\": \"product\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 136
- },
- "digest": "47f1e01d131fd50304dd35f1c459d222",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n {\n \"product\": {\n \"terms\" : {\n \"script\" : {\n \"source\": \"doc['product'].value\",\n \"lang\": \"painless\"\n }\n }\n }\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "product": {
- "terms": {
- "script": {
- "source": "doc['product'].value",
- "lang": "painless"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 172
- },
- "digest": "426eb07a1fc499df8ea30d8593a0d989",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"histo\": { \"histogram\" : { \"field\": \"price\", \"interval\": 5 } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "histo": {
- "histogram": {
- "field": "price",
- "interval": 5
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 191
- },
- "digest": "d4c5e4123e53daa39775def537365376",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n {\n \"histo\": {\n \"histogram\" : {\n \"interval\": 5,\n \"script\" : {\n \"source\": \"doc['price'].value\",\n \"lang\": \"painless\"\n }\n }\n }\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "histo": {
- "histogram": {
- "interval": 5,
- "script": {
- "source": "doc['price'].value",
- "lang": "painless"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 224
- },
- "digest": "4997db4f41283835e5a6250c454bec92",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"date\": { \"date_histogram\" : { \"field\": \"timestamp\", \"calendar_interval\": \"1d\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 254
- },
- "digest": "1c42bc684745178a587494809ab6ae57",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n {\n \"date\": {\n \"date_histogram\" : {\n \"field\": \"timestamp\",\n \"calendar_interval\": \"1d\",\n \"format\": \"yyyy-MM-dd\" <1>\n }\n }\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "format": "yyyy-MM-dd"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 295
- },
- "digest": "038bef10c90916a9addab866fc73dcca",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"date\": \"2015-10-01T05:30:00Z\"\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"date\": \"2015-10-01T06:30:00Z\"\n}\n\nGET my_index/_search?size=0\n{\n \"aggs\": {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n {\n \"date\": {\n \"date_histogram\" : {\n \"field\": \"date\",\n \"calendar_interval\": \"day\",\n \"offset\": \"+6h\",\n \"format\": \"iso8601\"\n }\n }\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T05:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T06:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day",
- "offset": "+6h",
- "format": "iso8601"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 332
- },
- "digest": "6577459aef49b998e80e45ec34277965",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_buckets\": {\n \"after_key\": { \"date\": \"2015-10-01T06:00:00.000Z\" },\n \"buckets\": [\n {\n \"key\": { \"date\": \"2015-09-30T06:00:00.000Z\" },\n \"doc_count\": 1\n },\n {\n \"key\": { \"date\": \"2015-10-01T06:00:00.000Z\" },\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 363
- },
- "digest": "7df600a962ddb9e75462cab1017ab710",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 386
- },
- "digest": "1559d896ef715c8997e773e8f26ded49",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"shop\": { \"terms\": {\"field\": \"shop\" } } },\n { \"product\": { \"terms\": { \"field\": \"product\" } } },\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "shop": {
- "terms": {
- "field": "shop"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- },
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 416
- },
- "digest": "1111d70f0ae3044b0a86c82b2ded5f74",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\", \"order\": \"asc\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product",
- "order": "asc"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 443
- },
- "digest": "441e1052c59a3d9182fd608c08e11169",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"product_name\": { \"terms\" : { \"field\": \"product\", \"missing_bucket\": true } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "product_name": {
- "terms": {
- "field": "product",
- "missing_bucket": true
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 483
- },
- "digest": "a84493b3b31741c9e1f998b59b40db82",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"size\": 2,\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "size": 2,
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 505
- },
- "digest": "cfd54d514967ff5692371513c98f2511",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_buckets\": {\n \"after_key\": {\n \"date\": 1494288000000,\n \"product\": \"mad max\"\n },\n \"buckets\": [\n {\n \"key\": {\n \"date\": 1494201600000,\n \"product\": \"rocky\"\n },\n \"doc_count\": 1\n },\n {\n \"key\": {\n \"date\": 1494288000000,\n \"product\": \"mad max\"\n },\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 541
- },
- "digest": "eac8d98e2bd0eb75e8428212e9f4e4a7",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"size\": 2,\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\", \"order\": \"asc\" } } }\n ],\n \"after\": { \"date\": 1494288000000, \"product\": \"mad max\" } <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "size": 2,
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product",
- "order": "asc"
- }
- }
- }
- ],
- "after": {
- "date": 1494288000000,
- "product": "mad max"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 573
- },
- "digest": "1d1186dc28cb5b11c19a8341ec1c0558",
- "lang": "console",
- "found": [],
- "source": "PUT twitter\n{\n \"settings\" : {\n \"index\" : {\n \"sort.field\" : [\"username\", \"timestamp\"], <1>\n \"sort.order\" : [\"asc\", \"desc\"] <2>\n }\n },\n \"mappings\": {\n \"properties\": {\n \"username\": {\n \"type\": \"keyword\",\n \"doc_values\": true\n },\n \"timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "sort.field": [
- "username",
- "timestamp"
- ],
- "sort.order": [
- "asc",
- "desc"
- ]
- }
- },
- "mappings": {
- "properties": {
- "username": {
- "type": "keyword",
- "doc_values": true
- },
- "timestamp": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 602
- },
- "digest": "ca3c86d8bb26a8a9422b4b628de03dc4",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"user_name\": { \"terms\" : { \"field\": \"user_name\" } } } <1>\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "user_name": {
- "terms": {
- "field": "user_name"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 621
- },
- "digest": "c98edce2074791ebad716b9a5b03215f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"user_name\": { \"terms\" : { \"field\": \"user_name\" } } }, <1>\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } } <2>\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "user_name": {
- "terms": {
- "field": "user_name"
- }
- }
- },
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 646
- },
- "digest": "b2d0d2f519a37b93b93889be7979ee5d",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"track_total_hits\": false,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"user_name\": { \"terms\" : { \"field\": \"user_name\" } } },\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "track_total_hits": false,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "user_name": {
- "terms": {
- "field": "user_name"
- }
- }
- },
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 685
- },
- "digest": "4a37d7d228d9cba63ebe7b9870dce531",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\" } } }\n ]\n },\n \"aggregations\": {\n \"the_avg\": {\n \"avg\": { \"field\": \"price\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- }
- ]
- },
- "aggregations": {
- "the_avg": {
- "avg": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 711
- },
- "digest": "b296d732aaf10cb37209b37062a35760",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_buckets\": {\n \"after_key\": {\n \"date\": 1494201600000,\n \"product\": \"rocky\"\n },\n \"buckets\": [\n {\n \"key\": {\n \"date\": 1494460800000,\n \"product\": \"apocalypse now\"\n },\n \"doc_count\": 1,\n \"the_avg\": {\n \"value\": 10.0\n }\n },\n {\n \"key\": {\n \"date\": 1494374400000,\n \"product\": \"mad max\"\n },\n \"doc_count\": 1,\n \"the_avg\": {\n \"value\": 27.0\n }\n },\n {\n \"key\": {\n \"date\": 1494288000000,\n \"product\" : \"mad max\"\n },\n \"doc_count\": 2,\n \"the_avg\": {\n \"value\": 22.5\n }\n },\n {\n \"key\": {\n \"date\": 1494201600000,\n \"product\": \"rocky\"\n },\n \"doc_count\": 1,\n \"the_avg\": {\n \"value\": 10.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 110
- },
- "digest": "b789292f9cf63ce912e058c46d90ce20",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 129
- },
- "digest": "73e5c88ad1488b213fb278ee1cb42289",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"2d\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "2d"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 206
- },
- "digest": "09ecba5814d71e4c44468575eada9878",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"fixed_interval\" : \"30d\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "fixed_interval": "30d"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 224
- },
- "digest": "2bb2339ac055337abf753bddb7771659",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"fixed_interval\" : \"2w\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "fixed_interval": "2w"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 295
- },
- "digest": "8a355eb25d2a01ba62dc1a22dd46f46f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"1M\",\n \"format\" : \"yyyy-MM-dd\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M",
- "format": "yyyy-MM-dd"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 316
- },
- "digest": "4b68a9a9a6e78ef609adf1c3067e5fea",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"sales_over_time\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-01-01\",\n \"key\": 1420070400000,\n \"doc_count\": 3\n },\n {\n \"key_as_string\": \"2015-02-01\",\n \"key\": 1422748800000,\n \"doc_count\": 2\n },\n {\n \"key_as_string\": \"2015-03-01\",\n \"key\": 1425168000000,\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 357
- },
- "digest": "70f0aa5853697e265ef3b1df72940951",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"date\": \"2015-10-01T00:30:00Z\"\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"date\": \"2015-10-01T01:30:00Z\"\n}\n\nGET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"day\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T00:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T01:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 386
- },
- "digest": "c58f9b02f68576dc466750382a93a10e",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-10-01T00:00:00.000Z\",\n \"key\": 1443657600000,\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 408
- },
- "digest": "8de3206f80e18185a5ad6481f4c2ee07",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"day\",\n \"time_zone\": \"-01:00\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day",
- "time_zone": "-01:00"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 428
- },
- "digest": "7505fd151b95c187a78278008393156b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-09-30T00:00:00.000-01:00\", <1>\n \"key\": 1443574800000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T00:00:00.000-01:00\", <1>\n \"key\": 1443661200000,\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 479
- },
- "digest": "aa6bfe54e2436eb668091fe31c2fbf4d",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"date\": \"2015-10-01T05:30:00Z\"\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"date\": \"2015-10-01T06:30:00Z\"\n}\n\nGET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"day\",\n \"offset\": \"+6h\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T05:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T06:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day",
- "offset": "+6h"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 510
- },
- "digest": "c53ad8df37e9f98b893b66fd3abbc6e7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-09-30T06:00:00.000Z\",\n \"key\": 1443592800000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T06:00:00.000Z\",\n \"key\": 1443679200000,\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 544
- },
- "digest": "9524a9b7373fa4eb2905183b0e806962",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"1M\",\n \"format\" : \"yyyy-MM-dd\",\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M",
- "format": "yyyy-MM-dd",
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 564
- },
- "digest": "63aa34a2f3e6b7a27bfe950a639cc026",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"sales_over_time\": {\n \"buckets\": {\n \"2015-01-01\": {\n \"key_as_string\": \"2015-01-01\",\n \"key\": 1420070400000,\n \"doc_count\": 3\n },\n \"2015-02-01\": {\n \"key_as_string\": \"2015-02-01\",\n \"key\": 1422748800000,\n \"doc_count\": 2\n },\n \"2015-03-01\": {\n \"key_as_string\": \"2015-03-01\",\n \"key\": 1425168000000,\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 613
- },
- "digest": "39a6a038c4b551022afe83de0523634e",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sale_date\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\": \"year\",\n \"missing\": \"2000/01/01\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sale_date": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "year",
- "missing": "2000/01/01"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 646
- },
- "digest": "6faf10a73f7d5fffbcb037bdb2cbaff8",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"dayOfWeek\": {\n \"terms\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['date'].value.dayOfWeekEnum.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "dayOfWeek": {
- "terms": {
- "script": {
- "lang": "painless",
- "source": "doc['date'].value.dayOfWeekEnum.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 666
- },
- "digest": "6bd571871fdea8a323c86bea18188120",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"dayOfWeek\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"7\",\n \"doc_count\": 4\n },\n {\n \"key\": \"4\",\n \"doc_count\": 3\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 16
- },
- "digest": "a27c42ae4897ee6d2f6be3ddf80a8b3e",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"format\": \"MM-yyyy\",\n \"ranges\": [\n { \"to\": \"now-10M/M\" }, <1>\n { \"from\": \"now-10M/M\" } <2>\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "format": "MM-yyyy",
- "ranges": [
- {
- "to": "now-10M/M"
- },
- {
- "from": "now-10M/M"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 45
- },
- "digest": "26e6779741c2e4970eceb02ced279041",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"range\": {\n \"buckets\": [\n {\n \"to\": 1.4436576E12,\n \"to_as_string\": \"10-2015\",\n \"doc_count\": 7,\n \"key\": \"*-10-2015\"\n },\n {\n \"from\": 1.4436576E12,\n \"from_as_string\": \"10-2015\",\n \"doc_count\": 0,\n \"key\": \"10-2015-*\"\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 78
- },
- "digest": "a6ef8cd8c8218d547727ffc5485bfbd7",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"missing\": \"1976/11/30\",\n \"ranges\": [\n {\n \"key\": \"Older\",\n \"to\": \"2016/02/01\"\n }, <1>\n {\n \"key\": \"Newer\",\n \"from\": \"2016/02/01\",\n \"to\" : \"now/d\"\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "missing": "1976/11/30",
- "ranges": [
- {
- "key": "Older",
- "to": "2016/02/01"
- },
- {
- "key": "Newer",
- "from": "2016/02/01",
- "to": "now/d"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 269
- },
- "digest": "901d66919e584515717bf78ab5ca2cbb",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"time_zone\": \"CET\",\n \"ranges\": [\n { \"to\": \"2016/02/01\" }, <1>\n { \"from\": \"2016/02/01\", \"to\" : \"now/d\" }, <2>\n { \"from\": \"now/d\" }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "time_zone": "CET",
- "ranges": [
- {
- "to": "2016/02/01"
- },
- {
- "from": "2016/02/01",
- "to": "now/d"
- },
- {
- "from": "now/d"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 298
- },
- "digest": "83721157085b4e5a8a5ed3ede88b3690",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"format\": \"MM-yyy\",\n \"ranges\": [\n { \"to\": \"now-10M/M\" },\n { \"from\": \"now-10M/M\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "format": "MM-yyy",
- "ranges": [
- {
- "to": "now-10M/M"
- },
- {
- "from": "now-10M/M"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 321
- },
- "digest": "060755fcdff99fcc18a565619df3499b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"range\": {\n \"buckets\": {\n \"*-10-2015\": {\n \"to\": 1.4436576E12,\n \"to_as_string\": \"10-2015\",\n \"doc_count\": 7\n },\n \"10-2015-*\": {\n \"from\": 1.4436576E12,\n \"from_as_string\": \"10-2015\",\n \"doc_count\": 0\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 347
- },
- "digest": "2d1c675b3cb93119219a13db93262c1e",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"format\": \"MM-yyy\",\n \"ranges\": [\n { \"from\": \"01-2015\", \"to\": \"03-2015\", \"key\": \"quarter_01\" },\n { \"from\": \"03-2015\", \"to\": \"06-2015\", \"key\": \"quarter_02\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "format": "MM-yyy",
- "ranges": [
- {
- "from": "01-2015",
- "to": "03-2015",
- "key": "quarter_01"
- },
- {
- "from": "03-2015",
- "to": "06-2015",
- "key": "quarter_02"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 370
- },
- "digest": "04f37bb8f2d45e3ccf0ea89abfab9c67",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"range\": {\n \"buckets\": {\n \"quarter_01\": {\n \"from\": 1.4200704E12,\n \"from_as_string\": \"01-2015\",\n \"to\": 1.425168E12,\n \"to_as_string\": \"03-2015\",\n \"doc_count\": 5\n },\n \"quarter_02\": {\n \"from\": 1.425168E12,\n \"from_as_string\": \"03-2015\",\n \"to\": 1.4331168E12,\n \"to_as_string\": \"06-2015\",\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/diversified-sampler-aggregation.asciidoc",
- "line": 30
- },
- "digest": "3344c3478f1e8bbbef683757638a34f4",
- "lang": "console",
- "found": [],
- "source": "POST /stackoverflow/_search?size=0\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"tags:elasticsearch\"\n }\n },\n \"aggs\": {\n \"my_unbiased_sample\": {\n \"diversified_sampler\": {\n \"shard_size\": 200,\n \"field\" : \"author\"\n },\n \"aggs\": {\n \"keywords\": {\n \"significant_terms\": {\n \"field\": \"tags\",\n \"exclude\": [\"elasticsearch\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/stackoverflow/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "tags:elasticsearch"
- }
- },
- "aggs": {
- "my_unbiased_sample": {
- "diversified_sampler": {
- "shard_size": 200,
- "field": "author"
- },
- "aggs": {
- "keywords": {
- "significant_terms": {
- "field": "tags",
- "exclude": [
- "elasticsearch"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "stackoverflow"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/diversified-sampler-aggregation.asciidoc",
- "line": 61
- },
- "digest": "d1753ad4ec54b1c45d807263bad697cb",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_unbiased_sample\": {\n \"doc_count\": 151,<1>\n \"keywords\": {<2>\n \"doc_count\": 151,\n \"bg_count\": 650,\n \"buckets\": [\n {\n \"key\": \"kibana\",\n \"doc_count\": 150,\n \"score\": 2.213,\n \"bg_count\": 200\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/diversified-sampler-aggregation.asciidoc",
- "line": 95
- },
- "digest": "07afce825c09de17a3d73a02b17a0a97",
- "lang": "console",
- "found": [],
- "source": "POST /stackoverflow/_search?size=0\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"tags:kibana\"\n }\n },\n \"aggs\": {\n \"my_unbiased_sample\": {\n \"diversified_sampler\": {\n \"shard_size\": 200,\n \"max_docs_per_value\" : 3,\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['tags'].hashCode()\"\n }\n },\n \"aggs\": {\n \"keywords\": {\n \"significant_terms\": {\n \"field\": \"tags\",\n \"exclude\": [\"kibana\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/stackoverflow/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "tags:kibana"
- }
- },
- "aggs": {
- "my_unbiased_sample": {
- "diversified_sampler": {
- "shard_size": 200,
- "max_docs_per_value": 3,
- "script": {
- "lang": "painless",
- "source": "doc['tags'].hashCode()"
- }
- },
- "aggs": {
- "keywords": {
- "significant_terms": {
- "field": "tags",
- "exclude": [
- "kibana"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "stackoverflow"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/diversified-sampler-aggregation.asciidoc",
- "line": 130
- },
- "digest": "c7ebd0dfce616a0f566d57b6a5f88f7c",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_unbiased_sample\": {\n \"doc_count\": 6,\n \"keywords\": {\n \"doc_count\": 6,\n \"bg_count\": 650,\n \"buckets\": [\n {\n \"key\": \"logstash\",\n \"doc_count\": 3,\n \"score\": 2.213,\n \"bg_count\": 50\n },\n {\n \"key\": \"elasticsearch\",\n \"doc_count\": 3,\n \"score\": 1.34,\n \"bg_count\": 200\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filter-aggregation.asciidoc",
- "line": 9
- },
- "digest": "b93ed4ef309819734f0eeea82e8b0f1f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"t_shirts\" : {\n \"filter\" : { \"term\": { \"type\": \"t-shirt\" } },\n \"aggs\" : {\n \"avg_price\" : { \"avg\" : { \"field\" : \"price\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "t_shirts": {
- "filter": {
- "term": {
- "type": "t-shirt"
- }
- },
- "aggs": {
- "avg_price": {
- "avg": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filter-aggregation.asciidoc",
- "line": 29
- },
- "digest": "cc5ee999726a7b866098e8e312191766",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"t_shirts\" : {\n \"doc_count\" : 3,\n \"avg_price\" : { \"value\" : 128.33333333333334 }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 11
- },
- "digest": "188e6208cccb13027a5c1c95440841ee",
- "lang": "console",
- "found": [],
- "source": "PUT /logs/_bulk?refresh\n{ \"index\" : { \"_id\" : 1 } }\n{ \"body\" : \"warning: page could not be rendered\" }\n{ \"index\" : { \"_id\" : 2 } }\n{ \"body\" : \"authentication error\" }\n{ \"index\" : { \"_id\" : 3 } }\n{ \"body\" : \"warning: connection timed out\" }\n\nGET logs/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"messages\" : {\n \"filters\" : {\n \"filters\" : {\n \"errors\" : { \"match\" : { \"body\" : \"error\" }},\n \"warnings\" : { \"match\" : { \"body\" : \"warning\" }}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "body": "warning: page could not be rendered"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "body": "authentication error"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "body": "warning: connection timed out"
- }
- ],
- "params": {
- "index": "logs"
- },
- "api": "bulk"
- },
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "messages": {
- "filters": {
- "filters": {
- "errors": {
- "match": {
- "body": "error"
- }
- },
- "warnings": {
- "match": {
- "body": "warning"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 43
- },
- "digest": "9024c429b700eef896a8f12aa96b1dd3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 9,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"messages\": {\n \"buckets\": {\n \"errors\": {\n \"doc_count\": 1\n },\n \"warnings\": {\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 73
- },
- "digest": "3cd2f7f9096a8e8180f27b6c30e71840",
- "lang": "console",
- "found": [],
- "source": "GET logs/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"messages\" : {\n \"filters\" : {\n \"filters\" : [\n { \"match\" : { \"body\" : \"error\" }},\n { \"match\" : { \"body\" : \"warning\" }}\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "messages": {
- "filters": {
- "filters": [
- {
- "match": {
- "body": "error"
- }
- },
- {
- "match": {
- "body": "warning"
- }
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 95
- },
- "digest": "be0d6421c3fa5bed737f55c6f44ca5d5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 4,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"messages\": {\n \"buckets\": [\n {\n \"doc_count\": 1\n },\n {\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 135
- },
- "digest": "21bb03ca9123de3237c1c76934f9f172",
- "lang": "console",
- "found": [],
- "source": "PUT logs/_doc/4?refresh\n{\n \"body\": \"info: user Bob logged out\"\n}\n\nGET logs/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"messages\" : {\n \"filters\" : {\n \"other_bucket_key\": \"other_messages\",\n \"filters\" : {\n \"errors\" : { \"match\" : { \"body\" : \"error\" }},\n \"warnings\" : { \"match\" : { \"body\" : \"warning\" }}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs/_doc/4",
- "query": {
- "refresh": true
- },
- "body": {
- "body": "info: user Bob logged out"
- },
- "params": {
- "index": "logs",
- "id": "4"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "messages": {
- "filters": {
- "other_bucket_key": "other_messages",
- "filters": {
- "errors": {
- "match": {
- "body": "error"
- }
- },
- "warnings": {
- "match": {
- "body": "warning"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 162
- },
- "digest": "8f7dede7e1320bde1a4ebbf22da9a9a8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 3,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"messages\": {\n \"buckets\": {\n \"errors\": {\n \"doc_count\": 1\n },\n \"warnings\": {\n \"doc_count\": 2\n },\n \"other_messages\": {\n \"doc_count\": 1\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 7
- },
- "digest": "9bf956f9d3f27bb7b4e5a03af84d5da5",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings_around_amsterdam\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"ranges\" : [\n { \"to\" : 100000 },\n { \"from\" : 100000, \"to\" : 300000 },\n { \"from\" : 300000 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings_around_amsterdam": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "ranges": [
- {
- "to": 100000
- },
- {
- "from": 100000,
- "to": 300000
- },
- {
- "from": 300000
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 54
- },
- "digest": "a3bd9eb63ad4bd236a2c0feed0607960",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"rings_around_amsterdam\" : {\n \"buckets\": [\n {\n \"key\": \"*-100000.0\",\n \"from\": 0.0,\n \"to\": 100000.0,\n \"doc_count\": 3\n },\n {\n \"key\": \"100000.0-300000.0\",\n \"from\": 100000.0,\n \"to\": 300000.0,\n \"doc_count\": 1\n },\n {\n \"key\": \"300000.0-*\",\n \"from\": 300000.0,\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 93
- },
- "digest": "c78b80d080a58090583228421ac1553d",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"unit\" : \"km\", <1>\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 300 },\n { \"from\" : 300 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "unit": "km",
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 300
- },
- {
- "from": 300
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 119
- },
- "digest": "a5736ad3638c238e3b15c9fdaa1f29f7",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"unit\" : \"km\",\n \"distance_type\" : \"plane\",\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 300 },\n { \"from\" : 300 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "unit": "km",
- "distance_type": "plane",
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 300
- },
- {
- "from": 300
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 146
- },
- "digest": "6b31f435607617d96b1dff3bf10c9d8c",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings_around_amsterdam\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"ranges\" : [\n { \"to\" : 100000 },\n { \"from\" : 100000, \"to\" : 300000 },\n { \"from\" : 300000 }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings_around_amsterdam": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "ranges": [
- {
- "to": 100000
- },
- {
- "from": 100000,
- "to": 300000
- },
- {
- "from": 300000
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 170
- },
- "digest": "cf73842533f37413f9044e734bf03220",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"rings_around_amsterdam\" : {\n \"buckets\": {\n \"*-100000.0\": {\n \"from\": 0.0,\n \"to\": 100000.0,\n \"doc_count\": 3\n },\n \"100000.0-300000.0\": {\n \"from\": 100000.0,\n \"to\": 300000.0,\n \"doc_count\": 1\n },\n \"300000.0-*\": {\n \"from\": 300000.0,\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 200
- },
- "digest": "c5afc3d716fdf8c0eefa4732e8a4b3ee",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings_around_amsterdam\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"ranges\" : [\n { \"to\" : 100000, \"key\": \"first_ring\" },\n { \"from\" : 100000, \"to\" : 300000, \"key\": \"second_ring\" },\n { \"from\" : 300000, \"key\": \"third_ring\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings_around_amsterdam": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "ranges": [
- {
- "to": 100000,
- "key": "first_ring"
- },
- {
- "from": 100000,
- "to": 300000,
- "key": "second_ring"
- },
- {
- "from": 300000,
- "key": "third_ring"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 224
- },
- "digest": "7511aeeb2878c0b3e01b3557027ce575",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"rings_around_amsterdam\" : {\n \"buckets\": {\n \"first_ring\": {\n \"from\": 0.0,\n \"to\": 100000.0,\n \"doc_count\": 3\n },\n \"second_ring\": {\n \"from\": 100000.0,\n \"to\": 300000.0,\n \"doc_count\": 1\n },\n \"third_ring\": {\n \"from\": 300000.0,\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 21
- },
- "digest": "71af0fec59d37477c850d47730d3f286",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"large-grid\" : {\n \"geohash_grid\" : {\n \"field\" : \"location\",\n \"precision\" : 3\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "large-grid": {
- "geohash_grid": {
- "field": "location",
- "precision": 3
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 63
- },
- "digest": "3d844e84b3d980d735c327d4f4602b2b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"large-grid\": {\n \"buckets\": [\n {\n \"key\": \"u17\",\n \"doc_count\": 3\n },\n {\n \"key\": \"u09\",\n \"doc_count\": 2\n },\n {\n \"key\": \"u15\",\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 93
- },
- "digest": "9f0c6a8c6381bb0cb81a3070dd2bf2f2",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"location\" : {\n \"top_left\" : \"52.4, 4.9\",\n \"bottom_right\" : \"52.3, 5.0\"\n }\n }\n },\n \"aggregations\":{\n \"zoom1\":{\n \"geohash_grid\" : {\n \"field\": \"location\",\n \"precision\": 8\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "zoomed-in": {
- "filter": {
- "geo_bounding_box": {
- "location": {
- "top_left": "52.4, 4.9",
- "bottom_right": "52.3, 5.0"
- }
- }
- },
- "aggregations": {
- "zoom1": {
- "geohash_grid": {
- "field": "location",
- "precision": 8
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 124
- },
- "digest": "36f61e038014f92466cd83d7b007e16b",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"location\" : {\n \"top_left\" : \"u17\",\n \"bottom_right\" : \"u17\"\n }\n }\n },\n \"aggregations\":{\n \"zoom1\":{\n \"geohash_grid\" : {\n \"field\": \"location\",\n \"precision\": 8\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "zoomed-in": {
- "filter": {
- "geo_bounding_box": {
- "location": {
- "top_left": "u17",
- "bottom_right": "u17"
- }
- }
- },
- "aggregations": {
- "zoom1": {
- "geohash_grid": {
- "field": "location",
- "precision": 8
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 152
- },
- "digest": "0846b119686525270f2065832720df34",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"doc_count\" : 3,\n \"zoom1\" : {\n \"buckets\" : [\n {\n \"key\" : \"u173zy3j\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"u173zvfz\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"u173zt90\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 206
- },
- "digest": "850c30e63e2237776a7ed299f0262316",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"tiles-in-bounds\" : {\n \"geohash_grid\" : {\n \"field\" : \"location\",\n \"precision\" : 8,\n \"bounds\": {\n \"top_left\" : \"53.4375, 4.21875\",\n \"bottom_right\" : \"52.03125, 5.625\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "tiles-in-bounds": {
- "geohash_grid": {
- "field": "location",
- "precision": 8,
- "bounds": {
- "top_left": "53.4375, 4.21875",
- "bottom_right": "52.03125, 5.625"
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 226
- },
- "digest": "28025af4e9cc45d29040b5ff8078530e",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"tiles-in-bounds\" : {\n \"buckets\" : [\n {\n \"key\" : \"u173zy3j\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"u173zvfz\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"u173zt90\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 34
- },
- "digest": "86f1e66bc101b3f22dc84d2aa172fd75",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"large-grid\" : {\n \"geotile_grid\" : {\n \"field\" : \"location\",\n \"precision\" : 8\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "large-grid": {
- "geotile_grid": {
- "field": "location",
- "precision": 8
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 76
- },
- "digest": "c62e00cc03f0c034220d321408c4cfb7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"large-grid\": {\n \"buckets\": [\n {\n \"key\" : \"8/131/84\",\n \"doc_count\" : 3\n },\n {\n \"key\" : \"8/129/88\",\n \"doc_count\" : 2\n },\n {\n \"key\" : \"8/131/85\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 109
- },
- "digest": "57705815ad6bd50d91e58153ae75d3ca",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"location\" : {\n \"top_left\" : \"52.4, 4.9\",\n \"bottom_right\" : \"52.3, 5.0\"\n }\n }\n },\n \"aggregations\":{\n \"zoom1\":{\n \"geotile_grid\" : {\n \"field\": \"location\",\n \"precision\": 22\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "zoomed-in": {
- "filter": {
- "geo_bounding_box": {
- "location": {
- "top_left": "52.4, 4.9",
- "bottom_right": "52.3, 5.0"
- }
- }
- },
- "aggregations": {
- "zoom1": {
- "geotile_grid": {
- "field": "location",
- "precision": 22
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 137
- },
- "digest": "f39887c8b62da4c01c78aba943b3bf61",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"doc_count\" : 3,\n \"zoom1\" : {\n \"buckets\" : [\n {\n \"key\" : \"22/2154412/1378379\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"22/2154385/1378332\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"22/2154259/1378425\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 177
- },
- "digest": "473bc08acc95689e256c7160fec07c0c",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"tiles-in-bounds\" : {\n \"geotile_grid\" : {\n \"field\" : \"location\",\n \"precision\" : 22,\n \"bounds\": {\n \"top_left\" : \"52.4, 4.9\",\n \"bottom_right\" : \"52.3, 5.0\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "tiles-in-bounds": {
- "geotile_grid": {
- "field": "location",
- "precision": 22,
- "bounds": {
- "top_left": "52.4, 4.9",
- "bottom_right": "52.3, 5.0"
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 197
- },
- "digest": "dee2fe5d2073aec109f87c1e279e4405",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"tiles-in-bounds\" : {\n \"buckets\" : [\n {\n \"key\" : \"22/2154412/1378379\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"22/2154385/1378332\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"22/2154259/1378425\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/global-aggregation.asciidoc",
- "line": 15
- },
- "digest": "d209f2447584a37e7f1480912b40a52d",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"match\" : { \"type\" : \"t-shirt\" }\n },\n \"aggs\" : {\n \"all_products\" : {\n \"global\" : {}, <1>\n \"aggs\" : { <2>\n \"avg_price\" : { \"avg\" : { \"field\" : \"price\" } }\n }\n },\n \"t_shirts\": { \"avg\" : { \"field\" : \"price\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "match": {
- "type": "t-shirt"
- }
- },
- "aggs": {
- "all_products": {
- "global": {},
- "aggs": {
- "avg_price": {
- "avg": {
- "field": "price"
- }
- }
- }
- },
- "t_shirts": {
- "avg": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/global-aggregation.asciidoc",
- "line": 45
- },
- "digest": "59969f7a7748a0370af34cf0611335eb",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"all_products\" : {\n \"doc_count\" : 7, <1>\n \"avg_price\" : {\n \"value\" : 140.71428571428572 <2>\n }\n },\n \"t_shirts\": {\n \"value\" : 128.33333333333334 <3>\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 28
- },
- "digest": "322e1a8842fc5924b972a9a32c29c17a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"prices\" : {\n \"histogram\" : {\n \"field\" : \"price\",\n \"interval\" : 50\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "prices": {
- "histogram": {
- "field": "price",
- "interval": 50
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 46
- },
- "digest": "686a2a1139ff717e0b088f017af0b51b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"prices\" : {\n \"buckets\": [\n {\n \"key\": 0.0,\n \"doc_count\": 1\n },\n {\n \"key\": 50.0,\n \"doc_count\": 1\n },\n {\n \"key\": 100.0,\n \"doc_count\": 0\n },\n {\n \"key\": 150.0,\n \"doc_count\": 2\n },\n {\n \"key\": 200.0,\n \"doc_count\": 3\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 86
- },
- "digest": "0003e4064d004a341c193ddd5d82a07f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"prices\" : {\n \"histogram\" : {\n \"field\" : \"price\",\n \"interval\" : 50,\n \"min_doc_count\" : 1\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "prices": {
- "histogram": {
- "field": "price",
- "interval": 50,
- "min_doc_count": 1
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 105
- },
- "digest": "ef9ab5c482c12f73a296a99504417fb1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"prices\" : {\n \"buckets\": [\n {\n \"key\": 0.0,\n \"doc_count\": 1\n },\n {\n \"key\": 50.0,\n \"doc_count\": 1\n },\n {\n \"key\": 150.0,\n \"doc_count\": 2\n },\n {\n \"key\": 200.0,\n \"doc_count\": 3\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 161
- },
- "digest": "c72bd866a7e21907fa71f1067371db55",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : { \"filter\": { \"range\" : { \"price\" : { \"to\" : \"500\" } } } }\n },\n \"aggs\" : {\n \"prices\" : {\n \"histogram\" : {\n \"field\" : \"price\",\n \"interval\" : 50,\n \"extended_bounds\" : {\n \"min\" : 0,\n \"max\" : 500\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "range": {
- "price": {
- "to": "500"
- }
- }
- }
- }
- },
- "aggs": {
- "prices": {
- "histogram": {
- "field": "price",
- "interval": 50,
- "extended_bounds": {
- "min": 0,
- "max": 500
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 213
- },
- "digest": "e0bba0f00a589933499493390a9a0517",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"prices\" : {\n \"histogram\" : {\n \"field\" : \"price\",\n \"interval\" : 50,\n \"keyed\" : true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "prices": {
- "histogram": {
- "field": "price",
- "interval": 50,
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 232
- },
- "digest": "7047beff5554790b5fa4a3daadb535f6",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"prices\": {\n \"buckets\": {\n \"0.0\": {\n \"key\": 0.0,\n \"doc_count\": 1\n },\n \"50.0\": {\n \"key\": 50.0,\n \"doc_count\": 1\n },\n \"100.0\": {\n \"key\": 100.0,\n \"doc_count\": 0\n },\n \"150.0\": {\n \"key\": 150.0,\n \"doc_count\": 2\n },\n \"200.0\": {\n \"key\": 200.0,\n \"doc_count\": 3\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 272
- },
- "digest": "271c55d9a421dbc794caa0ebaead95e3",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"quantity\" : {\n \"histogram\" : {\n \"field\" : \"quantity\",\n \"interval\": 10,\n \"missing\": 0 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "quantity": {
- "histogram": {
- "field": "quantity",
- "interval": 10,
- "missing": 0
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 9
- },
- "digest": "01cc705f6074ab637cfbb9f92cf44e44",
- "lang": "console",
- "found": [],
- "source": "GET /ip_addresses/_search\n{\n \"size\": 10,\n \"aggs\" : {\n \"ip_ranges\" : {\n \"ip_range\" : {\n \"field\" : \"ip\",\n \"ranges\" : [\n { \"to\" : \"10.0.0.5\" },\n { \"from\" : \"10.0.0.5\" }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/ip_addresses/_search",
- "query": null,
- "body": {
- "size": 10,
- "aggs": {
- "ip_ranges": {
- "ip_range": {
- "field": "ip",
- "ranges": [
- {
- "to": "10.0.0.5"
- },
- {
- "from": "10.0.0.5"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "ip_addresses"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 31
- },
- "digest": "1ba6dc327a97366eeef7173a9fc4b250",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"ip_ranges\": {\n \"buckets\" : [\n {\n \"key\": \"*-10.0.0.5\",\n \"to\": \"10.0.0.5\",\n \"doc_count\": 10\n },\n {\n \"key\": \"10.0.0.5-*\",\n \"from\": \"10.0.0.5\",\n \"doc_count\": 260\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 58
- },
- "digest": "9f4ba6565d80e0964e177eaac9fb0614",
- "lang": "console",
- "found": [],
- "source": "GET /ip_addresses/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"ip_ranges\" : {\n \"ip_range\" : {\n \"field\" : \"ip\",\n \"ranges\" : [\n { \"mask\" : \"10.0.0.0/25\" },\n { \"mask\" : \"10.0.0.127/25\" }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/ip_addresses/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "ip_ranges": {
- "ip_range": {
- "field": "ip",
- "ranges": [
- {
- "mask": "10.0.0.0/25"
- },
- {
- "mask": "10.0.0.127/25"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "ip_addresses"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 80
- },
- "digest": "a60f7bec5b654207d2c1b7459b55eb95",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"ip_ranges\": {\n \"buckets\": [\n {\n \"key\": \"10.0.0.0/25\",\n \"from\": \"10.0.0.0\",\n \"to\": \"10.0.0.128\",\n \"doc_count\": 128\n },\n {\n \"key\": \"10.0.0.127/25\",\n \"from\": \"10.0.0.0\",\n \"to\": \"10.0.0.128\",\n \"doc_count\": 128\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 111
- },
- "digest": "c4db73a276175d57c6a9a0387e728028",
- "lang": "console",
- "found": [],
- "source": "GET /ip_addresses/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"ip_ranges\": {\n \"ip_range\": {\n \"field\": \"ip\",\n \"ranges\": [\n { \"to\" : \"10.0.0.5\" },\n { \"from\" : \"10.0.0.5\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/ip_addresses/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "ip_ranges": {
- "ip_range": {
- "field": "ip",
- "ranges": [
- {
- "to": "10.0.0.5"
- },
- {
- "from": "10.0.0.5"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "ip_addresses"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 134
- },
- "digest": "d5be17fc0678dad0a2ba0e7c65c8d5b1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"ip_ranges\": {\n \"buckets\": {\n \"*-10.0.0.5\": {\n \"to\": \"10.0.0.5\",\n \"doc_count\": 10\n },\n \"10.0.0.5-*\": {\n \"from\": \"10.0.0.5\",\n \"doc_count\": 260\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 159
- },
- "digest": "fa8ee2094af36e7ec02233a4c7b008bc",
- "lang": "console",
- "found": [],
- "source": "GET /ip_addresses/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"ip_ranges\": {\n \"ip_range\": {\n \"field\": \"ip\",\n \"ranges\": [\n { \"key\": \"infinity\", \"to\" : \"10.0.0.5\" },\n { \"key\": \"and-beyond\", \"from\" : \"10.0.0.5\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/ip_addresses/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "ip_ranges": {
- "ip_range": {
- "field": "ip",
- "ranges": [
- {
- "key": "infinity",
- "to": "10.0.0.5"
- },
- {
- "key": "and-beyond",
- "from": "10.0.0.5"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "ip_addresses"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 182
- },
- "digest": "de137a4ba0b8a83dc41471287c52b6ae",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"ip_ranges\": {\n \"buckets\": {\n \"infinity\": {\n \"to\": \"10.0.0.5\",\n \"doc_count\": 10\n },\n \"and-beyond\": {\n \"from\": \"10.0.0.5\",\n \"doc_count\": 260\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/missing-aggregation.asciidoc",
- "line": 9
- },
- "digest": "09dd80a4b937315d4a1aa629b22f9332",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"products_without_a_price\" : {\n \"missing\" : { \"field\" : \"price\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "products_without_a_price": {
- "missing": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/missing-aggregation.asciidoc",
- "line": 26
- },
- "digest": "357ba4c93cefb311862acf2ad4f86bb9",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"products_without_a_price\" : {\n \"doc_count\" : 00\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/nested-aggregation.asciidoc",
- "line": 10
- },
- "digest": "60917d97013c4516c621c6c24c29748f",
- "lang": "console",
- "found": [],
- "source": "PUT /products\n{\n \"mappings\": {\n \"properties\" : {\n \"resellers\" : { <1>\n \"type\" : \"nested\",\n \"properties\" : {\n \"reseller\" : { \"type\" : \"text\" },\n \"price\" : { \"type\" : \"double\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/products",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "resellers": {
- "type": "nested",
- "properties": {
- "reseller": {
- "type": "text"
- },
- "price": {
- "type": "double"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "products"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/nested-aggregation.asciidoc",
- "line": 31
- },
- "digest": "a1849d3cb44fc24b58323ec97c5e9c5c",
- "lang": "console",
- "found": [],
- "source": "PUT /products/_doc/0\n{\n \"name\": \"LED TV\", <1>\n \"resellers\": [\n {\n \"reseller\": \"companyA\",\n \"price\": 350\n },\n {\n \"reseller\": \"companyB\",\n \"price\": 500\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/products/_doc/0",
- "query": null,
- "body": {
- "name": "LED TV",
- "resellers": [
- {
- "reseller": "companyA",
- "price": 350
- },
- {
- "reseller": "companyB",
- "price": 500
- }
- ]
- },
- "params": {
- "index": "products",
- "id": "0"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/nested-aggregation.asciidoc",
- "line": 55
- },
- "digest": "be91aeed1af812064943dd5192425ab2",
- "lang": "console",
- "found": [],
- "source": "GET /products/_search\n{\n \"query\" : {\n \"match\" : { \"name\" : \"led tv\" }\n },\n \"aggs\" : {\n \"resellers\" : {\n \"nested\" : {\n \"path\" : \"resellers\"\n },\n \"aggs\" : {\n \"min_price\" : { \"min\" : { \"field\" : \"resellers.price\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/products/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "name": "led tv"
- }
- },
- "aggs": {
- "resellers": {
- "nested": {
- "path": "resellers"
- },
- "aggs": {
- "min_price": {
- "min": {
- "field": "resellers.price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "products"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/nested-aggregation.asciidoc",
- "line": 82
- },
- "digest": "b8c2e035130102335a58e11e60562793",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"resellers\": {\n \"doc_count\": 2,\n \"min_price\": {\n \"value\": 350\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 13
- },
- "digest": "1db086021e83205b6eab3b7765911cc2",
- "lang": "console",
- "found": [],
- "source": "PUT parent_example\n{\n \"mappings\": {\n \"properties\": {\n \"join\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": \"answer\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/parent_example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "join": {
- "type": "join",
- "relations": {
- "question": "answer"
- }
- }
- }
- }
- },
- "params": {
- "index": "parent_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 36
- },
- "digest": "c9afa715021f2e6450e72ac73271960c",
- "lang": "console",
- "found": [],
- "source": "PUT parent_example/_doc/1\n{\n \"join\": {\n \"name\": \"question\"\n },\n \"body\": \"
I have Windows 2003 server and i bought a new Windows 2008 server...\",\n \"title\": \"Whats the best way to file transfer my site from server to a newer one?\",\n \"tags\": [\n \"windows-server-2003\",\n \"windows-server-2008\",\n \"file-transfer\"\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/parent_example/_doc/1",
- "query": null,
- "body": {
- "join": {
- "name": "question"
- },
- "body": "I have Windows 2003 server and i bought a new Windows 2008 server...",
- "title": "Whats the best way to file transfer my site from server to a newer one?",
- "tags": [
- "windows-server-2003",
- "windows-server-2008",
- "file-transfer"
- ]
- },
- "params": {
- "index": "parent_example",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 56
- },
- "digest": "d8310e5606c61e7a6e64a90838b1a830",
- "lang": "console",
- "found": [],
- "source": "PUT parent_example/_doc/2?routing=1\n{\n \"join\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n },\n \"owner\": {\n \"location\": \"Norfolk, United Kingdom\",\n \"display_name\": \"Sam\",\n \"id\": 48\n },\n \"body\": \"
Unfortunately you're pretty much limited to FTP...\",\n \"creation_date\": \"2009-05-04T13:45:37.030\"\n}\n\nPUT parent_example/_doc/3?routing=1&refresh\n{\n \"join\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n },\n \"owner\": {\n \"location\": \"Norfolk, United Kingdom\",\n \"display_name\": \"Troll\",\n \"id\": 49\n },\n \"body\": \"
Use Linux...\",\n \"creation_date\": \"2009-05-05T13:45:37.030\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/parent_example/_doc/2",
- "query": {
- "routing": "1"
- },
- "body": {
- "join": {
- "name": "answer",
- "parent": "1"
- },
- "owner": {
- "location": "Norfolk, United Kingdom",
- "display_name": "Sam",
- "id": 48
- },
- "body": "Unfortunately you're pretty much limited to FTP...",
- "creation_date": "2009-05-04T13:45:37.030"
- },
- "params": {
- "index": "parent_example",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/parent_example/_doc/3",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "join": {
- "name": "answer",
- "parent": "1"
- },
- "owner": {
- "location": "Norfolk, United Kingdom",
- "display_name": "Troll",
- "id": 49
- },
- "body": "Use Linux...",
- "creation_date": "2009-05-05T13:45:37.030"
- },
- "params": {
- "index": "parent_example",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 92
- },
- "digest": "686bc640b877de845c46bef372a9866c",
- "lang": "console",
- "found": [],
- "source": "POST parent_example/_search?size=0\n{\n \"aggs\": {\n \"top-names\": {\n \"terms\": {\n \"field\": \"owner.display_name.keyword\",\n \"size\": 10\n },\n \"aggs\": {\n \"to-questions\": {\n \"parent\": {\n \"type\" : \"answer\" <1>\n },\n \"aggs\": {\n \"top-tags\": {\n \"terms\": {\n \"field\": \"tags.keyword\",\n \"size\": 10\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/parent_example/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "top-names": {
- "terms": {
- "field": "owner.display_name.keyword",
- "size": 10
- },
- "aggs": {
- "to-questions": {
- "parent": {
- "type": "answer"
- },
- "aggs": {
- "top-tags": {
- "terms": {
- "field": "tags.keyword",
- "size": 10
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "parent_example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 129
- },
- "digest": "cc544f17f55e9cce00a7b680e3129e6b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 9,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": []\n },\n \"aggregations\": {\n \"top-names\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"Sam\",\n \"doc_count\": 1, <1>\n \"to-questions\": {\n \"doc_count\": 1, <2>\n \"top-tags\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"file-transfer\",\n \"doc_count\": 1\n },\n {\n \"key\": \"windows-server-2003\",\n \"doc_count\": 1\n },\n {\n \"key\": \"windows-server-2008\",\n \"doc_count\": 1\n }\n ]\n }\n }\n },\n {\n \"key\": \"Troll\",\n \"doc_count\": 1,\n \"to-questions\": {\n \"doc_count\": 1,\n \"top-tags\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"file-transfer\",\n \"doc_count\": 1\n },\n {\n \"key\": \"windows-server-2003\",\n \"doc_count\": 1\n },\n {\n \"key\": \"windows-server-2008\",\n \"doc_count\": 1\n }\n ]\n }\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 10
- },
- "digest": "e84a496049274a0fed24e319da7a864c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"ranges\" : [\n { \"to\" : 100.0 },\n { \"from\" : 100.0, \"to\" : 200.0 },\n { \"from\" : 200.0 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 200
- },
- {
- "from": 200
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 33
- },
- "digest": "0170a04f76751c506abe44b491039445",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"price_ranges\" : {\n \"buckets\": [\n {\n \"key\": \"*-100.0\",\n \"to\": 100.0,\n \"doc_count\": 2\n },\n {\n \"key\": \"100.0-200.0\",\n \"from\": 100.0,\n \"to\": 200.0,\n \"doc_count\": 2\n },\n {\n \"key\": \"200.0-*\",\n \"from\": 200.0,\n \"doc_count\": 3\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 67
- },
- "digest": "d637c754aec195a1df39cafca49cbe7e",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"keyed\" : true,\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 200 },\n { \"from\" : 200 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "keyed": true,
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 200
- },
- {
- "from": 200
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 91
- },
- "digest": "7c2e63b7e2abf60a0c56c14ed429b76b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"price_ranges\" : {\n \"buckets\": {\n \"*-100.0\": {\n \"to\": 100.0,\n \"doc_count\": 2\n },\n \"100.0-200.0\": {\n \"from\": 100.0,\n \"to\": 200.0,\n \"doc_count\": 2\n },\n \"200.0-*\": {\n \"from\": 200.0,\n \"doc_count\": 3\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 120
- },
- "digest": "4d147b4a4dabef9b0a8a13cbe8174e09",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"keyed\" : true,\n \"ranges\" : [\n { \"key\" : \"cheap\", \"to\" : 100 },\n { \"key\" : \"average\", \"from\" : 100, \"to\" : 200 },\n { \"key\" : \"expensive\", \"from\" : 200 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "keyed": true,
- "ranges": [
- {
- "key": "cheap",
- "to": 100
- },
- {
- "key": "average",
- "from": 100,
- "to": 200
- },
- {
- "key": "expensive",
- "from": 200
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 144
- },
- "digest": "6ee98bc1060e69be5e539af493e197b1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"price_ranges\" : {\n \"buckets\": {\n \"cheap\": {\n \"to\": 100.0,\n \"doc_count\": 2\n },\n \"average\": {\n \"from\": 100.0,\n \"to\": 200.0,\n \"doc_count\": 2\n },\n \"expensive\": {\n \"from\": 200.0,\n \"doc_count\": 3\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 178
- },
- "digest": "bdf31f63d0941a4183ceae1cc2342c39",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['price'].value\"\n },\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 200 },\n { \"from\" : 200 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "script": {
- "lang": "painless",
- "source": "doc['price'].value"
- },
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 200
- },
- {
- "from": 200
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 202
- },
- "digest": "4c9c453c92431a05b413bfc0163104b4",
- "lang": "console",
- "found": [],
- "source": "POST /_scripts/convert_currency\n{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc[params.field].value * params.conversion_rate\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/convert_currency",
- "query": null,
- "body": {
- "script": {
- "lang": "painless",
- "source": "doc[params.field].value * params.conversion_rate"
- }
- },
- "params": {
- "id": "convert_currency"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 216
- },
- "digest": "7a6d758654eecbc3a1a76744b4de0a23",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"script\" : {\n \"id\": \"convert_currency\", <1>\n \"params\": { <2>\n \"field\": \"price\",\n \"conversion_rate\": 0.835526591\n }\n },\n \"ranges\" : [\n { \"from\" : 0, \"to\" : 100 },\n { \"from\" : 100 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "script": {
- "id": "convert_currency",
- "params": {
- "field": "price",
- "conversion_rate": 0.835526591
- }
- },
- "ranges": [
- {
- "from": 0,
- "to": 100
- },
- {
- "from": 100
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 275
- },
- "digest": "022956b81fa70e72b56c66be16d0e982",
- "lang": "console",
- "found": [],
- "source": "GET /sales/_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"script\" : {\n \"source\": \"_value * params.conversion_rate\",\n \"params\" : {\n \"conversion_rate\" : 0.8\n }\n },\n \"ranges\" : [\n { \"to\" : 35 },\n { \"from\" : 35, \"to\" : 70 },\n { \"from\" : 70 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "script": {
- "source": "_value * params.conversion_rate",
- "params": {
- "conversion_rate": 0.8
- }
- },
- "ranges": [
- {
- "to": 35
- },
- {
- "from": 35,
- "to": 70
- },
- {
- "from": 70
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 305
- },
- "digest": "3b52f4f7ea4abfa6db6bf54199b15f53",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 200 },\n { \"from\" : 200 }\n ]\n },\n \"aggs\" : {\n \"price_stats\" : {\n \"stats\" : { \"field\" : \"price\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 200
- },
- {
- "from": 200
- }
- ]
- },
- "aggs": {
- "price_stats": {
- "stats": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 333
- },
- "digest": "a1638e5183344dadbe748f97763d360a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"price_ranges\": {\n \"buckets\": [\n {\n \"key\": \"*-100.0\",\n \"to\": 100.0,\n \"doc_count\": 2,\n \"price_stats\": {\n \"count\": 2,\n \"min\": 10.0,\n \"max\": 50.0,\n \"avg\": 30.0,\n \"sum\": 60.0\n }\n },\n {\n \"key\": \"100.0-200.0\",\n \"from\": 100.0,\n \"to\": 200.0,\n \"doc_count\": 2,\n \"price_stats\": {\n \"count\": 2,\n \"min\": 150.0,\n \"max\": 175.0,\n \"avg\": 162.5,\n \"sum\": 325.0\n }\n },\n {\n \"key\": \"200.0-*\",\n \"from\": 200.0,\n \"doc_count\": 3,\n \"price_stats\": {\n \"count\": 3,\n \"min\": 200.0,\n \"max\": 200.0,\n \"avg\": 200.0,\n \"sum\": 600.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 386
- },
- "digest": "4547c455375eeda5ad9f74b40d4fa61b",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 200 },\n { \"from\" : 200 }\n ]\n },\n \"aggs\" : {\n \"price_stats\" : {\n \"stats\" : {} <1>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 200
- },
- {
- "from": 200
- }
- ]
- },
- "aggs": {
- "price_stats": {
- "stats": {}
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 89
- },
- "digest": "91bbb85bc6add315fc9a044d8bcfec8a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 106
- },
- "digest": "26b9f1e42d3224132ae7ee3e92e1218d",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"genres\" : {\n \"buckets\" : [\n {\n \"key\" : \"swing\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 127
- },
- "digest": "0fa84243cd275a885298602aa8b4415f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\",\n \"max_doc_count\": 2\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre",
- "max_doc_count": 2
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 145
- },
- "digest": "cd1105f195e06a0dcf6b984e5b5cb7ef",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"genres\" : {\n \"buckets\" : [\n {\n \"key\" : \"swing\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"jazz\",\n \"doc_count\" : 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 277
- },
- "digest": "b7207f557d5481db52d5df1aa0dae982",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\",\n \"include\" : \"swi*\",\n \"exclude\" : \"electro*\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre",
- "include": "swi*",
- "exclude": "electro*"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 305
- },
- "digest": "dea7ef16acd6d148a20876630a010522",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\",\n \"include\" : [\"swing\", \"rock\"],\n \"exclude\" : [\"jazz\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre",
- "include": [
- "swing",
- "rock"
- ],
- "exclude": [
- "jazz"
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 328
- },
- "digest": "2eea6157a9fbc54a8987e5c1a4f14bbe",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\",\n \"missing\": \"N/A\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre",
- "missing": "N/A"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/reverse-nested-aggregation.asciidoc",
- "line": 19
- },
- "digest": "817891bd13da04e5981a797247601145",
- "lang": "console",
- "found": [],
- "source": "PUT /issues\n{\n \"mappings\": {\n \"properties\" : {\n \"tags\" : { \"type\" : \"keyword\" },\n \"comments\" : { <1>\n \"type\" : \"nested\",\n \"properties\" : {\n \"username\" : { \"type\" : \"keyword\" },\n \"comment\" : { \"type\" : \"text\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/issues",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "tags": {
- "type": "keyword"
- },
- "comments": {
- "type": "nested",
- "properties": {
- "username": {
- "type": "keyword"
- },
- "comment": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "issues"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/reverse-nested-aggregation.asciidoc",
- "line": 54
- },
- "digest": "aee26dd62fbb6d614a0798f3344c0598",
- "lang": "console",
- "found": [],
- "source": "GET /issues/_search\n{\n \"query\": {\n \"match_all\": {}\n },\n \"aggs\": {\n \"comments\": {\n \"nested\": {\n \"path\": \"comments\"\n },\n \"aggs\": {\n \"top_usernames\": {\n \"terms\": {\n \"field\": \"comments.username\"\n },\n \"aggs\": {\n \"comment_to_issue\": {\n \"reverse_nested\": {}, <1>\n \"aggs\": {\n \"top_tags_per_comment\": {\n \"terms\": {\n \"field\": \"tags\"\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/issues/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "aggs": {
- "comments": {
- "nested": {
- "path": "comments"
- },
- "aggs": {
- "top_usernames": {
- "terms": {
- "field": "comments.username"
- },
- "aggs": {
- "comment_to_issue": {
- "reverse_nested": {},
- "aggs": {
- "top_tags_per_comment": {
- "terms": {
- "field": "tags"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "issues"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/reverse-nested-aggregation.asciidoc",
- "line": 102
- },
- "digest": "0a6d93e9cde7a4b1968057176a824c33",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"aggregations\": {\n \"comments\": {\n \"doc_count\": 1,\n \"top_usernames\": {\n \"doc_count_error_upper_bound\" : 0,\n \"sum_other_doc_count\" : 0,\n \"buckets\": [\n {\n \"key\": \"username_1\",\n \"doc_count\": 1,\n \"comment_to_issue\": {\n \"doc_count\": 1,\n \"top_tags_per_comment\": {\n \"doc_count_error_upper_bound\" : 0,\n \"sum_other_doc_count\" : 0,\n \"buckets\": [\n {\n \"key\": \"tag_1\",\n \"doc_count\": 1\n }\n ...\n ]\n }\n }\n }\n ...\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/sampler-aggregation.asciidoc",
- "line": 19
- },
- "digest": "28035a0e2a874f1b6739badf82a0ecc6",
- "lang": "console",
- "found": [],
- "source": "POST /stackoverflow/_search?size=0\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"tags:kibana OR tags:javascript\"\n }\n },\n \"aggs\": {\n \"sample\": {\n \"sampler\": {\n \"shard_size\": 200\n },\n \"aggs\": {\n \"keywords\": {\n \"significant_terms\": {\n \"field\": \"tags\",\n \"exclude\": [\"kibana\", \"javascript\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/stackoverflow/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "tags:kibana OR tags:javascript"
- }
- },
- "aggs": {
- "sample": {
- "sampler": {
- "shard_size": 200
- },
- "aggs": {
- "keywords": {
- "significant_terms": {
- "field": "tags",
- "exclude": [
- "kibana",
- "javascript"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "stackoverflow"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/sampler-aggregation.asciidoc",
- "line": 49
- },
- "digest": "5e98c5f7432fff06316e0401f9333b5a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"sample\": {\n \"doc_count\": 200,<1>\n \"keywords\": {\n \"doc_count\": 200,\n \"bg_count\": 650,\n \"buckets\": [\n {\n \"key\": \"elasticsearch\",\n \"doc_count\": 150,\n \"score\": 1.078125,\n \"bg_count\": 200\n },\n {\n \"key\": \"logstash\",\n \"doc_count\": 50,\n \"score\": 0.5625,\n \"bg_count\": 50\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/sampler-aggregation.asciidoc",
- "line": 88
- },
- "digest": "279f7af39b62c7d278f9f10b1f107dc0",
- "lang": "console",
- "found": [],
- "source": "POST /stackoverflow/_search?size=0\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"tags:kibana OR tags:javascript\"\n }\n },\n \"aggs\": {\n \"low_quality_keywords\": {\n \"significant_terms\": {\n \"field\": \"tags\",\n \"size\": 3,\n \"exclude\":[\"kibana\", \"javascript\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/stackoverflow/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "tags:kibana OR tags:javascript"
- }
- },
- "aggs": {
- "low_quality_keywords": {
- "significant_terms": {
- "field": "tags",
- "size": 3,
- "exclude": [
- "kibana",
- "javascript"
- ]
- }
- }
- }
- },
- "params": {
- "index": "stackoverflow"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/sampler-aggregation.asciidoc",
- "line": 112
- },
- "digest": "56a1852f2115cf1d0127aca4505f316f",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"low_quality_keywords\": {\n \"doc_count\": 600,\n \"bg_count\": 650,\n \"buckets\": [\n {\n \"key\": \"angular\",\n \"doc_count\": 200,\n \"score\": 0.02777,\n \"bg_count\": 200\n },\n {\n \"key\": \"jquery\",\n \"doc_count\": 200,\n \"score\": 0.02777,\n \"bg_count\": 200\n },\n {\n \"key\": \"logstash\",\n \"doc_count\": 50,\n \"score\": 0.0069,\n \"bg_count\": 50\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 67
- },
- "digest": "290b845e59368e8aa8d1a56d7379afd0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"terms\" : {\"force\" : [ \"British Transport Police\" ]}\n },\n \"aggregations\" : {\n \"significant_crime_types\" : {\n \"significant_terms\" : { \"field\" : \"crime_type\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "force": [
- "British Transport Police"
- ]
- }
- },
- "aggregations": {
- "significant_crime_types": {
- "significant_terms": {
- "field": "crime_type"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 85
- },
- "digest": "f6bdfca1c491ca5933b00981738cf54f",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"significant_crime_types\" : {\n \"doc_count\": 47347,\n \"bg_count\": 5064554,\n \"buckets\" : [\n {\n \"key\": \"Bicycle theft\",\n \"doc_count\": 3640,\n \"score\": 0.371235374214817,\n \"bg_count\": 66799\n }\n ...\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 127
- },
- "digest": "b2af9784f8530a363ac6e9f95b39677d",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggregations\": {\n \"forces\": {\n \"terms\": {\"field\": \"force\"},\n \"aggregations\": {\n \"significant_crime_types\": {\n \"significant_terms\": {\"field\": \"crime_type\"}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggregations": {
- "forces": {
- "terms": {
- "field": "force"
- },
- "aggregations": {
- "significant_crime_types": {
- "significant_terms": {
- "field": "crime_type"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 147
- },
- "digest": "e084e62bff969d42d542681f4b2dc5ee",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"forces\": {\n \"doc_count_error_upper_bound\": 1375,\n \"sum_other_doc_count\": 7879845,\n \"buckets\": [\n {\n \"key\": \"Metropolitan Police Service\",\n \"doc_count\": 894038,\n \"significant_crime_types\": {\n \"doc_count\": 894038,\n \"bg_count\": 5064554,\n \"buckets\": [\n {\n \"key\": \"Robbery\",\n \"doc_count\": 27617,\n \"score\": 0.0599,\n \"bg_count\": 53182\n }\n ...\n ]\n }\n },\n {\n \"key\": \"British Transport Police\",\n \"doc_count\": 47347,\n \"significant_crime_types\": {\n \"doc_count\": 47347,\n \"bg_count\": 5064554,\n \"buckets\": [\n {\n \"key\": \"Bicycle theft\",\n \"doc_count\": 3640,\n \"score\": 0.371,\n \"bg_count\": 66799\n }\n ...\n ]\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 204
- },
- "digest": "0868d8ac2fb5351e633184f897ee6866",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\": {\n \"hotspots\": {\n \"geohash_grid\": {\n \"field\": \"location\",\n \"precision\": 5\n },\n \"aggs\": {\n \"significant_crime_types\": {\n \"significant_terms\": {\"field\": \"crime_type\"}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "hotspots": {
- "geohash_grid": {
- "field": "location",
- "precision": 5
- },
- "aggs": {
- "significant_crime_types": {
- "significant_terms": {
- "field": "crime_type"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 464
- },
- "digest": "09d4a753140ee5a9ab9f4fc09047b588",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"significant_terms\" : {\n \"field\" : \"tag\",\n \"min_doc_count\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "significant_terms": {
- "field": "tag",
- "min_doc_count": 10
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 507
- },
- "digest": "3fdaac87eb741a79f747633b5065323a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\" : {\n \"city\" : \"madrid\"\n }\n },\n \"aggs\" : {\n \"tags\" : {\n \"significant_terms\" : {\n \"field\" : \"tag\",\n \"background_filter\": {\n \t\"term\" : { \"text\" : \"spain\"}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "city": "madrid"
- }
- },
- "aggs": {
- "tags": {
- "significant_terms": {
- "field": "tag",
- "background_filter": {
- "term": {
- "text": "spain"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 565
- },
- "digest": "11a21cd0b9d31da7eda77c9384a29208",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"significant_terms\" : {\n \"field\" : \"tags\",\n \"execution_hint\": \"map\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "significant_terms": {
- "field": "tags",
- "execution_hint": "map"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 36
- },
- "digest": "68f0c7c77b65bfdded348bbd397831b7",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\" : {\n \"match\" : {\"content\" : \"Bird flu\"}\n },\n \"aggregations\" : {\n \"my_sample\" : {\n \"sampler\" : {\n \"shard_size\" : 100\n },\n \"aggregations\": {\n \"keywords\" : {\n \"significant_text\" : { \"field\" : \"content\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "content": "Bird flu"
- }
- },
- "aggregations": {
- "my_sample": {
- "sampler": {
- "shard_size": 100
- },
- "aggregations": {
- "keywords": {
- "significant_text": {
- "field": "content"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 62
- },
- "digest": "adabe4ea803f7bed66405f1783047825",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 9,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\" : {\n \"my_sample\": {\n \"doc_count\": 100,\n \"keywords\" : {\n \"doc_count\": 100,\n \"buckets\" : [\n {\n \"key\": \"h5n1\",\n \"doc_count\": 4,\n \"score\": 4.71235374214817,\n \"bg_count\": 5\n }\n ...\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 150
- },
- "digest": "d44ecc69090c0b2bc08a6cbc2e3467c5",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\": {\n \"simple_query_string\": {\n \"query\": \"+elasticsearch +pozmantier\"\n }\n },\n \"_source\": [\n \"title\",\n \"source\"\n ],\n \"highlight\": {\n \"fields\": {\n \"content\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "+elasticsearch +pozmantier"
- }
- },
- "_source": [
- "title",
- "source"
- ],
- "highlight": {
- "fields": {
- "content": {}
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 218
- },
- "digest": "805f5550b90e75aa5cc82b90d8c6c242",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\": {\n \"match\": {\n \"content\": \"elasticsearch\"\n }\n },\n \"aggs\": {\n \"sample\": {\n \"sampler\": {\n \"shard_size\": 100\n },\n \"aggs\": {\n \"keywords\": {\n \"significant_text\": {\n \"field\": \"content\",\n \"filter_duplicate_text\": true\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "content": "elasticsearch"
- }
- },
- "aggs": {
- "sample": {
- "sampler": {
- "shard_size": 100
- },
- "aggs": {
- "keywords": {
- "significant_text": {
- "field": "content",
- "filter_duplicate_text": true
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 420
- },
- "digest": "5f4cab20671ebac9233812f9e35d9c8b",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\" : {\n \"match\" : {\n \"content\" : \"madrid\"\n }\n },\n \"aggs\" : {\n \"tags\" : {\n \"significant_text\" : {\n \"field\" : \"content\",\n \"background_filter\": {\n \"term\" : { \"content\" : \"spain\"}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "content": "madrid"
- }
- },
- "aggs": {
- "tags": {
- "significant_text": {
- "field": "content",
- "background_filter": {
- "term": {
- "content": "spain"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 458
- },
- "digest": "b3e6d6f7f6d65d1efb60ca7503a20b16",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\" : {\n \"match\" : {\n \"custom_all\" : \"elasticsearch\"\n }\n },\n \"aggs\" : {\n \"tags\" : {\n \"significant_text\" : {\n \"field\" : \"custom_all\",\n \"source_fields\": [\"content\" , \"title\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "custom_all": "elasticsearch"
- }
- },
- "aggs": {
- "tags": {
- "significant_text": {
- "field": "custom_all",
- "source_fields": [
- "content",
- "title"
- ]
- }
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 57
- },
- "digest": "9a8995fd31351045d99c78e40444c8ea",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : { \"field\" : \"genre\" } <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 75
- },
- "digest": "4fb044223736e8694e364d3ccf4ffdc7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"genres\" : {\n \"doc_count_error_upper_bound\": 0, <1>\n \"sum_other_doc_count\": 0, <2>\n \"buckets\" : [ <3>\n {\n \"key\" : \"electronic\",\n \"doc_count\" : 6\n },\n {\n \"key\" : \"rock\",\n \"doc_count\" : 3\n },\n {\n \"key\" : \"jazz\",\n \"doc_count\" : 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 135
- },
- "digest": "d50a3835bf5795ac73e58906a3413544",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"products\" : {\n \"terms\" : {\n \"field\" : \"product\",\n \"size\" : 5\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "products": {
- "terms": {
- "field": "product",
- "size": 5
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 234
- },
- "digest": "1a4020b84329edbc97af2f1a922ce82c",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"products\" : {\n \"doc_count_error_upper_bound\" : 46,\n \"sum_other_doc_count\" : 79,\n \"buckets\" : [\n {\n \"key\" : \"Product A\",\n \"doc_count\" : 100\n },\n {\n \"key\" : \"Product Z\",\n \"doc_count\" : 52\n }\n ...\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 264
- },
- "digest": "35e8da9410b8432cf4095f2541ad7b1d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"products\" : {\n \"terms\" : {\n \"field\" : \"product\",\n \"size\" : 5,\n \"show_term_doc_count_error\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "products": {
- "terms": {
- "field": "product",
- "size": 5,
- "show_term_doc_count_error": true
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 290
- },
- "digest": "e19bb86b7736ca78acd08e14451c4449",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"products\" : {\n \"doc_count_error_upper_bound\" : 46,\n \"sum_other_doc_count\" : 79,\n \"buckets\" : [\n {\n \"key\" : \"Product A\",\n \"doc_count\" : 100,\n \"doc_count_error_upper_bound\" : 0\n },\n {\n \"key\" : \"Product Z\",\n \"doc_count\" : 52,\n \"doc_count_error_upper_bound\" : 2\n }\n ...\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 341
- },
- "digest": "6a4679531e64c492fce16dc12de6dcb0",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"order\" : { \"_count\" : \"asc\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "order": {
- "_count": "asc"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 358
- },
- "digest": "93f1bdd72e79827dcf9a34efa02fd977",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"order\" : { \"_key\" : \"asc\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "order": {
- "_key": "asc"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 377
- },
- "digest": "71b5b2ba9557d0f296ff2de91727d2f6",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"order\" : { \"max_play_count\" : \"desc\" }\n },\n \"aggs\" : {\n \"max_play_count\" : { \"max\" : { \"field\" : \"play_count\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "order": {
- "max_play_count": "desc"
- }
- },
- "aggs": {
- "max_play_count": {
- "max": {
- "field": "play_count"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 397
- },
- "digest": "34efeade38445b2834749ced59782e25",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"order\" : { \"playback_stats.max\" : \"desc\" }\n },\n \"aggs\" : {\n \"playback_stats\" : { \"stats\" : { \"field\" : \"play_count\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "order": {
- "playback_stats.max": "desc"
- }
- },
- "aggs": {
- "playback_stats": {
- "stats": {
- "field": "play_count"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 443
- },
- "digest": "dc15e2373e5ecbe09b4ea0858eb63d47",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"countries\" : {\n \"terms\" : {\n \"field\" : \"artist.country\",\n \"order\" : { \"rock>playback_stats.avg\" : \"desc\" }\n },\n \"aggs\" : {\n \"rock\" : {\n \"filter\" : { \"term\" : { \"genre\" : \"rock\" }},\n \"aggs\" : {\n \"playback_stats\" : { \"stats\" : { \"field\" : \"play_count\" }}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "countries": {
- "terms": {
- "field": "artist.country",
- "order": {
- "rock>playback_stats.avg": "desc"
- }
- },
- "aggs": {
- "rock": {
- "filter": {
- "term": {
- "genre": "rock"
- }
- },
- "aggs": {
- "playback_stats": {
- "stats": {
- "field": "play_count"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 470
- },
- "digest": "028f6d6ac2594e20b78b8a8f8cbad49d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"countries\" : {\n \"terms\" : {\n \"field\" : \"artist.country\",\n \"order\" : [ { \"rock>playback_stats.avg\" : \"desc\" }, { \"_count\" : \"desc\" } ]\n },\n \"aggs\" : {\n \"rock\" : {\n \"filter\" : { \"term\" : { \"genre\" : \"rock\" }},\n \"aggs\" : {\n \"playback_stats\" : { \"stats\" : { \"field\" : \"play_count\" }}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "countries": {
- "terms": {
- "field": "artist.country",
- "order": [
- {
- "rock>playback_stats.avg": "desc"
- },
- {
- "_count": "desc"
- }
- ]
- },
- "aggs": {
- "rock": {
- "filter": {
- "term": {
- "genre": "rock"
- }
- },
- "aggs": {
- "playback_stats": {
- "stats": {
- "field": "play_count"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 503
- },
- "digest": "527324766814561b75aaee853ede49a7",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"terms\" : {\n \"field\" : \"tags\",\n \"min_doc_count\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "terms": {
- "field": "tags",
- "min_doc_count": 10
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 544
- },
- "digest": "033778305d52746f5ce0a2a922c8e521",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"script\" : {\n \"source\": \"doc['genre'].value\",\n \"lang\": \"painless\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "script": {
- "source": "doc['genre'].value",
- "lang": "painless"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 578
- },
- "digest": "4646764bf09911fee7d58630c72d3137",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"genre\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "genre"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 600
- },
- "digest": "a49169b4622918992411fab4ec48191b",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"script\" : {\n \"source\" : \"'Genre: ' +_value\",\n \"lang\" : \"painless\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "script": {
- "source": "'Genre: ' +_value",
- "lang": "painless"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 626
- },
- "digest": "0afaf1cad692e6201aa574c8feb6e622",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"terms\" : {\n \"field\" : \"tags\",\n \"include\" : \".*sport.*\",\n \"exclude\" : \"water_.*\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "terms": {
- "field": "tags",
- "include": ".*sport.*",
- "exclude": "water_.*"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 654
- },
- "digest": "98b121bf47cebd85671a2cb519688d28",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"JapaneseCars\" : {\n \"terms\" : {\n \"field\" : \"make\",\n \"include\" : [\"mazda\", \"honda\"]\n }\n },\n \"ActiveCarManufacturers\" : {\n \"terms\" : {\n \"field\" : \"make\",\n \"exclude\" : [\"rover\", \"jensen\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "JapaneseCars": {
- "terms": {
- "field": "make",
- "include": [
- "mazda",
- "honda"
- ]
- }
- },
- "ActiveCarManufacturers": {
- "terms": {
- "field": "make",
- "exclude": [
- "rover",
- "jensen"
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 683
- },
- "digest": "5d9d7b84e2fec7ecd832145cbb951cf1",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"expired_sessions\": {\n \"terms\": {\n \"field\": \"account_id\",\n \"include\": {\n \"partition\": 0,\n \"num_partitions\": 20\n },\n \"size\": 10000,\n \"order\": {\n \"last_access\": \"asc\"\n }\n },\n \"aggs\": {\n \"last_access\": {\n \"max\": {\n \"field\": \"access_date\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "expired_sessions": {
- "terms": {
- "field": "account_id",
- "include": {
- "partition": 0,
- "num_partitions": 20
- },
- "size": 10000,
- "order": {
- "last_access": "asc"
- }
- },
- "aggs": {
- "last_access": {
- "max": {
- "field": "access_date"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 775
- },
- "digest": "7f28f8ae8fcdbd807dadde0b5b007a6d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"actors\" : {\n \"terms\" : {\n \"field\" : \"actors\",\n \"size\" : 10\n },\n \"aggs\" : {\n \"costars\" : {\n \"terms\" : {\n \"field\" : \"actors\",\n \"size\" : 5\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "actors": {
- "terms": {
- "field": "actors",
- "size": 10
- },
- "aggs": {
- "costars": {
- "terms": {
- "field": "actors",
- "size": 5
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 806
- },
- "digest": "cd5bc5bf7cd58d7b1492c9c298b345f6",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"actors\" : {\n \"terms\" : {\n \"field\" : \"actors\",\n \"size\" : 10,\n \"collect_mode\" : \"breadth_first\" <1>\n },\n \"aggs\" : {\n \"costars\" : {\n \"terms\" : {\n \"field\" : \"actors\",\n \"size\" : 5\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "actors": {
- "terms": {
- "field": "actors",
- "size": 10,
- "collect_mode": "breadth_first"
- },
- "aggs": {
- "costars": {
- "terms": {
- "field": "actors",
- "size": 5
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 857
- },
- "digest": "774d715155cd13713e6e327adf6ce328",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"terms\" : {\n \"field\" : \"tags\",\n \"execution_hint\": \"map\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "terms": {
- "field": "tags",
- "execution_hint": "map"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 882
- },
- "digest": "f085fb032dae56a3b104ab874eaea2ad",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"terms\" : {\n \"field\" : \"tags\",\n \"missing\": \"N/A\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "terms": {
- "field": "tags",
- "missing": "N/A"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 12
- },
- "digest": "dbcd8892dd01c43d5a60c94173574faf",
- "lang": "console",
- "found": [],
- "source": "PUT range_index\n{\n \"settings\": {\n \"number_of_shards\": 2\n },\n \"mappings\": {\n \"properties\": {\n \"expected_attendees\": {\n \"type\": \"integer_range\"\n },\n \"time_frame\": {\n \"type\": \"date_range\",\n \"format\": \"yyyy-MM-dd||epoch_millis\"\n }\n }\n }\n}\n\nPUT range_index/_doc/1?refresh\n{\n \"expected_attendees\" : {\n \"gte\" : 10,\n \"lte\" : 20\n },\n \"time_frame\" : {\n \"gte\" : \"2019-10-28\",\n \"lte\" : \"2019-11-04\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/range_index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 2
- },
- "mappings": {
- "properties": {
- "expected_attendees": {
- "type": "integer_range"
- },
- "time_frame": {
- "type": "date_range",
- "format": "yyyy-MM-dd||epoch_millis"
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/range_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "expected_attendees": {
- "gte": 10,
- "lte": 20
- },
- "time_frame": {
- "gte": "2019-10-28",
- "lte": "2019-11-04"
- }
- },
- "params": {
- "index": "range_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 49
- },
- "digest": "cf1872035b9acf6a214310badae345f7",
- "lang": "console",
- "found": [],
- "source": "POST /range_index/_search?size=0\n{\n \"aggs\" : {\n \"range_histo\" : {\n \"histogram\" : {\n \"field\" : \"expected_attendees\",\n \"interval\" : 5\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/range_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range_histo": {
- "histogram": {
- "field": "expected_attendees",
- "interval": 5
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 67
- },
- "digest": "44f937e080bb7db49a571fea57f594cf",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"range_histo\" : {\n \"buckets\" : [\n {\n \"key\" : 10.0,\n \"doc_count\" : 1\n },\n {\n \"key\" : 15.0,\n \"doc_count\" : 1\n },\n {\n \"key\" : 20.0,\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 105
- },
- "digest": "620ffff06483f13e5143dfddaa8b7b30",
- "lang": "console",
- "found": [],
- "source": "POST /range_index/_search?size=0\n{\n \"query\": {\n \"range\": {\n \"time_frame\": {\n \"gte\": \"2019-11-01\",\n \"format\": \"yyyy-MM-dd\"\n }\n }\n },\n \"aggs\" : {\n \"november_data\" : {\n \"date_histogram\" : {\n \"field\" : \"time_frame\",\n \"calendar_interval\" : \"day\",\n \"format\": \"yyyy-MM-dd\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/range_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "range": {
- "time_frame": {
- "gte": "2019-11-01",
- "format": "yyyy-MM-dd"
- }
- }
- },
- "aggs": {
- "november_data": {
- "date_histogram": {
- "field": "time_frame",
- "calendar_interval": "day",
- "format": "yyyy-MM-dd"
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 133
- },
- "digest": "e41428c2d6096287a7e8f356a18488cc",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"november_data\" : {\n \"buckets\" : [\n {\n \"key_as_string\" : \"2019-10-28\",\n \"key\" : 1572220800000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-10-29\",\n \"key\" : 1572307200000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-10-30\",\n \"key\" : 1572393600000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-10-31\",\n \"key\" : 1572480000000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-11-01\",\n \"key\" : 1572566400000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-11-02\",\n \"key\" : 1572652800000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-11-03\",\n \"key\" : 1572739200000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-11-04\",\n \"key\" : 1572825600000,\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 54
- },
- "digest": "ec20b1c236955a545476eeeea747d9de",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"timestamp\",\n \"calendar_interval\":\"day\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"lemmings\" } <1>\n },\n \"the_deriv\":{\n \"derivative\":{ \"buckets_path\": \"the_sum\" } <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "lemmings"
- }
- },
- "the_deriv": {
- "derivative": {
- "buckets_path": "the_sum"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 84
- },
- "digest": "11be7655fdafcf4c1454a0e9ad8ddf63",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"max_monthly_sales\": {\n \"max_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "max_monthly_sales": {
- "max_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 119
- },
- "digest": "88a6b6f721b91f0919127a34ee2fbe0e",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sale_type\": {\n \"terms\": {\n \"field\": \"type\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"hat_vs_bag_ratio\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"hats\": \"sale_type['hat']>sales\", <1>\n \"bags\": \"sale_type['bag']>sales\" <1>\n },\n \"script\": \"params.hats / params.bags\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sale_type": {
- "terms": {
- "field": "type"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "hat_vs_bag_ratio": {
- "bucket_script": {
- "buckets_path": {
- "hats": "sale_type['hat']>sales",
- "bags": "sale_type['bag']>sales"
- },
- "script": "params.hats / params.bags"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 168
- },
- "digest": "f3dd309ab027e86048b476b54f0d4ca1",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"aggs\": {\n \"my_date_histo\": {\n \"date_histogram\": {\n \"field\":\"timestamp\",\n \"calendar_interval\":\"day\"\n },\n \"aggs\": {\n \"the_deriv\": {\n \"derivative\": { \"buckets_path\": \"_count\" } <1>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "the_deriv": {
- "derivative": {
- "buckets_path": "_count"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 194
- },
- "digest": "2afc1231679898bd864d06679d9e951b",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"histo\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"day\"\n },\n \"aggs\": {\n \"categories\": {\n \"terms\": {\n \"field\": \"category\"\n }\n },\n \"min_bucket_selector\": {\n \"bucket_selector\": {\n \"buckets_path\": {\n \"count\": \"categories._bucket_count\" <1>\n },\n \"script\": {\n \"source\": \"params.count != 0\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day"
- },
- "aggs": {
- "categories": {
- "terms": {
- "field": "category"
- }
- },
- "min_bucket_selector": {
- "bucket_selector": {
- "buckets_path": {
- "count": "categories._bucket_count"
- },
- "script": {
- "source": "params.count != 0"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/avg-bucket-aggregation.asciidoc",
- "line": 37
- },
- "digest": "b3e8697874ed65ed6cb62f2568bcc55e",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"sales_per_month\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"avg_monthly_sales\": {\n \"avg_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "avg_monthly_sales": {
- "avg_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/avg-bucket-aggregation.asciidoc",
- "line": 72
- },
- "digest": "8877745bbaa0907a8437b856217264e3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"avg_monthly_sales\": {\n \"value\": 328.33333333333333\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 38
- },
- "digest": "469bc2e7b9e65b3b1e38a547f63bd2f9",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_deriv\": {\n \"derivative\": {\n \"buckets_path\": \"sales\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_deriv": {
- "derivative": {
- "buckets_path": "sales"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 71
- },
- "digest": "4bfd88c9b9dc88bce96bc8a16c198542",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n } <1>\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n },\n \"sales_deriv\": {\n \"value\": -490.0 <2>\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2, <3>\n \"sales\": {\n \"value\": 375.0\n },\n \"sales_deriv\": {\n \"value\": 315.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 131
- },
- "digest": "d683ed8c4a72f82200bbad0c3921e427",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_deriv\": {\n \"derivative\": {\n \"buckets_path\": \"sales\"\n }\n },\n \"sales_2nd_deriv\": {\n \"derivative\": {\n \"buckets_path\": \"sales_deriv\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_deriv": {
- "derivative": {
- "buckets_path": "sales"
- }
- },
- "sales_2nd_deriv": {
- "derivative": {
- "buckets_path": "sales_deriv"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 169
- },
- "digest": "99e2d1cad66f9e34d7069748cc24fbe3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 50,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n } <1>\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n },\n \"sales_deriv\": {\n \"value\": -490.0\n } <1>\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n },\n \"sales_deriv\": {\n \"value\": 315.0\n },\n \"sales_2nd_deriv\": {\n \"value\": 805.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 230
- },
- "digest": "8553b0c396e9de7d841fcc6373e017e2",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_deriv\": {\n \"derivative\": {\n \"buckets_path\": \"sales\",\n \"unit\": \"day\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_deriv": {
- "derivative": {
- "buckets_path": "sales",
- "unit": "day"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 263
- },
- "digest": "929c90aa5f2a6e9102d28a8ec3cfba05",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 50,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n } <1>\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n },\n \"sales_deriv\": {\n \"value\": -490.0, <1>\n \"normalized_value\": -15.806451612903226 <2>\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n },\n \"sales_deriv\": {\n \"value\": 315.0,\n \"normalized_value\": 11.25\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/max-bucket-aggregation.asciidoc",
- "line": 37
- },
- "digest": "ce5d556d90d0fb077ab078e055005f3a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"max_monthly_sales\": {\n \"max_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "max_monthly_sales": {
- "max_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/max-bucket-aggregation.asciidoc",
- "line": 71
- },
- "digest": "e0765c7c1155bc3da07dd84aa7a5033f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"max_monthly_sales\": {\n \"keys\": [\"2015/01/01 00:00:00\"], <1>\n \"value\": 550.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/min-bucket-aggregation.asciidoc",
- "line": 37
- },
- "digest": "e668549ff72fd0b9568667d1a817fc6e",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"min_monthly_sales\": {\n \"min_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "min_monthly_sales": {
- "min_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/min-bucket-aggregation.asciidoc",
- "line": 71
- },
- "digest": "9128fb8c19494741f8eb9906450586e5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"min_monthly_sales\": {\n \"keys\": [\"2015/02/01 00:00:00\"], <1>\n \"value\": 60.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/sum-bucket-aggregation.asciidoc",
- "line": 36
- },
- "digest": "612a9f6a05186fc89ed1a75139d3a8b7",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"sum_monthly_sales\": {\n \"sum_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "sum_monthly_sales": {
- "sum_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/sum-bucket-aggregation.asciidoc",
- "line": 70
- },
- "digest": "7da035d02f2d2267dd7b5de974555459",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"sum_monthly_sales\": {\n \"value\": 985.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/stats-bucket-aggregation.asciidoc",
- "line": 36
- },
- "digest": "8a187c87964774530ef99f8962d83da5",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"stats_monthly_sales\": {\n \"stats_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "stats_monthly_sales": {
- "stats_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/stats-bucket-aggregation.asciidoc",
- "line": 70
- },
- "digest": "8a40309b0e17445519ad62f962926e24",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"stats_monthly_sales\": {\n \"count\": 3,\n \"min\": 60.0,\n \"max\": 550.0,\n \"avg\": 328.3333333333333,\n \"sum\": 985.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/extended-stats-bucket-aggregation.asciidoc",
- "line": 39
- },
- "digest": "b8f960415d10545f583d2eac94e07629",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"stats_monthly_sales\": {\n \"extended_stats_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "stats_monthly_sales": {
- "extended_stats_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/extended-stats-bucket-aggregation.asciidoc",
- "line": 73
- },
- "digest": "bdcab84e776c6a8a0703e917a43bc362",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"stats_monthly_sales\": {\n \"count\": 3,\n \"min\": 60.0,\n \"max\": 550.0,\n \"avg\": 328.3333333333333,\n \"sum\": 985.0,\n \"sum_of_squares\": 446725.0,\n \"variance\": 41105.55555555556,\n \"std_deviation\": 202.74505063146563,\n \"std_deviation_bounds\": {\n \"upper\": 733.8234345962646,\n \"lower\": -77.15676792959795\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/percentiles-bucket-aggregation.asciidoc",
- "line": 38
- },
- "digest": "cff65c0f9fbc53c26c60abe9fb7e4044",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"percentiles_monthly_sales\": {\n \"percentiles_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\", <1>\n \"percents\": [ 25.0, 50.0, 75.0 ] <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "percentiles_monthly_sales": {
- "percentiles_bucket": {
- "buckets_path": "sales_per_month>sales",
- "percents": [
- 25,
- 50,
- 75
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/percentiles-bucket-aggregation.asciidoc",
- "line": 74
- },
- "digest": "8a255d25302b6ec629381efb6dc3de4b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"percentiles_monthly_sales\": {\n \"values\" : {\n \"25.0\": 375.0,\n \"50.0\": 375.0,\n \"75.0\": 550.0\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 42
- },
- "digest": "5903a75a28cec4b60c54662457c6d405",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{ <1>\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" } <2>\n },\n \"the_movfn\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\", <3>\n \"window\": 10,\n \"script\": \"MovingFunctions.unweightedAvg(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movfn": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.unweightedAvg(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 82
- },
- "digest": "195ee5116e8fcff0a70fb82bbcc42b58",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"my_date_histo\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"the_sum\": {\n \"value\": 550.0\n },\n \"the_movfn\": {\n \"value\": null\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"the_sum\": {\n \"value\": 60.0\n },\n \"the_movfn\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"the_sum\": {\n \"value\": 375.0\n },\n \"the_movfn\": {\n \"value\": 305.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 143
- },
- "digest": "93c9711ee6c0554cd775c013c3837f13",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"return values.length > 0 ? values[0] : Double.NaN\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "return values.length > 0 ? values[0] : Double.NaN"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 213
- },
- "digest": "13fd394e3e9a3398cac21ac1064fc154",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_moving_max\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.max(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_moving_max": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.max(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 255
- },
- "digest": "c8bebf3c45fc9e75e161bf4e516a957a",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_moving_min\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.min(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_moving_min": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.min(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 297
- },
- "digest": "d0897840a5702b4ec0616e6c90acfe1e",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_moving_sum\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.sum(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_moving_sum": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.sum(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 341
- },
- "digest": "46c4d95fc06cd0eb0401caa1e0bdc8f0",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_moving_sum\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.stdDev(values, MovingFunctions.unweightedAvg(values))\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_moving_sum": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.stdDev(values, MovingFunctions.unweightedAvg(values))"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 392
- },
- "digest": "beea9d59a7cbe53d5d4c4ec2a49487b2",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.unweightedAvg(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.unweightedAvg(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 437
- },
- "digest": "bbbbe980b6dcd2a77ff16cc8a081e472",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.linearWeightedAvg(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.linearWeightedAvg(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 488
- },
- "digest": "d84ea140bbe8abfb156a72c1c963ea00",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.ewma(values, 0.3)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.ewma(values, 0.3)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 545
- },
- "digest": "76fc9f5a879772ffcc4ec0c99bf74277",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.holt(values, 0.3, 0.1)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.holt(values, 0.3, 0.1)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 610
- },
- "digest": "af25b173c8bcc73a3bfbfddacb218478",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"if (values.length > 5*2) {MovingFunctions.holtWinters(values, 0.3, 0.1, 0.1, 5, false)}\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "if (values.length > 5*2) {MovingFunctions.holtWinters(values, 0.3, 0.1, 0.1, 5, false)}"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-sum-aggregation.asciidoc",
- "line": 35
- },
- "digest": "1ae73d3fcc39bef9ddc654bb82d5d239",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"cumulative_sales\": {\n \"cumulative_sum\": {\n \"buckets_path\": \"sales\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- },
- "cumulative_sales": {
- "cumulative_sum": {
- "buckets_path": "sales"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-sum-aggregation.asciidoc",
- "line": 68
- },
- "digest": "0a9f95fcb384ff3833e3866fd72ed1e4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n },\n \"cumulative_sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n },\n \"cumulative_sales\": {\n \"value\": 610.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n },\n \"cumulative_sales\": {\n \"value\": 985.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc",
- "line": 42
- },
- "digest": "4d8d2c66e4f3ccd760bfe3008c5a4b65",
- "lang": "console",
- "found": [],
- "source": "GET /user_hits/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"users_per_day\" : {\n \"date_histogram\" : {\n \"field\" : \"timestamp\",\n \"calendar_interval\" : \"day\"\n },\n \"aggs\": {\n \"distinct_users\": {\n \"cardinality\": {\n \"field\": \"user_id\"\n }\n },\n \"total_new_users\": {\n \"cumulative_cardinality\": {\n \"buckets_path\": \"distinct_users\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/user_hits/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "users_per_day": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "distinct_users": {
- "cardinality": {
- "field": "user_id"
- }
- },
- "total_new_users": {
- "cumulative_cardinality": {
- "buckets_path": "distinct_users"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "user_hits"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc",
- "line": 75
- },
- "digest": "bedf4afad2a9787d01085d6869c44751",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"users_per_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2019-01-01T00:00:00.000Z\",\n \"key\": 1546300800000,\n \"doc_count\": 2,\n \"distinct_users\": {\n \"value\": 2\n },\n \"total_new_users\": {\n \"value\": 2\n }\n },\n {\n \"key_as_string\": \"2019-01-02T00:00:00.000Z\",\n \"key\": 1546387200000,\n \"doc_count\": 2,\n \"distinct_users\": {\n \"value\": 2\n },\n \"total_new_users\": {\n \"value\": 3\n }\n },\n {\n \"key_as_string\": \"2019-01-03T00:00:00.000Z\",\n \"key\": 1546473600000,\n \"doc_count\": 3,\n \"distinct_users\": {\n \"value\": 3\n },\n \"total_new_users\": {\n \"value\": 4\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc",
- "line": 141
- },
- "digest": "dd5d84526ecb6a33e96ff2c047b8066d",
- "lang": "console",
- "found": [],
- "source": "GET /user_hits/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"users_per_day\" : {\n \"date_histogram\" : {\n \"field\" : \"timestamp\",\n \"calendar_interval\" : \"day\"\n },\n \"aggs\": {\n \"distinct_users\": {\n \"cardinality\": {\n \"field\": \"user_id\"\n }\n },\n \"total_new_users\": {\n \"cumulative_cardinality\": {\n \"buckets_path\": \"distinct_users\"\n }\n },\n \"incremental_new_users\": {\n \"derivative\": {\n \"buckets_path\": \"total_new_users\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/user_hits/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "users_per_day": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "distinct_users": {
- "cardinality": {
- "field": "user_id"
- }
- },
- "total_new_users": {
- "cumulative_cardinality": {
- "buckets_path": "distinct_users"
- }
- },
- "incremental_new_users": {
- "derivative": {
- "buckets_path": "total_new_users"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "user_hits"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc",
- "line": 178
- },
- "digest": "de7cfdf9934fbb000486b00a8d40fa63",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"users_per_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2019-01-01T00:00:00.000Z\",\n \"key\": 1546300800000,\n \"doc_count\": 2,\n \"distinct_users\": {\n \"value\": 2\n },\n \"total_new_users\": {\n \"value\": 2\n }\n },\n {\n \"key_as_string\": \"2019-01-02T00:00:00.000Z\",\n \"key\": 1546387200000,\n \"doc_count\": 2,\n \"distinct_users\": {\n \"value\": 2\n },\n \"total_new_users\": {\n \"value\": 3\n },\n \"incremental_new_users\": {\n \"value\": 1.0\n }\n },\n {\n \"key_as_string\": \"2019-01-03T00:00:00.000Z\",\n \"key\": 1546473600000,\n \"doc_count\": 3,\n \"distinct_users\": {\n \"value\": 3\n },\n \"total_new_users\": {\n \"value\": 4\n },\n \"incremental_new_users\": {\n \"value\": 1.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-script-aggregation.asciidoc",
- "line": 45
- },
- "digest": "c2d90e1c88ff5b1857ed4a5b169c9689",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"total_sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"t-shirts\": {\n \"filter\": {\n \"term\": {\n \"type\": \"t-shirt\"\n }\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"t-shirt-percentage\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"tShirtSales\": \"t-shirts>sales\",\n \"totalSales\": \"total_sales\"\n },\n \"script\": \"params.tShirtSales / params.totalSales * 100\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "total_sales": {
- "sum": {
- "field": "price"
- }
- },
- "t-shirts": {
- "filter": {
- "term": {
- "type": "t-shirt"
- }
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "t-shirt-percentage": {
- "bucket_script": {
- "buckets_path": {
- "tShirtSales": "t-shirts>sales",
- "totalSales": "total_sales"
- },
- "script": "params.tShirtSales / params.totalSales * 100"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-script-aggregation.asciidoc",
- "line": 94
- },
- "digest": "327c42605491ee053c73152d9de513f9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"total_sales\": {\n \"value\": 550.0\n },\n \"t-shirts\": {\n \"doc_count\": 1,\n \"sales\": {\n \"value\": 200.0\n }\n },\n \"t-shirt-percentage\": {\n \"value\": 36.36363636363637\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 60.0\n },\n \"t-shirts\": {\n \"doc_count\": 1,\n \"sales\": {\n \"value\": 10.0\n }\n },\n \"t-shirt-percentage\": {\n \"value\": 16.666666666666664\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 375.0\n },\n \"t-shirts\": {\n \"doc_count\": 1,\n \"sales\": {\n \"value\": 175.0\n }\n },\n \"t-shirt-percentage\": {\n \"value\": 46.666666666666664\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-selector-aggregation.asciidoc",
- "line": 48
- },
- "digest": "7851d52ed462f0a1bdfd4f676e4a4363",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"total_sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_bucket_filter\": {\n \"bucket_selector\": {\n \"buckets_path\": {\n \"totalSales\": \"total_sales\"\n },\n \"script\": \"params.totalSales > 200\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "total_sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_bucket_filter": {
- "bucket_selector": {
- "buckets_path": {
- "totalSales": "total_sales"
- },
- "script": "params.totalSales > 200"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-selector-aggregation.asciidoc",
- "line": 82
- },
- "digest": "3b86c66c8dfd53deb341999ab24f4040",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"total_sales\": {\n \"value\": 550.0\n }\n },<1>\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 375.0\n },\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-sort-aggregation.asciidoc",
- "line": 51
- },
- "digest": "7881659b181997486731d92712fbdca9",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"total_sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_bucket_sort\": {\n \"bucket_sort\": {\n \"sort\": [\n {\"total_sales\": {\"order\": \"desc\"}}<1>\n ],\n \"size\": 3<2>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "total_sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_bucket_sort": {
- "bucket_sort": {
- "sort": [
- {
- "total_sales": {
- "order": "desc"
- }
- }
- ],
- "size": 3
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-sort-aggregation.asciidoc",
- "line": 88
- },
- "digest": "cd97449455a4e17f5356f2c8796e1361",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 82,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"total_sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 375.0\n },\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 60.0\n },\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-sort-aggregation.asciidoc",
- "line": 139
- },
- "digest": "541c4f4fb5959cf88423196e51c7e0ef",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"bucket_truncate\": {\n \"bucket_sort\": {\n \"from\": 1,\n \"size\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "bucket_truncate": {
- "bucket_sort": {
- "from": 1,
- "size": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-sort-aggregation.asciidoc",
- "line": 166
- },
- "digest": "787cc8a92d371323d88b89eb331bc96b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/serial-diff-aggregation.asciidoc",
- "line": 64
- },
- "digest": "b4da132cb934c33d61e2b60988c6d4a3",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\": { <1>\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"calendar_interval\": \"day\"\n },\n \"aggs\": {\n \"the_sum\": {\n \"sum\": {\n \"field\": \"lemmings\" <2>\n }\n },\n \"thirtieth_difference\": {\n \"serial_diff\": { <3>\n \"buckets_path\": \"the_sum\",\n \"lag\" : 30\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "lemmings"
- }
- },
- "thirtieth_difference": {
- "serial_diff": {
- "buckets_path": "the_sum",
- "lag": 30
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/matrix/stats-aggregation.asciidoc",
- "line": 39
- },
- "digest": "8ab89e635fcbc485d1728c13dfeeb1ae",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\": {\n \"statistics\": {\n \"matrix_stats\": {\n \"fields\": [\"poverty\", \"income\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "statistics": {
- "matrix_stats": {
- "fields": [
- "poverty",
- "income"
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/matrix/stats-aggregation.asciidoc",
- "line": 57
- },
- "digest": "2ded5f25c691e6722f8e02aa57e4a889",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"statistics\": {\n \"doc_count\": 50,\n \"fields\": [{\n \"name\": \"income\",\n \"count\": 50,\n \"mean\": 51985.1,\n \"variance\": 7.383377037755103E7,\n \"skewness\": 0.5595114003506483,\n \"kurtosis\": 2.5692365287787124,\n \"covariance\": {\n \"income\": 7.383377037755103E7,\n \"poverty\": -21093.65836734694\n },\n \"correlation\": {\n \"income\": 1.0,\n \"poverty\": -0.8352655256272504\n }\n }, {\n \"name\": \"poverty\",\n \"count\": 50,\n \"mean\": 12.732000000000001,\n \"variance\": 8.637730612244896,\n \"skewness\": 0.4516049811903419,\n \"kurtosis\": 2.8615929677997767,\n \"covariance\": {\n \"income\": -21093.65836734694,\n \"poverty\": 8.637730612244896\n },\n \"correlation\": {\n \"income\": -0.8352655256272504,\n \"poverty\": 1.0\n }\n }]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/matrix/stats-aggregation.asciidoc",
- "line": 122
- },
- "digest": "7ee2877f8f031b9a4e56a40b371421fb",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\": {\n \"matrixstats\": {\n \"matrix_stats\": {\n \"fields\": [\"poverty\", \"income\"],\n \"missing\": {\"income\" : 50000} <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "matrixstats": {
- "matrix_stats": {
- "fields": [
- "poverty",
- "income"
- ],
- "missing": {
- "income": 50000
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 19
- },
- "digest": "0827fcf75228b6d0206a1ffe6bf7d263",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"my_agg\": {\n \"terms\": {\n \"field\": \"text\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "my_agg": {
- "terms": {
- "field": "text"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 45
- },
- "digest": "2d39331333f64fcc31fa298ac59b161f",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"titles\": {\n \"terms\": {\n \"field\": \"title\"\n },\n \"meta\": {\n \"color\": \"blue\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "titles": {
- "terms": {
- "field": "title"
- },
- "meta": {
- "color": "blue"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 66
- },
- "digest": "0e349e31fe27f0af20c2b3604b5ecd6e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"aggregations\": {\n \"titles\": {\n \"meta\": {\n \"color\" : \"blue\"\n },\n \"doc_count_error_upper_bound\" : 0,\n \"sum_other_doc_count\" : 0,\n \"buckets\": [\n ]\n }\n },\n ...\n}"
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 96
- },
- "digest": "ea447f43ebd5f72c65de699904474d0d",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search?typed_keys\n{\n \"aggregations\": {\n \"tweets_over_time\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"year\"\n },\n \"aggregations\": {\n \"top_users\": {\n \"top_hits\": {\n \"size\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "typed_keys": true
- },
- "body": {
- "aggregations": {
- "tweets_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "year"
- },
- "aggregations": {
- "top_users": {
- "top_hits": {
- "size": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 122
- },
- "digest": "609a1426592d38b830f5a2fbf7b24641",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"aggregations\": {\n \"date_histogram#tweets_over_time\": { <1>\n \"buckets\" : [\n {\n \"key_as_string\" : \"2009-01-01T00:00:00.000Z\",\n \"key\" : 1230768000000,\n \"doc_count\" : 5,\n \"top_hits#top_users\" : { <2>\n \"hits\" : {\n \"total\" : {\n \"value\": 5,\n \"relation\": \"eq\"\n },\n \"max_score\" : 1.0,\n \"hits\" : [\n {\n \"_index\": \"twitter\",\n \"_id\": \"0\",\n \"_score\": 1.0,\n \"_source\": {\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"user\": \"kimchy\",\n \"likes\": 0\n }\n }\n ]\n }\n }\n }\n ]\n }\n },\n ...\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/query_filter_context.asciidoc",
- "line": 62
- },
- "digest": "f29a28fffa7ec604a33a838f48f7ea79",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": { <1>\n \"bool\": { <2>\n \"must\": [\n { \"match\": { \"title\": \"Search\" }},\n { \"match\": { \"content\": \"Elasticsearch\" }}\n ],\n \"filter\": [ <3>\n { \"term\": { \"status\": \"published\" }},\n { \"range\": { \"publish_date\": { \"gte\": \"2015-01-01\" }}}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "title": "Search"
- }
- },
- {
- "match": {
- "content": "Elasticsearch"
- }
- }
- ],
- "filter": [
- {
- "term": {
- "status": "published"
- }
- },
- {
- "range": {
- "publish_date": {
- "gte": "2015-01-01"
- }
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/bool-query.asciidoc",
- "line": 36
- },
- "digest": "06afce2955f9094d96d27067ebca32e8",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n },\n \"filter\": {\n \"term\" : { \"tag\" : \"tech\" }\n },\n \"must_not\" : {\n \"range\" : {\n \"age\" : { \"gte\" : 10, \"lte\" : 20 }\n }\n },\n \"should\" : [\n { \"term\" : { \"tag\" : \"wow\" } },\n { \"term\" : { \"tag\" : \"elasticsearch\" } }\n ],\n \"minimum_should_match\" : 1,\n \"boost\" : 1.0\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "term": {
- "user": "kimchy"
- }
- },
- "filter": {
- "term": {
- "tag": "tech"
- }
- },
- "must_not": {
- "range": {
- "age": {
- "gte": 10,
- "lte": 20
- }
- }
- },
- "should": [
- {
- "term": {
- "tag": "wow"
- }
- },
- {
- "term": {
- "tag": "elasticsearch"
- }
- }
- ],
- "minimum_should_match": 1,
- "boost": 1
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/bool-query.asciidoc",
- "line": 88
- },
- "digest": "f70a54cd9a9f4811bf962e469f2ca2ea",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _search\n{\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"term\": {\n \"status\": \"active\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "active"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/bool-query.asciidoc",
- "line": 107
- },
- "digest": "fa88f6f5a7d728ec4f1d05244228cb09",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _search\n{\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match_all\": {}\n },\n \"filter\": {\n \"term\": {\n \"status\": \"active\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "term": {
- "status": "active"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/bool-query.asciidoc",
- "line": 130
- },
- "digest": "162b5b693b713f0bfab1209d59443c46",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _search\n{\n \"query\": {\n \"constant_score\": {\n \"filter\": {\n \"term\": {\n \"status\": \"active\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "term": {
- "status": "active"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/boosting-query.asciidoc",
- "line": 18
- },
- "digest": "292e4c6567378fc7b70033b53b04ce12",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"boosting\" : {\n \"positive\" : {\n \"term\" : {\n \"text\" : \"apple\"\n }\n },\n \"negative\" : {\n \"term\" : {\n \"text\" : \"pie tart fruit crumble tree\"\n }\n },\n \"negative_boost\" : 0.5\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "boosting": {
- "positive": {
- "term": {
- "text": "apple"
- }
- },
- "negative": {
- "term": {
- "text": "pie tart fruit crumble tree"
- }
- },
- "negative_boost": 0.5
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/constant-score-query.asciidoc",
- "line": 12
- },
- "digest": "d59a084640acf2f5c51d3068d38b5fc0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"constant_score\" : {\n \"filter\" : {\n \"term\" : { \"user\" : \"kimchy\"}\n },\n \"boost\" : 1.2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "term": {
- "user": "kimchy"
- }
- },
- "boost": 1.2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/dis-max-query.asciidoc",
- "line": 18
- },
- "digest": "fcf5a593cfe8809d98a5239ad9c82038",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"dis_max\" : {\n \"queries\" : [\n { \"term\" : { \"title\" : \"Quick pets\" }},\n { \"term\" : { \"body\" : \"Quick pets\" }}\n ],\n \"tie_breaker\" : 0.7\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "dis_max": {
- "queries": [
- {
- "term": {
- "title": "Quick pets"
- }
- },
- {
- "term": {
- "body": "Quick pets"
- }
- }
- ],
- "tie_breaker": 0.7
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 19
- },
- "digest": "a42f33e15b0995bb4b6058659bfdea85",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": { \"match_all\": {} },\n \"boost\": \"5\",\n \"random_score\": {}, <1>\n \"boost_mode\":\"multiply\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match_all": {}
- },
- "boost": "5",
- "random_score": {},
- "boost_mode": "multiply"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 41
- },
- "digest": "b4a0d0ed512dffc10ee53bca2feca49b",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": { \"match_all\": {} },\n \"boost\": \"5\", <1>\n \"functions\": [\n {\n \"filter\": { \"match\": { \"test\": \"bar\" } },\n \"random_score\": {}, <2>\n \"weight\": 23\n },\n {\n \"filter\": { \"match\": { \"test\": \"cat\" } },\n \"weight\": 42\n }\n ],\n \"max_boost\": 42,\n \"score_mode\": \"max\",\n \"boost_mode\": \"multiply\",\n \"min_score\" : 42\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match_all": {}
- },
- "boost": "5",
- "functions": [
- {
- "filter": {
- "match": {
- "test": "bar"
- }
- },
- "random_score": {},
- "weight": 23
- },
- {
- "filter": {
- "match": {
- "test": "cat"
- }
- },
- "weight": 42
- }
- ],
- "max_boost": 42,
- "score_mode": "max",
- "boost_mode": "multiply",
- "min_score": 42
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 137
- },
- "digest": "ec473de07fe89bcbac1f8e278617fe46",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": {\n \"match\": { \"message\": \"elasticsearch\" }\n },\n \"script_score\" : {\n \"script\" : {\n \"source\": \"Math.log(2 + doc['likes'].value)\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "script_score": {
- "script": {
- "source": "Math.log(2 + doc['likes'].value)"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 175
- },
- "digest": "b68c85fe1b0d2f264dc0d1cbf530f319",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": {\n \"match\": { \"message\": \"elasticsearch\" }\n },\n \"script_score\" : {\n \"script\" : {\n \"params\": {\n \"a\": 5,\n \"b\": 1.2\n },\n \"source\": \"params.a / Math.pow(params.b, doc['likes'].value)\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "script_score": {
- "script": {
- "params": {
- "a": 5,
- "b": 1.2
- },
- "source": "params.a / Math.pow(params.b, doc['likes'].value)"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 241
- },
- "digest": "645c4c6e209719d3a4d25b1a629cb23b",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"random_score\": {\n \"seed\": 10,\n \"field\": \"_seq_no\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "random_score": {
- "seed": 10,
- "field": "_seq_no"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 269
- },
- "digest": "8eaf4d5dd4ab1335deefa7749fdbbcc3",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"field_value_factor\": {\n \"field\": \"likes\",\n \"factor\": 1.2,\n \"modifier\": \"sqrt\",\n \"missing\": 1\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "field_value_factor": {
- "field": "likes",
- "factor": 1.2,
- "modifier": "sqrt",
- "missing": 1
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 380
- },
- "digest": "ec27afee074001b0e4e393611010842b",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"gauss\": {\n \"date\": {\n \"origin\": \"2013-09-17\", <1>\n \"scale\": \"10d\",\n \"offset\": \"5d\", <2>\n \"decay\" : 0.5 <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "gauss": {
- "date": {
- "origin": "2013-09-17",
- "scale": "10d",
- "offset": "5d",
- "decay": 0.5
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 578
- },
- "digest": "df17f920b0deab3529b98df88b781f55",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"functions\": [\n {\n \"gauss\": {\n \"price\": {\n \"origin\": \"0\",\n \"scale\": \"20\"\n }\n }\n },\n {\n \"gauss\": {\n \"location\": {\n \"origin\": \"11, 12\",\n \"scale\": \"2km\"\n }\n }\n }\n ],\n \"query\": {\n \"match\": {\n \"properties\": \"balcony\"\n }\n },\n \"score_mode\": \"multiply\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "functions": [
- {
- "gauss": {
- "price": {
- "origin": "0",
- "scale": "20"
- }
- }
- },
- {
- "gauss": {
- "location": {
- "origin": "11, 12",
- "scale": "2km"
- }
- }
- }
- ],
- "query": {
- "match": {
- "properties": "balcony"
- }
- },
- "score_mode": "multiply"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 28
- },
- "digest": "807c0c9763f8c1114b3c8278c2a0cb56",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"all_of\" : {\n \"ordered\" : true,\n \"intervals\" : [\n {\n \"match\" : {\n \"query\" : \"my favorite food\",\n \"max_gaps\" : 0,\n \"ordered\" : true\n }\n },\n {\n \"any_of\" : {\n \"intervals\" : [\n { \"match\" : { \"query\" : \"hot water\" } },\n { \"match\" : { \"query\" : \"cold porridge\" } }\n ]\n }\n }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "all_of": {
- "ordered": true,
- "intervals": [
- {
- "match": {
- "query": "my favorite food",
- "max_gaps": 0,
- "ordered": true
- }
- },
- {
- "any_of": {
- "intervals": [
- {
- "match": {
- "query": "hot water"
- }
- },
- {
- "match": {
- "query": "cold porridge"
- }
- }
- ]
- }
- }
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 312
- },
- "digest": "7471e97aaaf21c3a200abdd89f15c3cc",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"match\" : {\n \"query\" : \"hot porridge\",\n \"max_gaps\" : 10,\n \"filter\" : {\n \"not_containing\" : {\n \"match\" : {\n \"query\" : \"salty\"\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "match": {
- "query": "hot porridge",
- "max_gaps": 10,
- "filter": {
- "not_containing": {
- "match": {
- "query": "salty"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 343
- },
- "digest": "2de6885bacb8769b8f22dce253c96b0c",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"match\" : {\n \"query\" : \"hot porridge\",\n \"filter\" : {\n \"script\" : {\n \"source\" : \"interval.start > 10 && interval.end < 20 && interval.gaps == 0\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "match": {
- "query": "hot porridge",
- "filter": {
- "script": {
- "source": "interval.start > 10 && interval.end < 20 && interval.gaps == 0"
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 374
- },
- "digest": "e2a22c6fd58cc0becf4c383134a08f8b",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"match\" : {\n \"query\" : \"salty\",\n \"filter\" : {\n \"contained_by\" : {\n \"match\" : {\n \"query\" : \"hot porridge\"\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "match": {
- "query": "salty",
- "filter": {
- "contained_by": {
- "match": {
- "query": "hot porridge"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 409
- },
- "digest": "5f79c42b0f74fdf71359cef82843fad3",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"all_of\" : {\n \"intervals\" : [\n { \"match\" : { \"query\" : \"the\" } },\n { \"any_of\" : {\n \"intervals\" : [\n { \"match\" : { \"query\" : \"big\" } },\n { \"match\" : { \"query\" : \"big bad\" } }\n ] } },\n { \"match\" : { \"query\" : \"wolf\" } }\n ],\n \"max_gaps\" : 0,\n \"ordered\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "all_of": {
- "intervals": [
- {
- "match": {
- "query": "the"
- }
- },
- {
- "any_of": {
- "intervals": [
- {
- "match": {
- "query": "big"
- }
- },
- {
- "match": {
- "query": "big bad"
- }
- }
- ]
- }
- },
- {
- "match": {
- "query": "wolf"
- }
- }
- ],
- "max_gaps": 0,
- "ordered": true
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 442
- },
- "digest": "e7811867397b305efbbe8925d8a01c1a",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"any_of\" : {\n \"intervals\" : [\n { \"match\" : {\n \"query\" : \"the big bad wolf\",\n \"ordered\" : true,\n \"max_gaps\" : 0 } },\n { \"match\" : {\n \"query\" : \"the big wolf\",\n \"ordered\" : true,\n \"max_gaps\" : 0 } }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "any_of": {
- "intervals": [
- {
- "match": {
- "query": "the big bad wolf",
- "ordered": true,
- "max_gaps": 0
- }
- },
- {
- "match": {
- "query": "the big wolf",
- "ordered": true,
- "max_gaps": 0
- }
- }
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 18
- },
- "digest": "e0d6e02b998bdea99c9c08dcc3630c5e",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : {\n \"query\" : \"this is a test\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "this is a test"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 150
- },
- "digest": "fa2fe60f570bd930d2891778c6efbfe6",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : \"this is a test\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "this is a test"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 175
- },
- "digest": "6138d6919f3cbaaf61e1092f817d295c",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : {\n \"query\" : \"this is a test\",\n \"operator\" : \"and\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "this is a test",
- "operator": "and"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 219
- },
- "digest": "5043b83a89091fa00edb341ddf7ba370",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : {\n \"query\" : \"this is a testt\",\n \"fuzziness\": \"AUTO\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "this is a testt",
- "fuzziness": "AUTO"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 241
- },
- "digest": "0ac9916f47a2483b89c1416684af322a",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : {\n \"query\" : \"to be or not to be\",\n \"operator\" : \"and\",\n \"zero_terms_query\": \"all\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "to be or not to be",
- "operator": "and",
- "zero_terms_query": "all"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 268
- },
- "digest": "7f56755fb6c42f7e6203339a6d0cb6e6",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\": {\n \"query\" : \"ny city\",\n \"auto_generate_synonyms_phrase_query\" : false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "ny city",
- "auto_generate_synonyms_phrase_query": false
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-bool-prefix-query.asciidoc",
- "line": 13
- },
- "digest": "79c7e8a98c47fad3e96c654d34aa049a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_bool_prefix\" : {\n \"message\" : \"quick brown f\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_bool_prefix": {
- "message": "quick brown f"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-bool-prefix-query.asciidoc",
- "line": 28
- },
- "digest": "effc6b4784aca12691de5d5782c0384b",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"should\": [\n { \"term\": { \"message\": \"quick\" }},\n { \"term\": { \"message\": \"brown\" }},\n { \"prefix\": { \"message\": \"f\"}}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "term": {
- "message": "quick"
- }
- },
- {
- "term": {
- "message": "brown"
- }
- },
- {
- "prefix": {
- "message": "f"
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-bool-prefix-query.asciidoc",
- "line": 59
- },
- "digest": "953aab6cbd12a4f034cf02bf34d62a72",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_bool_prefix\" : {\n \"message\": {\n \"query\": \"quick brown f\",\n \"analyzer\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_bool_prefix": {
- "message": {
- "query": "quick brown f",
- "analyzer": "keyword"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-phrase-query.asciidoc",
- "line": 11
- },
- "digest": "83f95657beca9bf5d8264c80c7fb463f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_phrase\" : {\n \"message\" : \"this is a test\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "message": "this is a test"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-phrase-query.asciidoc",
- "line": 30
- },
- "digest": "72231b7debac60c95b9869a97dafda3a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_phrase\" : {\n \"message\" : {\n \"query\" : \"this is a test\",\n \"analyzer\" : \"my_analyzer\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "message": {
- "query": "this is a test",
- "analyzer": "my_analyzer"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-phrase-prefix-query.asciidoc",
- "line": 22
- },
- "digest": "ca0da81281347e33116710efd36697c8",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_phrase_prefix\" : {\n \"message\" : {\n \"query\" : \"quick brown f\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase_prefix": {
- "message": {
- "query": "quick brown f"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 11
- },
- "digest": "53b908c3432118c5a6e460f74d32006b",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"this is a test\", <1>\n \"fields\": [ \"subject\", \"message\" ] <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "this is a test",
- "fields": [
- "subject",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 33
- },
- "digest": "6a1702dd50690cae833572e48a0ddf25",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"fields\": [ \"title\", \"*_name\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Will Smith",
- "fields": [
- "title",
- "*_name"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 50
- },
- "digest": "e30ea6e3823a139d7693d8cce1920a06",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\" : \"this is a test\",\n \"fields\" : [ \"subject^3\", \"message\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "this is a test",
- "fields": [
- "subject^3",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 113
- },
- "digest": "5da6efd5b038ada64c9e853c88c1ec47",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"brown fox\",\n \"type\": \"best_fields\",\n \"fields\": [ \"subject\", \"message\" ],\n \"tie_breaker\": 0.3\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "brown fox",
- "type": "best_fields",
- "fields": [
- "subject",
- "message"
- ],
- "tie_breaker": 0.3
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 130
- },
- "digest": "b0eaf67e5cce24ef8889bf20951ccec1",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"dis_max\": {\n \"queries\": [\n { \"match\": { \"subject\": \"brown fox\" }},\n { \"match\": { \"message\": \"brown fox\" }}\n ],\n \"tie_breaker\": 0.3\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "dis_max": {
- "queries": [
- {
- "match": {
- "subject": "brown fox"
- }
- },
- {
- "match": {
- "message": "brown fox"
- }
- }
- ],
- "tie_breaker": 0.3
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 170
- },
- "digest": "e270f3f721a5712cd11a5ca03554f5b0",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"type\": \"best_fields\",\n \"fields\": [ \"first_name\", \"last_name\" ],\n \"operator\": \"and\" <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Will Smith",
- "type": "best_fields",
- "fields": [
- "first_name",
- "last_name"
- ],
- "operator": "and"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 212
- },
- "digest": "7b908b1189f076942de8cd497ff1fa59",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"quick brown fox\",\n \"type\": \"most_fields\",\n \"fields\": [ \"title\", \"title.original\", \"title.shingles\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "quick brown fox",
- "type": "most_fields",
- "fields": [
- "title",
- "title.original",
- "title.shingles"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 228
- },
- "digest": "6bbc613bd4f9aec1bbdbabf5db021d28",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\": {\n \"should\": [\n { \"match\": { \"title\": \"quick brown fox\" }},\n { \"match\": { \"title.original\": \"quick brown fox\" }},\n { \"match\": { \"title.shingles\": \"quick brown fox\" }}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "match": {
- "title": "quick brown fox"
- }
- },
- {
- "match": {
- "title.original": "quick brown fox"
- }
- },
- {
- "match": {
- "title.shingles": "quick brown fox"
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 259
- },
- "digest": "0e118857b815b62118a30c042f079db1",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"quick brown f\",\n \"type\": \"phrase_prefix\",\n \"fields\": [ \"subject\", \"message\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "quick brown f",
- "type": "phrase_prefix",
- "fields": [
- "subject",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 275
- },
- "digest": "33f148e3d8676de6cc52f58749898a13",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"dis_max\": {\n \"queries\": [\n { \"match_phrase_prefix\": { \"subject\": \"quick brown f\" }},\n { \"match_phrase_prefix\": { \"message\": \"quick brown f\" }}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "dis_max": {
- "queries": [
- {
- "match_phrase_prefix": {
- "subject": "quick brown f"
- }
- },
- {
- "match_phrase_prefix": {
- "message": "quick brown f"
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 341
- },
- "digest": "047266b0d20fdb62ebc72d51952c8f6d",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"type\": \"cross_fields\",\n \"fields\": [ \"first_name\", \"last_name\" ],\n \"operator\": \"and\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Will Smith",
- "type": "cross_fields",
- "fields": [
- "first_name",
- "last_name"
- ],
- "operator": "and"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 400
- },
- "digest": "ad0dcbc7fc619e952c8825b8f307b7b2",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Jon\",\n \"type\": \"cross_fields\",\n \"fields\": [\n \"first\", \"first.edge\",\n \"last\", \"last.edge\"\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Jon",
- "type": "cross_fields",
- "fields": [
- "first",
- "first.edge",
- "last",
- "last.edge"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 438
- },
- "digest": "3cd50a789b8e1f0ebbbc53a8d7ecf656",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\": {\n \"should\": [\n {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"type\": \"cross_fields\",\n \"fields\": [ \"first\", \"last\" ],\n \"minimum_should_match\": \"50%\" <1>\n }\n },\n {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"type\": \"cross_fields\",\n \"fields\": [ \"*.edge\" ]\n }\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "multi_match": {
- "query": "Will Smith",
- "type": "cross_fields",
- "fields": [
- "first",
- "last"
- ],
- "minimum_should_match": "50%"
- }
- },
- {
- "multi_match": {
- "query": "Will Smith",
- "type": "cross_fields",
- "fields": [
- "*.edge"
- ]
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 472
- },
- "digest": "179f0a3e84ff4bbac18787a018eabf89",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Jon\",\n \"type\": \"cross_fields\",\n \"analyzer\": \"standard\", <1>\n \"fields\": [ \"first\", \"last\", \"*.edge\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Jon",
- "type": "cross_fields",
- "analyzer": "standard",
- "fields": [
- "first",
- "last",
- "*.edge"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 524
- },
- "digest": "68721288dc9ad8aa1b55099b4d303051",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"quick brown f\",\n \"type\": \"bool_prefix\",\n \"fields\": [ \"subject\", \"message\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "quick brown f",
- "type": "bool_prefix",
- "fields": [
- "subject",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 42
- },
- "digest": "ad6ea0c1e46712aa1fd6d3bfa0ec979e",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"query\" : \"(new york city) OR (big apple)\",\n \"default_field\" : \"content\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "(new york city) OR (big apple)",
- "default_field": "content"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-syntax.asciidoc",
- "line": 294
- },
- "digest": "8ca595edc1e1f1ae6bc3ee05e0aa1e32",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"query\" : {\n \"query_string\" : {\n \"query\" : \"kimchy\\\\!\",\n \"fields\" : [\"user\"]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "kimchy\\!",
- "fields": [
- "user"
- ]
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 255
- },
- "digest": "f2d68493abd3ca430bd03a7f7f8d18f9",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"fields\" : [\"content\", \"name\"],\n \"query\" : \"this AND that\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "content",
- "name"
- ],
- "query": "this AND that"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 271
- },
- "digest": "e17e8852ec3f31781e1364f4dffeb6d0",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"(content:this OR name:this) AND (content:that OR name:that)\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "(content:this OR name:this) AND (content:that OR name:that)"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 287
- },
- "digest": "a2a25aad1fea9a541b52ac613c78fb64",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"fields\" : [\"content\", \"name^5\"],\n \"query\" : \"this AND that OR thus\",\n \"tie_breaker\" : 0\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "content",
- "name^5"
- ],
- "query": "this AND that OR thus",
- "tie_breaker": 0
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 306
- },
- "digest": "28aad2c5942bfb221c2bf1bbdc01658e",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"fields\" : [\"city.*\"],\n \"query\" : \"this AND that OR thus\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "city.*"
- ],
- "query": "this AND that OR thus"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 323
- },
- "digest": "db6cba451ba562abe953d09ad80cc15c",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"query\" : \"city.\\\\*:(this AND that OR thus)\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "city.\\*:(this AND that OR thus)"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 342
- },
- "digest": "58b5003c0a53a39bf509aa3797aad471",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"fields\" : [\"content\", \"name.*^5\"],\n \"query\" : \"this AND that OR thus\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "content",
- "name.*^5"
- ],
- "query": "this AND that OR thus"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 408
- },
- "digest": "f32f0c19b42de3b87dd764fe4ca17e7c",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"default_field\": \"title\",\n \"query\" : \"ny city\",\n \"auto_generate_synonyms_phrase_query\" : false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "default_field": "title",
- "query": "ny city",
- "auto_generate_synonyms_phrase_query": false
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 436
- },
- "digest": "60ee33f3acfdd0fe6f288ac77312c780",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"fields\": [\n \"title\"\n ],\n \"query\": \"this that thus\",\n \"minimum_should_match\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "title"
- ],
- "query": "this that thus",
- "minimum_should_match": 2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 462
- },
- "digest": "be1bd47393646ac6bbee177d1cdb7738",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"fields\": [\n \"title\",\n \"content\"\n ],\n \"query\": \"this that thus\",\n \"minimum_should_match\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "title",
- "content"
- ],
- "query": "this that thus",
- "minimum_should_match": 2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 486
- },
- "digest": "fdd38f0d248385a444c777e7acd97846",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"fields\": [\n \"title\",\n \"content\"\n ],\n \"query\": \"this OR that OR thus\",\n \"minimum_should_match\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "title",
- "content"
- ],
- "query": "this OR that OR thus",
- "minimum_should_match": 2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 518
- },
- "digest": "6f21a878fee3b43c5332b81aaddbeac7",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"fields\": [\n \"title\",\n \"content\"\n ],\n \"query\": \"this OR that OR thus\",\n \"type\": \"cross_fields\",\n \"minimum_should_match\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "title",
- "content"
- ],
- "query": "this OR that OR thus",
- "type": "cross_fields",
- "minimum_should_match": 2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 24
- },
- "digest": "0d49474511b236bc89e768c8ee91adf1",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\": \"\\\"fried eggs\\\" +(eggplant | potato) -frittata\",\n \"fields\": [\"title^5\", \"body\"],\n \"default_operator\": \"and\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "\"fried eggs\" +(eggplant | potato) -frittata",
- "fields": [
- "title^5",
- "body"
- ],
- "default_operator": "and"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 156
- },
- "digest": "521aa59ae56681fd59ac5840cba6b6c5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"fields\" : [\"content\"],\n \"query\" : \"foo bar -baz\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "fields": [
- "content"
- ],
- "query": "foo bar -baz"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 184
- },
- "digest": "f686f52decb1d57356d42920f46d4d85",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\" : \"foo | bar + baz*\",\n \"flags\" : \"OR|AND|PREFIX\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "foo | bar + baz*",
- "flags": "OR|AND|PREFIX"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 248
- },
- "digest": "e8ea65153d7775f25b08dfdfe6954498",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\": \"Will Smith\",\n \"fields\": [ \"title\", \"*_name\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "Will Smith",
- "fields": [
- "title",
- "*_name"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 265
- },
- "digest": "da8db0769dff7305f178c12b1111bc99",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\" : \"this is a test\",\n \"fields\" : [ \"subject^3\", \"message\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "this is a test",
- "fields": [
- "subject^3",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 291
- },
- "digest": "2e602d7fbad46132358f921dff7d1a26",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\" : \"ny city\",\n \"auto_generate_synonyms_phrase_query\" : false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "ny city",
- "auto_generate_synonyms_phrase_query": false
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 11
- },
- "digest": "b4ef55e48f137e8f67f82b42a047c8f6",
- "lang": "console",
- "found": [],
- "source": "PUT /my_locations\n{\n \"mappings\": {\n \"properties\": {\n \"pin\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n }\n }\n}\n\nPUT /my_locations/_doc/1\n{\n \"pin\" : {\n \"location\" : {\n \"lat\" : 40.12,\n \"lon\" : -71.34\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_locations",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "pin": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_locations/_doc/1",
- "query": null,
- "body": {
- "pin": {
- "location": {
- "lat": 40.12,
- "lon": -71.34
- }
- }
- },
- "params": {
- "index": "my_locations",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 43
- },
- "digest": "49abe3273ac51f14cd4b5f1aaa7f6833",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : {\n \"lat\" : 40.73,\n \"lon\" : -74.1\n },\n \"bottom_right\" : {\n \"lat\" : 40.01,\n \"lon\" : -71.12\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": {
- "lat": 40.73,
- "lon": -74.1
- },
- "bottom_right": {
- "lat": 40.01,
- "lon": -71.12
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 98
- },
- "digest": "49abe3273ac51f14cd4b5f1aaa7f6833",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : {\n \"lat\" : 40.73,\n \"lon\" : -74.1\n },\n \"bottom_right\" : {\n \"lat\" : 40.01,\n \"lon\" : -71.12\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": {
- "lat": 40.73,
- "lon": -74.1
- },
- "bottom_right": {
- "lat": 40.01,
- "lon": -71.12
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 132
- },
- "digest": "2cbaaab829728c46359d2f68b71c446e",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : [-74.1, 40.73],\n \"bottom_right\" : [-71.12, 40.01]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": [
- -74.1,
- 40.73
- ],
- "bottom_right": [
- -71.12,
- 40.01
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 159
- },
- "digest": "bbf04a7f7a8858e911d6a53fe88127b0",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : \"40.73, -74.1\",\n \"bottom_right\" : \"40.01, -71.12\"\n }\n }\n }\n }\n}\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": "40.73, -74.1",
- "bottom_right": "40.01, -71.12"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 184
- },
- "digest": "417dcb29f5547d4de9d75d8b6a7a53c8",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"wkt\" : \"BBOX (-74.1, -71.12, 40.73, 40.01)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "wkt": "BBOX (-74.1, -71.12, 40.73, 40.01)"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 208
- },
- "digest": "d84695e3db2c92cd3faebf729e482bf0",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : \"dr5r9ydj2y73\",\n \"bottom_right\" : \"drj7teegpus6\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": "dr5r9ydj2y73",
- "bottom_right": "drj7teegpus6"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 242
- },
- "digest": "32ffcae9e1d13df0b7295c349d9145ec",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : \"dr\",\n \"bottom_right\" : \"dr\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": "dr",
- "bottom_right": "dr"
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 271
- },
- "digest": "370750b2f51bd097f4578e5b105babdf",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top\" : 40.73,\n \"left\" : -74.1,\n \"bottom\" : 40.01,\n \"right\" : -71.12\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top": 40.73,
- "left": -74.1,
- "bottom": 40.01,
- "right": -71.12
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 320
- },
- "digest": "15eee00f09d2290e0f350d420029906e",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : {\n \"lat\" : 40.73,\n \"lon\" : -74.1\n },\n \"bottom_right\" : {\n \"lat\" : 40.10,\n \"lon\" : -71.12\n }\n },\n \"type\" : \"indexed\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": {
- "lat": 40.73,
- "lon": -74.1
- },
- "bottom_right": {
- "lat": 40.1,
- "lon": -71.12
- }
- },
- "type": "indexed"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 12
- },
- "digest": "b4ef55e48f137e8f67f82b42a047c8f6",
- "lang": "console",
- "found": [],
- "source": "PUT /my_locations\n{\n \"mappings\": {\n \"properties\": {\n \"pin\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n }\n }\n}\n\nPUT /my_locations/_doc/1\n{\n \"pin\" : {\n \"location\" : {\n \"lat\" : 40.12,\n \"lon\" : -71.34\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_locations",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "pin": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_locations/_doc/1",
- "query": null,
- "body": {
- "pin": {
- "location": {
- "lat": 40.12,
- "lon": -71.34
- }
- }
- },
- "params": {
- "index": "my_locations",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 45
- },
- "digest": "4639a1bbd12710d5f01f1aaadce09a3e",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"200km\",\n \"pin.location\" : {\n \"lat\" : 40,\n \"lon\" : -70\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "200km",
- "pin.location": {
- "lat": 40,
- "lon": -70
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 77
- },
- "digest": "6fc37ccf570ff7e35b7b0bd4bacb8abd",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"12km\",\n \"pin.location\" : {\n \"lat\" : 40,\n \"lon\" : -70\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "12km",
- "pin.location": {
- "lat": 40,
- "lon": -70
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 106
- },
- "digest": "926fff8330fc3008f62b9de34f385a57",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"12km\",\n \"pin.location\" : [-70, 40]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "12km",
- "pin.location": [
- -70,
- 40
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 132
- },
- "digest": "f878546633c6bcc30edcdcf520a20eba",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"12km\",\n \"pin.location\" : \"40,-70\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "12km",
- "pin.location": "40,-70"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 155
- },
- "digest": "48a40f20b752a8120cf020bda041adca",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"12km\",\n \"pin.location\" : \"drm3btev3e86\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "12km",
- "pin.location": "drm3btev3e86"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-polygon-query.asciidoc",
- "line": 11
- },
- "digest": "383c5a0771484086dcfd8d990830eeb7",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_polygon\" : {\n \"person.location\" : {\n \"points\" : [\n {\"lat\" : 40, \"lon\" : -70},\n {\"lat\" : 30, \"lon\" : -80},\n {\"lat\" : 20, \"lon\" : -90}\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_polygon": {
- "person.location": {
- "points": [
- {
- "lat": 40,
- "lon": -70
- },
- {
- "lat": 30,
- "lon": -80
- },
- {
- "lat": 20,
- "lon": -90
- }
- ]
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-polygon-query.asciidoc",
- "line": 60
- },
- "digest": "ecf966a20c54eb4e60a2670f51a99bdc",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_polygon\" : {\n \"person.location\" : {\n \"points\" : [\n [-70, 40],\n [-80, 30],\n [-90, 20]\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_polygon": {
- "person.location": {
- "points": [
- [
- -70,
- 40
- ],
- [
- -80,
- 30
- ],
- [
- -90,
- 20
- ]
- ]
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-polygon-query.asciidoc",
- "line": 90
- },
- "digest": "e532955a897ac1844e7c5727916bf32c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_polygon\" : {\n \"person.location\" : {\n \"points\" : [\n \"40, -70\",\n \"30, -80\",\n \"20, -90\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_polygon": {
- "person.location": {
- "points": [
- "40, -70",
- "30, -80",
- "20, -90"
- ]
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-polygon-query.asciidoc",
- "line": 118
- },
- "digest": "5b809a128ee33be706e2097dde6e7719",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_polygon\" : {\n \"person.location\" : {\n \"points\" : [\n \"drn5x1g8cu2y\",\n \"30, -80\",\n \"20, -90\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_polygon": {
- "person.location": {
- "points": [
- "drn5x1g8cu2y",
- "30, -80",
- "20, -90"
- ]
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 29
- },
- "digest": "183be708fc91109008109b5ed44c8b08",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}\n\nPOST /example/_doc?refresh\n{\n \"name\": \"Wind & Wetter, Berlin, Germany\",\n \"location\": {\n \"type\": \"point\",\n \"coordinates\": [13.400544, 52.530286]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "Wind & Wetter, Berlin, Germany",
- "location": {
- "type": "point",
- "coordinates": [
- 13.400544,
- 52.530286
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 56
- },
- "digest": "129975da094b6b93cc8fcc4042d47913",
- "lang": "console",
- "found": [],
- "source": "GET /example/_search\n{\n \"query\":{\n \"bool\": {\n \"must\": {\n \"match_all\": {}\n },\n \"filter\": {\n \"geo_shape\": {\n \"location\": {\n \"shape\": {\n \"type\": \"envelope\",\n \"coordinates\" : [[13.0, 53.0], [14.0, 52.0]]\n },\n \"relation\": \"within\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/example/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_shape": {
- "location": {
- "shape": {
- "type": "envelope",
- "coordinates": [
- [
- 13,
- 53
- ],
- [
- 14,
- 52
- ]
- ]
- },
- "relation": "within"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 100
- },
- "digest": "0e941a8309c3743972b8f5a8d9d9ada6",
- "lang": "console",
- "found": [],
- "source": "PUT /shapes\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}\n\nPUT /shapes/_doc/deu\n{\n \"location\": {\n \"type\": \"envelope\",\n \"coordinates\" : [[13.0, 53.0], [14.0, 52.0]]\n }\n}\n\nGET /example/_search\n{\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"geo_shape\": {\n \"location\": {\n \"indexed_shape\": {\n \"index\": \"shapes\",\n \"id\": \"deu\",\n \"path\": \"location\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/shapes",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "shapes"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/shapes/_doc/deu",
- "query": null,
- "body": {
- "location": {
- "type": "envelope",
- "coordinates": [
- [
- 13,
- 53
- ],
- [
- 14,
- 52
- ]
- ]
- }
- },
- "params": {
- "index": "shapes",
- "id": "deu"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/example/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "geo_shape": {
- "location": {
- "indexed_shape": {
- "index": "shapes",
- "id": "deu",
- "path": "location"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/shape-query.asciidoc",
- "line": 28
- },
- "digest": "9208f0823deacf3e3a2cc2b5d78f1e33",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"geometry\": {\n \"type\": \"shape\"\n }\n }\n }\n}\n\nPUT /example/_doc/1?refresh=wait_for\n{\n \"name\": \"Lucky Landing\",\n \"geometry\": {\n \"type\": \"point\",\n \"coordinates\": [1355.400544, 5255.530286]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geometry": {
- "type": "shape"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/example/_doc/1",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "name": "Lucky Landing",
- "geometry": {
- "type": "point",
- "coordinates": [
- 1355.400544,
- 5255.530286
- ]
- }
- },
- "params": {
- "index": "example",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/shape-query.asciidoc",
- "line": 55
- },
- "digest": "f7bbcd762afef5a562768a46fe192b56",
- "lang": "console",
- "found": [],
- "source": "GET /example/_search\n{\n \"query\":{\n \"shape\": {\n \"geometry\": {\n \"shape\": {\n \"type\": \"envelope\",\n \"coordinates\" : [[1355.0, 5355.0], [1400.0, 5200.0]]\n },\n \"relation\": \"within\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/example/_search",
- "query": null,
- "body": {
- "query": {
- "shape": {
- "geometry": {
- "shape": {
- "type": "envelope",
- "coordinates": [
- [
- 1355,
- 5355
- ],
- [
- 1400,
- 5200
- ]
- ]
- },
- "relation": "within"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/shape-query.asciidoc",
- "line": 133
- },
- "digest": "86388922e307dd94c0f5f93890f13832",
- "lang": "console",
- "found": [],
- "source": "PUT /shapes\n{\n \"mappings\": {\n \"properties\": {\n \"geometry\": {\n \"type\": \"shape\"\n }\n }\n }\n}\n\nPUT /shapes/_doc/footprint\n{\n \"geometry\": {\n \"type\": \"envelope\",\n \"coordinates\" : [[1355.0, 5355.0], [1400.0, 5200.0]]\n }\n}\n\nGET /example/_search\n{\n \"query\": {\n \"shape\": {\n \"geometry\": {\n \"indexed_shape\": {\n \"index\": \"shapes\",\n \"id\": \"footprint\",\n \"path\": \"geometry\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/shapes",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geometry": {
- "type": "shape"
- }
- }
- }
- },
- "params": {
- "index": "shapes"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/shapes/_doc/footprint",
- "query": null,
- "body": {
- "geometry": {
- "type": "envelope",
- "coordinates": [
- [
- 1355,
- 5355
- ],
- [
- 1400,
- 5200
- ]
- ]
- }
- },
- "params": {
- "index": "shapes",
- "id": "footprint"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/example/_search",
- "query": null,
- "body": {
- "query": {
- "shape": {
- "geometry": {
- "indexed_shape": {
- "index": "shapes",
- "id": "footprint",
- "path": "geometry"
- }
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 23
- },
- "digest": "c612d93e7f682a0d731e385edf9f5d56",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"mappings\" : {\n \"properties\" : {\n \"obj1\" : {\n \"type\" : \"nested\"\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "obj1": {
- "type": "nested"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 41
- },
- "digest": "6be70810d6ebd6f09d8a49f9df847765",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_search\n{\n \"query\": {\n \"nested\" : {\n \"path\" : \"obj1\",\n \"query\" : {\n \"bool\" : {\n \"must\" : [\n { \"match\" : {\"obj1.name\" : \"blue\"} },\n { \"range\" : {\"obj1.count\" : {\"gt\" : 5}} }\n ]\n }\n },\n \"score_mode\" : \"avg\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "obj1",
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "obj1.name": "blue"
- }
- },
- {
- "range": {
- "obj1.count": {
- "gt": 5
- }
- }
- }
- ]
- }
- },
- "score_mode": "avg"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 133
- },
- "digest": "54092c8c646133f5dbbc047990dd458d",
- "lang": "console",
- "found": [],
- "source": "PUT /drivers\n{\n \"mappings\" : {\n \"properties\" : {\n \"driver\" : {\n \"type\" : \"nested\",\n \"properties\" : {\n \"last_name\" : {\n \"type\" : \"text\"\n },\n \"vehicle\" : {\n \"type\" : \"nested\",\n \"properties\" : {\n \"make\" : {\n \"type\" : \"text\"\n },\n \"model\" : {\n \"type\" : \"text\"\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/drivers",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "driver": {
- "type": "nested",
- "properties": {
- "last_name": {
- "type": "text"
- },
- "vehicle": {
- "type": "nested",
- "properties": {
- "make": {
- "type": "text"
- },
- "model": {
- "type": "text"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "drivers"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 165
- },
- "digest": "873fbbc6ab81409058591385fd602736",
- "lang": "console",
- "found": [],
- "source": "PUT /drivers/_doc/1\n{\n \"driver\" : {\n \"last_name\" : \"McQueen\",\n \"vehicle\" : [\n {\n \"make\" : \"Powell Motors\",\n \"model\" : \"Canyonero\"\n },\n {\n \"make\" : \"Miller-Meteor\",\n \"model\" : \"Ecto-1\"\n }\n ]\n }\n}\n\nPUT /drivers/_doc/2?refresh\n{\n \"driver\" : {\n \"last_name\" : \"Hudson\",\n \"vehicle\" : [\n {\n \"make\" : \"Mifune\",\n \"model\" : \"Mach Five\"\n },\n {\n \"make\" : \"Miller-Meteor\",\n \"model\" : \"Ecto-1\"\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/drivers/_doc/1",
- "query": null,
- "body": {
- "driver": {
- "last_name": "McQueen",
- "vehicle": [
- {
- "make": "Powell Motors",
- "model": "Canyonero"
- },
- {
- "make": "Miller-Meteor",
- "model": "Ecto-1"
- }
- ]
- }
- },
- "params": {
- "index": "drivers",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/drivers/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "driver": {
- "last_name": "Hudson",
- "vehicle": [
- {
- "make": "Mifune",
- "model": "Mach Five"
- },
- {
- "make": "Miller-Meteor",
- "model": "Ecto-1"
- }
- ]
- }
- },
- "params": {
- "index": "drivers",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 206
- },
- "digest": "0bd3923424a20a4ba860b0774b9991b1",
- "lang": "console",
- "found": [],
- "source": "GET /drivers/_search\n{\n \"query\" : {\n \"nested\" : {\n \"path\" : \"driver\",\n \"query\" : {\n \"nested\" : {\n \"path\" : \"driver.vehicle\",\n \"query\" : {\n \"bool\" : {\n \"must\" : [\n { \"match\" : { \"driver.vehicle.make\" : \"Powell Motors\" } },\n { \"match\" : { \"driver.vehicle.model\" : \"Canyonero\" } }\n ]\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/drivers/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "driver",
- "query": {
- "nested": {
- "path": "driver.vehicle",
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "driver.vehicle.make": "Powell Motors"
- }
- },
- {
- "match": {
- "driver.vehicle.model": "Canyonero"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "drivers"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 234
- },
- "digest": "72fbc50004bd2882be2ca312b24cfe7d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 5,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 1,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 3.7349272,\n \"hits\" : [\n {\n \"_index\" : \"drivers\",\n \"_id\" : \"1\",\n \"_score\" : 3.7349272,\n \"_source\" : {\n \"driver\" : {\n \"last_name\" : \"McQueen\",\n \"vehicle\" : [\n {\n \"make\" : \"Powell Motors\",\n \"model\" : \"Canyonero\"\n },\n {\n \"make\" : \"Miller-Meteor\",\n \"model\" : \"Ecto-1\"\n }\n ]\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/has-child-query.asciidoc",
- "line": 31
- },
- "digest": "10239a59784c3069e0d9399d3f9a7008",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\" : {\n \"my-join-field\" : {\n \"type\" : \"join\",\n \"relations\": {\n \"parent\": \"child\"\n }\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my-join-field": {
- "type": "join",
- "relations": {
- "parent": "child"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-child-query.asciidoc",
- "line": 53
- },
- "digest": "a204ff3396082b32175371c7ed8b9394",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"has_child\" : {\n \"type\" : \"child\",\n \"query\" : {\n \"match_all\" : {}\n },\n \"max_children\": 10,\n \"min_children\": 2,\n \"score_mode\" : \"min\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "has_child": {
- "type": "child",
- "query": {
- "match_all": {}
- },
- "max_children": 10,
- "min_children": 2,
- "score_mode": "min"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-child-query.asciidoc",
- "line": 141
- },
- "digest": "d7b459941dc32d790ade80a0f5712560",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"has_child\" : {\n \"type\" : \"child\",\n \"query\" : {\n \"function_score\" : {\n \"script_score\": {\n \"script\": \"_score * doc['click_count'].value\"\n }\n }\n },\n \"score_mode\" : \"max\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "has_child": {
- "type": "child",
- "query": {
- "function_score": {
- "script_score": {
- "script": "_score * doc['click_count'].value"
- }
- }
- },
- "score_mode": "max"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-parent-query.asciidoc",
- "line": 27
- },
- "digest": "6515e74b150bbdae570e0fd3ef5ac2e5",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index\n{\n \"mappings\": {\n \"properties\" : {\n \"my-join-field\" : {\n \"type\" : \"join\",\n \"relations\": {\n \"parent\": \"child\"\n }\n },\n \"tag\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my-join-field": {
- "type": "join",
- "relations": {
- "parent": "child"
- }
- },
- "tag": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-parent-query.asciidoc",
- "line": 52
- },
- "digest": "e539bfb5c73771c73acdf22fe77dde04",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\": {\n \"has_parent\" : {\n \"parent_type\" : \"parent\",\n \"query\" : {\n \"term\" : {\n \"tag\" : {\n \"value\" : \"Elasticsearch\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "has_parent": {
- "parent_type": "parent",
- "query": {
- "term": {
- "tag": {
- "value": "Elasticsearch"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-parent-query.asciidoc",
- "line": 122
- },
- "digest": "85d88b08243afbef45d4dcea72c9a41c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"has_parent\" : {\n \"parent_type\" : \"parent\",\n \"score\" : true,\n \"query\" : {\n \"function_score\" : {\n \"script_score\": {\n \"script\": \"_score * doc['view_count'].value\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "has_parent": {
- "parent_type": "parent",
- "score": true,
- "query": {
- "function_score": {
- "script_score": {
- "script": "_score * doc['view_count'].value"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/parent-id-query.asciidoc",
- "line": 24
- },
- "digest": "0377c031f840e23dcf607a08e5549bac",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index\n{\n \"mappings\": {\n \"properties\" : {\n \"my-join-field\" : {\n \"type\" : \"join\",\n \"relations\": {\n \"my-parent\": \"my-child\"\n }\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my-join-field": {
- "type": "join",
- "relations": {
- "my-parent": "my-child"
- }
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/parent-id-query.asciidoc",
- "line": 47
- },
- "digest": "6528a67cc20e5a422f11cbc0ffb6f673",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/1?refresh\n{\n \"text\": \"This is a parent document.\",\n \"my-join-field\": \"my-parent\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "This is a parent document.",
- "my-join-field": "my-parent"
- },
- "params": {
- "index": "my-index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/parent-id-query.asciidoc",
- "line": 60
- },
- "digest": "a4d0e6ff5bb904cbd686aecafa917aa2",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/2?routing=1&refresh\n{\n \"text\": \"This is a child document.\",\n \"my_join_field\": {\n \"name\": \"my-child\",\n \"parent\": \"1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/2",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "text": "This is a child document.",
- "my_join_field": {
- "name": "my-child",
- "parent": "1"
- }
- },
- "params": {
- "index": "my-index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/parent-id-query.asciidoc",
- "line": 79
- },
- "digest": "0dd8ee4a383f84f8454c262262630f41",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\": {\n \"parent_id\": {\n \"type\": \"my-child\",\n \"id\": \"1\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "parent_id": {
- "type": "my-child",
- "id": "1"
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-all-query.asciidoc",
- "line": 11
- },
- "digest": "09d617863a103c82fb4101e6165ea7fe",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_all\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-all-query.asciidoc",
- "line": 23
- },
- "digest": "75330ec1305d2beb0e2f34d2195464e2",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_all\": { \"boost\" : 1.2 }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {
- "boost": 1.2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-all-query.asciidoc",
- "line": 39
- },
- "digest": "81c9aa2678d6166a9662ddf2c011a6a5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_none\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_none": {}
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-containing-query.asciidoc",
- "line": 11
- },
- "digest": "73094e82ce3850cbb6f9d071cc8a2d14",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_containing\" : {\n \"little\" : {\n \"span_term\" : { \"field1\" : \"foo\" }\n },\n \"big\" : {\n \"span_near\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field1\" : \"bar\" } },\n { \"span_term\" : { \"field1\" : \"baz\" } }\n ],\n \"slop\" : 5,\n \"in_order\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_containing": {
- "little": {
- "span_term": {
- "field1": "foo"
- }
- },
- "big": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "field1": "bar"
- }
- },
- {
- "span_term": {
- "field1": "baz"
- }
- }
- ],
- "slop": 5,
- "in_order": true
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-field-masking-query.asciidoc",
- "line": 16
- },
- "digest": "b59861ad84352fee3e78bc869ccbe8b0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_near\": {\n \"clauses\": [\n {\n \"span_term\": {\n \"text\": \"quick brown\"\n }\n },\n {\n \"field_masking_span\": {\n \"query\": {\n \"span_term\": {\n \"text.stems\": \"fox\"\n }\n },\n \"field\": \"text\"\n }\n }\n ],\n \"slop\": 5,\n \"in_order\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "text": "quick brown"
- }
- },
- {
- "field_masking_span": {
- "query": {
- "span_term": {
- "text.stems": "fox"
- }
- },
- "field": "text"
- }
- }
- ],
- "slop": 5,
- "in_order": false
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-first-query.asciidoc",
- "line": 11
- },
- "digest": "020655381882d0721472a1581e06384a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_first\" : {\n \"match\" : {\n \"span_term\" : { \"user\" : \"kimchy\" }\n },\n \"end\" : 3\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_first": {
- "match": {
- "span_term": {
- "user": "kimchy"
- }
- },
- "end": 3
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-multi-term-query.asciidoc",
- "line": 12
- },
- "digest": "a22f79d01a4a625840072024feb60b46",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_multi\":{\n \"match\":{\n \"prefix\" : { \"user\" : { \"value\" : \"ki\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_multi": {
- "match": {
- "prefix": {
- "user": {
- "value": "ki"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-multi-term-query.asciidoc",
- "line": 28
- },
- "digest": "87ffa93d8de41fd0c3ea2f52378dab9c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_multi\":{\n \"match\":{\n \"prefix\" : { \"user\" : { \"value\" : \"ki\", \"boost\" : 1.08 } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_multi": {
- "match": {
- "prefix": {
- "user": {
- "value": "ki",
- "boost": 1.08
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-near-query.asciidoc",
- "line": 13
- },
- "digest": "35ee06bbcc1291446187f1eeaf7eed90",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_near\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field\" : \"value1\" } },\n { \"span_term\" : { \"field\" : \"value2\" } },\n { \"span_term\" : { \"field\" : \"value3\" } }\n ],\n \"slop\" : 12,\n \"in_order\" : false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "field": "value1"
- }
- },
- {
- "span_term": {
- "field": "value2"
- }
- },
- {
- "span_term": {
- "field": "value3"
- }
- }
- ],
- "slop": 12,
- "in_order": false
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-not-query.asciidoc",
- "line": 13
- },
- "digest": "4a3b37cdf27279800355ccdef0e13128",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_not\" : {\n \"include\" : {\n \"span_term\" : { \"field1\" : \"hoya\" }\n },\n \"exclude\" : {\n \"span_near\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field1\" : \"la\" } },\n { \"span_term\" : { \"field1\" : \"hoya\" } }\n ],\n \"slop\" : 0,\n \"in_order\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_not": {
- "include": {
- "span_term": {
- "field1": "hoya"
- }
- },
- "exclude": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "field1": "la"
- }
- },
- {
- "span_term": {
- "field1": "hoya"
- }
- }
- ],
- "slop": 0,
- "in_order": true
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-or-query.asciidoc",
- "line": 11
- },
- "digest": "b8b1c96897001708b2cfad92ac36a21f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_or\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field\" : \"value1\" } },\n { \"span_term\" : { \"field\" : \"value2\" } },\n { \"span_term\" : { \"field\" : \"value3\" } }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_or": {
- "clauses": [
- {
- "span_term": {
- "field": "value1"
- }
- },
- {
- "span_term": {
- "field": "value2"
- }
- },
- {
- "span_term": {
- "field": "value3"
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-term-query.asciidoc",
- "line": 11
- },
- "digest": "086b2bbc4c3bfc2310c22d10db42cb82",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-term-query.asciidoc",
- "line": 23
- },
- "digest": "5add42087c83b7e498f8f43e91f343d4",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_term\" : { \"user\" : { \"value\" : \"kimchy\", \"boost\" : 2.0 } }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_term": {
- "user": {
- "value": "kimchy",
- "boost": 2
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-term-query.asciidoc",
- "line": 35
- },
- "digest": "2a07d189553602066fefdb6b7cbdf542",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_term\" : { \"user\" : { \"term\" : \"kimchy\", \"boost\" : 2.0 } }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_term": {
- "user": {
- "term": "kimchy",
- "boost": 2
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-within-query.asciidoc",
- "line": 11
- },
- "digest": "9429e565d0b56289a10b81220660163c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_within\" : {\n \"little\" : {\n \"span_term\" : { \"field1\" : \"foo\" }\n },\n \"big\" : {\n \"span_near\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field1\" : \"bar\" } },\n { \"span_term\" : { \"field1\" : \"baz\" } }\n ],\n \"slop\" : 5,\n \"in_order\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_within": {
- "little": {
- "span_term": {
- "field1": "foo"
- }
- },
- "big": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "field1": "bar"
- }
- },
- {
- "span_term": {
- "field1": "baz"
- }
- }
- ],
- "slop": 5,
- "in_order": true
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/distance-feature-query.asciidoc",
- "line": 37
- },
- "digest": "b81a7b5f5ef19553f9cd49196f31018c",
- "lang": "console",
- "found": [],
- "source": "PUT /items\n{\n \"mappings\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n },\n \"production_date\": {\n \"type\": \"date\"\n },\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/items",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "type": "keyword"
- },
- "production_date": {
- "type": "date"
- },
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "items"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/distance-feature-query.asciidoc",
- "line": 62
- },
- "digest": "b0d3f839237fabf8cdc2221734c668ad",
- "lang": "console",
- "found": [],
- "source": "PUT /items/_doc/1?refresh\n{\n \"name\" : \"chocolate\",\n \"production_date\": \"2018-02-01\",\n \"location\": [-71.34, 41.12]\n}\n\nPUT /items/_doc/2?refresh\n{\n \"name\" : \"chocolate\",\n \"production_date\": \"2018-01-01\",\n \"location\": [-71.3, 41.15]\n}\n\n\nPUT /items/_doc/3?refresh\n{\n \"name\" : \"chocolate\",\n \"production_date\": \"2017-12-01\",\n \"location\": [-71.3, 41.12]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/items/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "chocolate",
- "production_date": "2018-02-01",
- "location": [
- -71.34,
- 41.12
- ]
- },
- "params": {
- "index": "items",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/items/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "chocolate",
- "production_date": "2018-01-01",
- "location": [
- -71.3,
- 41.15
- ]
- },
- "params": {
- "index": "items",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/items/_doc/3",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "chocolate",
- "production_date": "2017-12-01",
- "location": [
- -71.3,
- 41.12
- ]
- },
- "params": {
- "index": "items",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/distance-feature-query.asciidoc",
- "line": 98
- },
- "digest": "1e2c5cef7a3f254c71a33865eb4d7569",
- "lang": "console",
- "found": [],
- "source": "GET /items/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"name\": \"chocolate\"\n }\n },\n \"should\": {\n \"distance_feature\": {\n \"field\": \"production_date\",\n \"pivot\": \"7d\",\n \"origin\": \"now\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/items/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "name": "chocolate"
- }
- },
- "should": {
- "distance_feature": {
- "field": "production_date",
- "pivot": "7d",
- "origin": "now"
- }
- }
- }
- }
- },
- "params": {
- "index": "items"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/distance-feature-query.asciidoc",
- "line": 127
- },
- "digest": "57a3e8d2ca64e37e90d658c4cd935399",
- "lang": "console",
- "found": [],
- "source": "GET /items/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"name\": \"chocolate\"\n }\n },\n \"should\": {\n \"distance_feature\": {\n \"field\": \"location\",\n \"pivot\": \"1000m\",\n \"origin\": [-71.3, 41.15]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/items/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "name": "chocolate"
- }
- },
- "should": {
- "distance_feature": {
- "field": "location",
- "pivot": "1000m",
- "origin": [
- -71.3,
- 41.15
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "items"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/mlt-query.asciidoc",
- "line": 19
- },
- "digest": "32db70e5e08349aa254788ab4a2c4a51",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"more_like_this\" : {\n \"fields\" : [\"title\", \"description\"],\n \"like\" : \"Once upon a time\",\n \"min_term_freq\" : 1,\n \"max_query_terms\" : 12\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "more_like_this": {
- "fields": [
- "title",
- "description"
- ],
- "like": "Once upon a time",
- "min_term_freq": 1,
- "max_query_terms": 12
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/mlt-query.asciidoc",
- "line": 38
- },
- "digest": "cba099b82792fa5ba7741d00483c2b47",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"more_like_this\" : {\n \"fields\" : [\"title\", \"description\"],\n \"like\" : [\n {\n \"_index\" : \"imdb\",\n \"_id\" : \"1\"\n },\n {\n \"_index\" : \"imdb\",\n \"_id\" : \"2\"\n },\n \"and potentially some more text here as well\"\n ],\n \"min_term_freq\" : 1,\n \"max_query_terms\" : 12\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "more_like_this": {
- "fields": [
- "title",
- "description"
- ],
- "like": [
- {
- "_index": "imdb",
- "_id": "1"
- },
- {
- "_index": "imdb",
- "_id": "2"
- },
- "and potentially some more text here as well"
- ],
- "min_term_freq": 1,
- "max_query_terms": 12
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/mlt-query.asciidoc",
- "line": 67
- },
- "digest": "33f77a3b80f33323faa091538220de2a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"more_like_this\" : {\n \"fields\" : [\"name.first\", \"name.last\"],\n \"like\" : [\n {\n \"_index\" : \"marvel\",\n \"doc\" : {\n \"name\": {\n \"first\": \"Ben\",\n \"last\": \"Grimm\"\n },\n \"_doc\": \"You got no idea what I'd... what I'd give to be invisible.\"\n }\n },\n {\n \"_index\" : \"marvel\",\n \"_id\" : \"2\"\n }\n ],\n \"min_term_freq\" : 1,\n \"max_query_terms\" : 12\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "more_like_this": {
- "fields": [
- "name.first",
- "name.last"
- ],
- "like": [
- {
- "_index": "marvel",
- "doc": {
- "name": {
- "first": "Ben",
- "last": "Grimm"
- },
- "_doc": "You got no idea what I'd... what I'd give to be invisible."
- }
- },
- {
- "_index": "marvel",
- "_id": "2"
- }
- ],
- "min_term_freq": 1,
- "max_query_terms": 12
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/mlt-query.asciidoc",
- "line": 121
- },
- "digest": "084b3e3ff6f22c1c9a56b79760f50b36",
- "lang": "console",
- "found": [],
- "source": "PUT /imdb\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"term_vector\": \"yes\"\n },\n \"description\": {\n \"type\": \"text\"\n },\n \"tags\": {\n \"type\": \"text\",\n \"fields\" : {\n \"raw\": {\n \"type\" : \"text\",\n \"analyzer\": \"keyword\",\n \"term_vector\" : \"yes\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/imdb",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "term_vector": "yes"
- },
- "description": {
- "type": "text"
- },
- "tags": {
- "type": "text",
- "fields": {
- "raw": {
- "type": "text",
- "analyzer": "keyword",
- "term_vector": "yes"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "imdb"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 18
- },
- "digest": "e79bff3fe9fe9d8732e0b034f17a03c5",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index\n{\n \"mappings\": {\n \"properties\": {\n \"message\": {\n \"type\": \"text\"\n },\n \"query\": {\n \"type\": \"percolator\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "message": {
- "type": "text"
- },
- "query": {
- "type": "percolator"
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 46
- },
- "digest": "25843127c07257bf09154920779d3055",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/1?refresh\n{\n \"query\" : {\n \"match\" : {\n \"message\" : \"bonsai tree\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "message": "bonsai tree"
- }
- }
- },
- "params": {
- "index": "my-index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 61
- },
- "digest": "4ef2837148b6b23e2eb0a11d14ccae80",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"message\" : \"A new bonsai tree in the office\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "message": "A new bonsai tree in the office"
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 79
- },
- "digest": "ac96110be37dee22d5da427499945bb0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.26152915,\n \"hits\": [\n { <1>\n \"_index\": \"my-index\",\n \"_id\": \"1\",\n \"_score\": 0.26152915,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"bonsai tree\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0] <2>\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 158
- },
- "digest": "4e4e6a2e173cc20c00cca1a06166a687",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"constant_score\": {\n \"filter\": {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"message\" : \"A new bonsai tree in the office\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "percolate": {
- "field": "query",
- "document": {
- "message": "A new bonsai tree in the office"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 198
- },
- "digest": "2d417d4eea299b45f384af7303252611",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\" : \"query\",\n \"documents\" : [ <1>\n {\n \"message\" : \"bonsai tree\"\n },\n {\n \"message\" : \"new tree\"\n },\n {\n \"message\" : \"the office\"\n },\n {\n \"message\" : \"office tree\"\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "documents": [
- {
- "message": "bonsai tree"
- },
- {
- "message": "new tree"
- },
- {
- "message": "the office"
- },
- {
- "message": "office tree"
- }
- ]
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 227
- },
- "digest": "554f99ea4dcd638b7a152796867528be",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.7093853,\n \"hits\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"1\",\n \"_score\": 0.7093853,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"bonsai tree\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0, 1, 3] <1>\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 283
- },
- "digest": "fe0b180951e143d4c624d9fbf677b884",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/2\n{\n \"message\" : \"A new bonsai tree in the office\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/2",
- "query": null,
- "body": {
- "message": "A new bonsai tree in the office"
- },
- "params": {
- "index": "my-index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 293
- },
- "digest": "acbf32c5afd55d370121e03f27083206",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"my-index\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"result\": \"created\",\n \"_seq_no\" : 1,\n \"_primary_term\" : 1\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 312
- },
- "digest": "6736f6e4e04379918a21e7c223c08cf9",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\": \"query\",\n \"index\" : \"my-index\",\n \"id\" : \"2\",\n \"version\" : 1 <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "index": "my-index",
- "id": "2",
- "version": 1
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 348
- },
- "digest": "f33cfd0350f5f474362aa6f2e03f734f",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/3?refresh\n{\n \"query\" : {\n \"match\" : {\n \"message\" : \"brown fox\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/3",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "message": "brown fox"
- }
- }
- },
- "params": {
- "index": "my-index",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 363
- },
- "digest": "1ae1587dfc299b9f3f57d3da0dbc9a3b",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/4?refresh\n{\n \"query\" : {\n \"match\" : {\n \"message\" : \"lazy dog\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/4",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "message": "lazy dog"
- }
- }
- },
- "params": {
- "index": "my-index",
- "id": "4"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 378
- },
- "digest": "a8852f083978b748b93b87ff7fa7b15b",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\": \"query\",\n \"document\" : {\n \"message\" : \"The quick brown fox jumps over the lazy dog\"\n }\n }\n },\n \"highlight\": {\n \"fields\": {\n \"message\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "message": "The quick brown fox jumps over the lazy dog"
- }
- }
- },
- "highlight": {
- "fields": {
- "message": {}
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 401
- },
- "digest": "76d17c166f769246933c1d1e2b235c6f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 7,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 2,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.26152915,\n \"hits\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"3\",\n \"_score\": 0.26152915,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"brown fox\"\n }\n }\n },\n \"highlight\": {\n \"message\": [\n \"The quick brown fox jumps over the lazy dog\" <1>\n ]\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0]\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"4\",\n \"_score\": 0.26152915,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"lazy dog\"\n }\n }\n },\n \"highlight\": {\n \"message\": [\n \"The quick brown fox jumps over the lazy dog\" <1>\n ]\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 472
- },
- "digest": "3bbf150f4ae5c8e53beb6d6ae6f07775",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\": \"query\",\n \"documents\" : [\n {\n \"message\" : \"bonsai tree\"\n },\n {\n \"message\" : \"new tree\"\n },\n {\n \"message\" : \"the office\"\n },\n {\n \"message\" : \"office tree\"\n }\n ]\n }\n },\n \"highlight\": {\n \"fields\": {\n \"message\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "documents": [
- {
- "message": "bonsai tree"
- },
- {
- "message": "new tree"
- },
- {
- "message": "the office"
- },
- {
- "message": "office tree"
- }
- ]
- }
- },
- "highlight": {
- "fields": {
- "message": {}
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 506
- },
- "digest": "c11e614e77e400d9175a62f701e3205e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.7093853,\n \"hits\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"1\",\n \"_score\": 0.7093853,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"bonsai tree\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0, 1, 3]\n },\n \"highlight\" : { <1>\n \"0_message\" : [\n \"bonsai tree\"\n ],\n \"3_message\" : [\n \"office tree\"\n ],\n \"1_message\" : [\n \"new tree\"\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 564
- },
- "digest": "6163e92fa93136a1907f820e8d57db45",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"bool\" : {\n \"should\" : [\n {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"message\" : \"bonsai tree\"\n },\n \"name\": \"query1\" <1>\n }\n },\n {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"message\" : \"tulip flower\"\n },\n \"name\": \"query2\" <1>\n }\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "percolate": {
- "field": "query",
- "document": {
- "message": "bonsai tree"
- },
- "name": "query1"
- }
- },
- {
- "percolate": {
- "field": "query",
- "document": {
- "message": "tulip flower"
- },
- "name": "query2"
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 603
- },
- "digest": "512be7642780d7953f71c95b27894aa1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.26152915,\n \"hits\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"1\",\n \"_score\": 0.26152915,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"bonsai tree\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot_query1\" : [0] <1>\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 668
- },
- "digest": "9501e6c8e95c21838653ea15b9b7ed5f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"term\" : {\n \"query.extraction_result\" : \"failed\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "query.extraction_result": "failed"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 57
- },
- "digest": "e2750d69bcb6d4c7e16e704cd0fb3530",
- "lang": "console",
- "found": [],
- "source": "PUT /test\n{\n \"mappings\": {\n \"properties\": {\n \"pagerank\": {\n \"type\": \"rank_feature\"\n },\n \"url_length\": {\n \"type\": \"rank_feature\",\n \"positive_score_impact\": false\n },\n \"topics\": {\n \"type\": \"rank_features\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "pagerank": {
- "type": "rank_feature"
- },
- "url_length": {
- "type": "rank_feature",
- "positive_score_impact": false
- },
- "topics": {
- "type": "rank_features"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 82
- },
- "digest": "c786505cf972dd41bd0cbb6ebcf939e9",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/1?refresh\n{\n \"url\": \"http://en.wikipedia.org/wiki/2016_Summer_Olympics\",\n \"content\": \"Rio 2016\",\n \"pagerank\": 50.3,\n \"url_length\": 42,\n \"topics\": {\n \"sports\": 50,\n \"brazil\": 30\n }\n}\n\nPUT /test/_doc/2?refresh\n{\n \"url\": \"http://en.wikipedia.org/wiki/2016_Brazilian_Grand_Prix\",\n \"content\": \"Formula One motor race held on 13 November 2016\",\n \"pagerank\": 50.3,\n \"url_length\": 47,\n \"topics\": {\n \"sports\": 35,\n \"formula one\": 65,\n \"brazil\": 20\n }\n}\n\nPUT /test/_doc/3?refresh\n{\n \"url\": \"http://en.wikipedia.org/wiki/Deadpool_(film)\",\n \"content\": \"Deadpool is a 2016 American superhero film\",\n \"pagerank\": 50.3,\n \"url_length\": 37,\n \"topics\": {\n \"movies\": 60,\n \"super hero\": 65\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "url": "http://en.wikipedia.org/wiki/2016_Summer_Olympics",
- "content": "Rio 2016",
- "pagerank": 50.3,
- "url_length": 42,
- "topics": {
- "sports": 50,
- "brazil": 30
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "url": "http://en.wikipedia.org/wiki/2016_Brazilian_Grand_Prix",
- "content": "Formula One motor race held on 13 November 2016",
- "pagerank": 50.3,
- "url_length": 47,
- "topics": {
- "sports": 35,
- "formula one": 65,
- "brazil": 20
- }
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/3",
- "query": {
- "refresh": true
- },
- "body": {
- "url": "http://en.wikipedia.org/wiki/Deadpool_(film)",
- "content": "Deadpool is a 2016 American superhero film",
- "pagerank": 50.3,
- "url_length": 37,
- "topics": {
- "movies": 60,
- "super hero": 65
- }
- },
- "params": {
- "index": "test",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 128
- },
- "digest": "fd0cd8ecd03468726b59a605eea06d75",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match\": {\n \"content\": \"2016\"\n }\n }\n ],\n \"should\": [\n {\n \"rank_feature\": {\n \"field\": \"pagerank\"\n }\n },\n {\n \"rank_feature\": {\n \"field\": \"url_length\",\n \"boost\": 0.1\n }\n },\n {\n \"rank_feature\": {\n \"field\": \"topics.sports\",\n \"boost\": 0.4\n }\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "content": "2016"
- }
- }
- ],
- "should": [
- {
- "rank_feature": {
- "field": "pagerank"
- }
- },
- {
- "rank_feature": {
- "field": "url_length",
- "boost": 0.1
- }
- },
- {
- "rank_feature": {
- "field": "topics.sports",
- "boost": 0.4
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 233
- },
- "digest": "309f0721145b5c656338a02459c3ff1e",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\",\n \"saturation\": {\n \"pivot\": 8\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank",
- "saturation": {
- "pivot": 8
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 253
- },
- "digest": "0c05c66cfe3a2169b1ec1aba77e26db2",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\",\n \"saturation\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank",
- "saturation": {}
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 274
- },
- "digest": "e89bf0d893b7bf43c2d9b44db6cfe21b",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\",\n \"log\": {\n \"scaling_factor\": 4\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank",
- "log": {
- "scaling_factor": 4
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 300
- },
- "digest": "9e3c28d5820c38ea117eb2e9a5061089",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\",\n \"sigmoid\": {\n \"pivot\": 7,\n \"exponent\": 0.6\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank",
- "sigmoid": {
- "pivot": 7,
- "exponent": 0.6
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/script-query.asciidoc",
- "line": 15
- },
- "digest": "b3aa46565d98f8a6750c571bb1c1bb8c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"filter\" : {\n \"script\" : {\n \"script\" : {\n \"source\": \"doc['num1'].value > 1\",\n \"lang\": \"painless\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "script": {
- "script": {
- "source": "doc['num1'].value > 1",
- "lang": "painless"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/script-query.asciidoc",
- "line": 52
- },
- "digest": "c4459f98de5decb37b8c403885f4b226",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"filter\" : {\n \"script\" : {\n \"script\" : {\n \"source\" : \"doc['num1'].value > params.param1\",\n \"lang\" : \"painless\",\n \"params\" : {\n \"param1\" : 5\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "script": {
- "script": {
- "source": "doc['num1'].value > params.param1",
- "lang": "painless",
- "params": {
- "param1": 5
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/script-score-query.asciidoc",
- "line": 18
- },
- "digest": "eb35bef392e0957d609f1a26481e048d",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"script_score\" : {\n \"query\" : {\n \"match\": { \"message\": \"elasticsearch\" }\n },\n \"script\" : {\n \"source\" : \"doc['likes'].value / 10 \"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "script": {
- "source": "doc['likes'].value / 10 "
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 15
- },
- "digest": "f4bdad6ecd4a53cabee95883731e1bc7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_dense_vector\": {\n \"type\": \"dense_vector\",\n \"dims\": 3\n },\n \"status\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"my_dense_vector\": [0.5, 10, 6],\n \"status\" : \"published\"\n}\n\nPUT my_index/_doc/2\n{\n \"my_dense_vector\": [-0.5, 10, 10],\n \"status\" : \"published\"\n}\n\nPOST my_index/_refresh\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_dense_vector": {
- "type": "dense_vector",
- "dims": 3
- },
- "status": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_dense_vector": [
- 0.5,
- 10,
- 6
- ],
- "status": "published"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "my_dense_vector": [
- -0.5,
- 10,
- 10
- ],
- "status": "published"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/my_index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 52
- },
- "digest": "fb7eaa05e4b418cb3da04e56d3eefa71",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\" : {\n \"bool\" : {\n \"filter\" : {\n \"term\" : {\n \"status\" : \"published\" <1>\n }\n }\n }\n },\n \"script\": {\n \"source\": \"cosineSimilarity(params.query_vector, 'my_dense_vector') + 1.0\", <2>\n \"params\": {\n \"query_vector\": [4, 3.4, -0.2] <3>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "published"
- }
- }
- }
- },
- "script": {
- "source": "cosineSimilarity(params.query_vector, 'my_dense_vector') + 1.0",
- "params": {
- "query_vector": [
- 4,
- 3.4,
- -0.2
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 88
- },
- "digest": "5f3793dbe5223db53fc67861388ecb10",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\" : {\n \"bool\" : {\n \"filter\" : {\n \"term\" : {\n \"status\" : \"published\"\n }\n }\n }\n },\n \"script\": {\n \"source\": \"\"\"\n double value = dotProduct(params.query_vector, 'my_dense_vector');\n return sigmoid(1, Math.E, -value); <1>\n \"\"\",\n \"params\": {\n \"query_vector\": [4, 3.4, -0.2]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "published"
- }
- }
- }
- },
- "script": {
- "source": "\n double value = dotProduct(params.query_vector, 'my_dense_vector');\n return sigmoid(1, Math.E, -value); \n ",
- "params": {
- "query_vector": [
- 4,
- 3.4,
- -0.2
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 123
- },
- "digest": "7453c76da9d525b8c5fb5b86f1207667",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\" : {\n \"bool\" : {\n \"filter\" : {\n \"term\" : {\n \"status\" : \"published\"\n }\n }\n }\n },\n \"script\": {\n \"source\": \"1 / (1 + l1norm(params.queryVector, 'my_dense_vector'))\", <1>\n \"params\": {\n \"queryVector\": [4, 3.4, -0.2]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "published"
- }
- }
- }
- },
- "script": {
- "source": "1 / (1 + l1norm(params.queryVector, 'my_dense_vector'))",
- "params": {
- "queryVector": [
- 4,
- 3.4,
- -0.2
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 162
- },
- "digest": "98e4bd19706e57405b6e810de72ea4df",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\" : {\n \"bool\" : {\n \"filter\" : {\n \"term\" : {\n \"status\" : \"published\"\n }\n }\n }\n },\n \"script\": {\n \"source\": \"1 / (1 + l2norm(params.queryVector, 'my_dense_vector'))\",\n \"params\": {\n \"queryVector\": [4, 3.4, -0.2]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "published"
- }
- }
- }
- },
- "script": {
- "source": "1 / (1 + l2norm(params.queryVector, 'my_dense_vector'))",
- "params": {
- "queryVector": [
- 4,
- 3.4,
- -0.2
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/script-score-query.asciidoc",
- "line": 345
- },
- "digest": "e5240a59149072e8bc7532603fa813bd",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_explain/0\n{\n \"query\" : {\n \"script_score\" : {\n \"query\" : {\n \"match\": { \"message\": \"elasticsearch\" }\n },\n \"script\" : {\n \"source\" : \"\"\"\n long likes = doc['likes'].value;\n double normalizedLikes = likes / 10;\n if (explanation != null) {\n explanation.set('normalized likes = likes / 10 = ' + likes + ' / 10 = ' + normalizedLikes);\n }\n return normalizedLikes;\n \"\"\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_explain/0",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "script": {
- "source": "\n long likes = doc['likes'].value;\n double normalizedLikes = likes / 10;\n if (explanation != null) {\n explanation.set('normalized likes = likes / 10 = ' + likes + ' / 10 = ' + normalizedLikes);\n }\n return normalizedLikes;\n "
- }
- }
- }
- },
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/wrapper-query.asciidoc",
- "line": 10
- },
- "digest": "6159a7d56e93e14a31fc06644c803a38",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"wrapper\": {\n \"query\" : \"eyJ0ZXJtIiA6IHsgInVzZXIiIDogIktpbWNoeSIgfX0=\" <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "wrapper": {
- "query": "eyJ0ZXJtIiA6IHsgInVzZXIiIDogIktpbWNoeSIgfX0="
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/pinned-query.asciidoc",
- "line": 14
- },
- "digest": "f36a6f32ef72b326f13317bd34c6353f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"pinned\" : {\n \"ids\" : [\"1\", \"4\", \"100\"],\n \"organic\" : {\n \t\"match\":{\n \t\t\"description\": \"iphone\"\n \t}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "pinned": {
- "ids": [
- "1",
- "4",
- "100"
- ],
- "organic": {
- "match": {
- "description": "iphone"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/exists-query.asciidoc",
- "line": 20
- },
- "digest": "3342c69b2c2303247217532956fcce85",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"exists\": {\n \"field\": \"user\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "exists": {
- "field": "user"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/exists-query.asciidoc",
- "line": 56
- },
- "digest": "43af86de5e49aa06070092fffc138208",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\": {\n \"must_not\": {\n \"exists\": {\n \"field\": \"user\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must_not": {
- "exists": {
- "field": "user"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/fuzzy-query.asciidoc",
- "line": 29
- },
- "digest": "10dd8b5da64f1f6af031706dd50bc9b5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"fuzzy\": {\n \"user\": {\n \"value\": \"ki\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "fuzzy": {
- "user": {
- "value": "ki"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/fuzzy-query.asciidoc",
- "line": 46
- },
- "digest": "8baebb670ca5624d7920ccac4afdff06",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"fuzzy\": {\n \"user\": {\n \"value\": \"ki\",\n \"fuzziness\": \"AUTO\",\n \"max_expansions\": 50,\n \"prefix_length\": 0,\n \"transpositions\": true,\n \"rewrite\": \"constant_score\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "fuzzy": {
- "user": {
- "value": "ki",
- "fuzziness": "AUTO",
- "max_expansions": 50,
- "prefix_length": 0,
- "transpositions": true,
- "rewrite": "constant_score"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/ids-query.asciidoc",
- "line": 13
- },
- "digest": "84cdb6a7a5464af7ef95b3d546883870",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"ids\" : {\n \"values\" : [\"1\", \"4\", \"100\"]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "ids": {
- "values": [
- "1",
- "4",
- "100"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/prefix-query.asciidoc",
- "line": 16
- },
- "digest": "81514791349e0e79ac565160e42889c0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"prefix\": {\n \"user\": {\n \"value\": \"ki\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "prefix": {
- "user": {
- "value": "ki"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/prefix-query.asciidoc",
- "line": 53
- },
- "digest": "32ea547cefa2976c8c3c2eb45a2a4ff4",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"prefix\" : { \"user\" : \"ki\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "prefix": {
- "user": "ki"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/range-query.asciidoc",
- "line": 16
- },
- "digest": "a116949e446f34dc25ae57d4b703d0c1",
- "lang": "console",
- "found": [
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"range\" : {\n \"age\" : {\n \"gte\" : 10,\n \"lte\" : 20,\n \"boost\" : 2.0\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "age": {
- "gte": 10,
- "lte": 20,
- "boost": 2
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/range-query.asciidoc",
- "line": 157
- },
- "digest": "67ceac4bf2d9ac7cc500390544cdcb41",
- "lang": "console",
- "found": [
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"range\" : {\n \"timestamp\" : {\n \"gte\" : \"now-1d/d\",\n \"lt\" : \"now/d\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "timestamp": {
- "gte": "now-1d/d",
- "lt": "now/d"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/range-query.asciidoc",
- "line": 219
- },
- "digest": "5c2f486c27bd5346e512265f93375d16",
- "lang": "console",
- "found": [
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"range\": {\n \"timestamp\": {\n \"time_zone\": \"+01:00\", <1>\n \"gte\": \"2020-01-01T00:00:00\", <2>\n \"lte\": \"now\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "timestamp": {
- "time_zone": "+01:00",
- "gte": "2020-01-01T00:00:00",
- "lte": "now"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/regexp-query.asciidoc",
- "line": 23
- },
- "digest": "618d5f3d35921d8cb7e9ccfbe9a4c3e3",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"regexp\": {\n \"user\": {\n \"value\": \"k.*y\",\n \"flags\" : \"ALL\",\n \"max_determinized_states\": 10000,\n \"rewrite\": \"constant_score\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "regexp": {
- "user": {
- "value": "k.*y",
- "flags": "ALL",
- "max_determinized_states": 10000,
- "rewrite": "constant_score"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 28
- },
- "digest": "d0a8a938a2fa913b6fdbc871079a59dd",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"term\": {\n \"user\": {\n \"value\": \"Kimchy\",\n \"boost\": 1.0\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": {
- "value": "Kimchy",
- "boost": 1
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 94
- },
- "digest": "2a1de18774f9c68cafa169847832b2bc",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\" : {\n \"properties\" : {\n \"full_text\" : { \"type\" : \"text\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "full_text": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 113
- },
- "digest": "d4b4cefba4318caeba7480187faf2b13",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"full_text\": \"Quick Brown Foxes!\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "full_text": "Quick Brown Foxes!"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 132
- },
- "digest": "cdedd5f33f7e5f7acde561e97bff61de",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search?pretty\n{\n \"query\": {\n \"term\": {\n \"full_text\": \"Quick Brown Foxes!\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "term": {
- "full_text": "Quick Brown Foxes!"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 165
- },
- "digest": "a80f5db4357bb25b8704d374c18318ed",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search?pretty\n{\n \"query\": {\n \"match\": {\n \"full_text\": \"Quick Brown Foxes!\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "match": {
- "full_text": "Quick Brown Foxes!"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 186
- },
- "digest": "79cf697879cf060401557649bef22730",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 1,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 1,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 0.8630463,\n \"hits\" : [\n {\n \"_index\" : \"my_index\",\n \"_id\" : \"1\",\n \"_score\" : 0.8630463,\n \"_source\" : {\n \"full_text\" : \"Quick Brown Foxes!\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 19
- },
- "digest": "0c4ad860a485fe53d8140ad3ccd11dcf",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"terms\" : {\n \"user\" : [\"kimchy\", \"elasticsearch\"],\n \"boost\" : 1.0\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "user": [
- "kimchy",
- "elasticsearch"
- ],
- "boost": 1
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 127
- },
- "digest": "9e56d79ad9a02b642c361f0b85dd95d7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\" : {\n \"properties\" : {\n \"color\" : { \"type\" : \"keyword\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "color": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 145
- },
- "digest": "d3088d5fa59b3ab110f64fb4f9b0065c",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"color\": [\"blue\", \"green\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "color": [
- "blue",
- "green"
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 160
- },
- "digest": "8c5977410335d58217e0626618ce6641",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/2\n{\n \"color\": \"blue\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "color": "blue"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 186
- },
- "digest": "d1bcf2eb63a462bfdcf01a68e68d5b4a",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search?pretty\n{\n \"query\": {\n \"terms\": {\n \"color\" : {\n \"index\" : \"my_index\",\n \"id\" : \"2\",\n \"path\" : \"color\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "terms": {
- "color": {
- "index": "my_index",
- "id": "2",
- "path": "color"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 206
- },
- "digest": "ca09b9f5e1b649ec0b311ac8f4f9db23",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 17,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 2,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 1.0,\n \"hits\" : [\n {\n \"_index\" : \"my_index\",\n \"_id\" : \"1\",\n \"_score\" : 1.0,\n \"_source\" : {\n \"color\" : [\n \"blue\",\n \"green\"\n ]\n }\n },\n {\n \"_index\" : \"my_index\",\n \"_id\" : \"2\",\n \"_score\" : 1.0,\n \"_source\" : {\n \"color\" : \"blue\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 49
- },
- "digest": "f29bc8beaa219c21be3204e010f5a509",
- "lang": "console",
- "found": [],
- "source": "PUT /job-candidates\n{\n \"mappings\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n },\n \"programming_languages\": {\n \"type\": \"keyword\"\n },\n \"required_matches\": {\n \"type\": \"long\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/job-candidates",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "type": "keyword"
- },
- "programming_languages": {
- "type": "keyword"
- },
- "required_matches": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "job-candidates"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 85
- },
- "digest": "6866beb749ef6dee19d2cb56edc0a9ab",
- "lang": "console",
- "found": [],
- "source": "PUT /job-candidates/_doc/1?refresh\n{\n \"name\": \"Jane Smith\",\n \"programming_languages\": [\"c++\", \"java\"],\n \"required_matches\": 2\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/job-candidates/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "Jane Smith",
- "programming_languages": [
- "c++",
- "java"
- ],
- "required_matches": 2
- },
- "params": {
- "index": "job-candidates",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 107
- },
- "digest": "f7bccd5a51a4000215767e9a6454327f",
- "lang": "console",
- "found": [],
- "source": "PUT /job-candidates/_doc/2?refresh\n{\n \"name\": \"Jason Response\",\n \"programming_languages\": [\"java\", \"php\"],\n \"required_matches\": 2\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/job-candidates/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "Jason Response",
- "programming_languages": [
- "java",
- "php"
- ],
- "required_matches": 2
- },
- "params": {
- "index": "job-candidates",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 136
- },
- "digest": "c5040ac6dc2922f191113e7a5fd5a699",
- "lang": "console",
- "found": [],
- "source": "GET /job-candidates/_search\n{\n \"query\": {\n \"terms_set\": {\n \"programming_languages\": {\n \"terms\": [\"c++\", \"java\", \"php\"],\n \"minimum_should_match_field\": \"required_matches\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/job-candidates/_search",
- "query": null,
- "body": {
- "query": {
- "terms_set": {
- "programming_languages": {
- "terms": [
- "c++",
- "java",
- "php"
- ],
- "minimum_should_match_field": "required_matches"
- }
- }
- }
- },
- "params": {
- "index": "job-candidates"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 214
- },
- "digest": "cf2e6e604c67175398f6c217b9e86127",
- "lang": "console",
- "found": [],
- "source": "GET /job-candidates/_search\n{\n \"query\": {\n \"terms_set\": {\n \"programming_languages\": {\n \"terms\": [\"c++\", \"java\", \"php\"],\n \"minimum_should_match_script\": {\n \"source\": \"Math.min(params.num_terms, doc['required_matches'].value)\"\n },\n \"boost\": 1.0\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/job-candidates/_search",
- "query": null,
- "body": {
- "query": {
- "terms_set": {
- "programming_languages": {
- "terms": [
- "c++",
- "java",
- "php"
- ],
- "minimum_should_match_script": {
- "source": "Math.min(params.num_terms, doc['required_matches'].value)"
- },
- "boost": 1
- }
- }
- }
- },
- "params": {
- "index": "job-candidates"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/wildcard-query.asciidoc",
- "line": 21
- },
- "digest": "d31062ff8c015387889fed4ad86fd914",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"wildcard\": {\n \"user\": {\n \"value\": \"ki*y\",\n \"boost\": 1.0,\n \"rewrite\": \"constant_score\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "wildcard": {
- "user": {
- "value": "ki*y",
- "boost": 1,
- "rewrite": "constant_score"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 36
- },
- "digest": "a8d39396d741e768083808bb11443e9b",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"cluster_one\": {\n \"seeds\": [\n \"127.0.0.1:9300\"\n ]\n },\n \"cluster_two\": {\n \"seeds\": [\n \"127.0.0.1:9301\"\n ]\n },\n \"cluster_three\": {\n \"seeds\": [\n \"127.0.0.1:9302\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "cluster_one": {
- "seeds": [
- "127.0.0.1:9300"
- ]
- },
- "cluster_two": {
- "seeds": [
- "127.0.0.1:9301"
- ]
- },
- "cluster_three": {
- "seeds": [
- "127.0.0.1:9302"
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 73
- },
- "digest": "972c0c1b6c0b8327fadd77cc1c71b532",
- "lang": "console",
- "found": [],
- "source": "GET /cluster_one:twitter/_search\n{\n \"query\": {\n \"match\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/cluster_one:twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "cluster_one:twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 89
- },
- "digest": "406b27ffe91927d52e03fd104b58c6d1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 150,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0,\n \"skipped\": 0\n },\n \"_clusters\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1,\n \"hits\": [\n {\n \"_index\": \"cluster_one:twitter\", <1>\n \"_id\": \"0\",\n \"_score\": 1,\n \"_source\": {\n \"user\": \"kimchy\",\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"likes\": 0\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 144
- },
- "digest": "6a570214755e38fd587e406d5b19b371",
- "lang": "console",
- "found": [],
- "source": "GET /twitter,cluster_one:twitter,cluster_two:twitter/_search\n{\n \"query\": {\n \"match\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter,cluster_one:twitter,cluster_two:twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter,cluster_one:twitter,cluster_two:twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 159
- },
- "digest": "995347a8d6d131a9c0a664a357afcf1f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 150,\n \"timed_out\": false,\n \"num_reduce_phases\": 4,\n \"_shards\": {\n \"total\": 3,\n \"successful\": 3,\n \"failed\": 0,\n \"skipped\": 0\n },\n \"_clusters\": {\n \"total\": 3,\n \"successful\": 3,\n \"skipped\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": 1,\n \"hits\": [\n {\n \"_index\": \"twitter\", <1>\n \"_id\": \"0\",\n \"_score\": 2,\n \"_source\": {\n \"user\": \"kimchy\",\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"likes\": 0\n }\n },\n {\n \"_index\": \"cluster_one:twitter\", <2>\n \"_id\": \"0\",\n \"_score\": 1,\n \"_source\": {\n \"user\": \"kimchy\",\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"likes\": 0\n }\n },\n {\n \"_index\": \"cluster_two:twitter\", <3>\n \"_id\": \"0\",\n \"_score\": 1,\n \"_source\": {\n \"user\": \"kimchy\",\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"likes\": 0\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 243
- },
- "digest": "9949bcc64c9cd6f4041819546d7fce78",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.remote.cluster_two.skip_unavailable\": true\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.remote.cluster_two.skip_unavailable": true
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 24
- },
- "digest": "e62cf588bfc891504bbf933af86eed7c",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"my_field\": 5\n}\n\nGET my_index/_search\n{\n \"script_fields\": {\n \"my_doubled_field\": {\n \"script\": {\n \"lang\": \"expression\",\n \"source\": \"doc['my_field'] * multiplier\",\n \"params\": {\n \"multiplier\": 2\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_field": 5
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "script_fields": {
- "my_doubled_field": {
- "script": {
- "lang": "expression",
- "source": "doc['my_field'] * multiplier",
- "params": {
- "multiplier": 2
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 147
- },
- "digest": "40a2bbc35a887d6c7dda3cca1fe7aa58",
- "lang": "console",
- "found": [],
- "source": "POST _scripts/calculate-score\n{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params.my_modifier\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/calculate-score",
- "query": null,
- "body": {
- "script": {
- "lang": "painless",
- "source": "Math.log(_score * 2) + params.my_modifier"
- }
- },
- "params": {
- "id": "calculate-score"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 163
- },
- "digest": "548a09b4630ae38cf8af33581ae614e6",
- "lang": "console",
- "found": [],
- "source": "POST _scripts/calculate-score/score\n{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params.my_modifier\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/calculate-score/score",
- "query": null,
- "body": {
- "script": {
- "lang": "painless",
- "source": "Math.log(_score * 2) + params.my_modifier"
- }
- },
- "params": {
- "id": "calculate-score",
- "context": "score"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 177
- },
- "digest": "08e08feb514b24006e13f258d617d873",
- "lang": "console",
- "found": [],
- "source": "GET _scripts/calculate-score",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_scripts/calculate-score",
- "query": null,
- "body": null,
- "params": {
- "id": "calculate-score"
- },
- "api": "get_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 185
- },
- "digest": "b3423b00c6336ee0a1720b4ed7031cd7",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\": {\n \"match\": {\n \"message\": \"some message\"\n }\n },\n \"script\": {\n \"id\": \"calculate-score\",\n \"params\": {\n \"my_modifier\": 2\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "match": {
- "message": "some message"
- }
- },
- "script": {
- "id": "calculate-score",
- "params": {
- "my_modifier": 2
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 210
- },
- "digest": "4061fd5ba7221ca85805ed14d59a6bc5",
- "lang": "console",
- "found": [],
- "source": "DELETE _scripts/calculate-score",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_scripts/calculate-score",
- "query": null,
- "body": null,
- "params": {
- "id": "calculate-score"
- },
- "api": "delete_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/fields.asciidoc",
- "line": 46
- },
- "digest": "729f4abc0b4edaf6b58bd9e7b3fd5a8b",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"text\": \"quick brown fox\",\n \"popularity\": 1\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"text\": \"quick fox\",\n \"popularity\": 5\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": {\n \"match\": {\n \"text\": \"quick brown fox\"\n }\n },\n \"script_score\": {\n \"script\": {\n \"lang\": \"expression\",\n \"source\": \"_score * doc['popularity']\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "quick brown fox",
- "popularity": 1
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "quick fox",
- "popularity": 5
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match": {
- "text": "quick brown fox"
- }
- },
- "script_score": {
- "script": {
- "lang": "expression",
- "source": "_score * doc['popularity']"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/fields.asciidoc",
- "line": 90
- },
- "digest": "0dfe9d6724c7bd11094bb4a0796e7ac7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"cost_price\": 100\n}\n\nGET my_index/_search\n{\n \"script_fields\": {\n \"sales_price\": {\n \"script\": {\n \"lang\": \"expression\",\n \"source\": \"doc['cost_price'] * markup\",\n \"params\": {\n \"markup\": 0.2\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "cost_price": 100
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "script_fields": {
- "sales_price": {
- "script": {
- "lang": "expression",
- "source": "doc['cost_price'] * markup",
- "params": {
- "markup": 0.2
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/fields.asciidoc",
- "line": 172
- },
- "digest": "2a9c29afe23e30a68dd6e30ea22f5d42",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"title\": { <1>\n \"type\": \"text\"\n },\n \"first_name\": {\n \"type\": \"text\",\n \"store\": true\n },\n \"last_name\": {\n \"type\": \"text\",\n \"store\": true\n }\n }\n }\n}\n\nPUT my_index/_doc/1?refresh\n{\n \"title\": \"Mr\",\n \"first_name\": \"Barry\",\n \"last_name\": \"White\"\n}\n\nGET my_index/_search\n{\n \"script_fields\": {\n \"source\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"params._source.title + ' ' + params._source.first_name + ' ' + params._source.last_name\" <2>\n }\n },\n \"stored_fields\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"params._fields['first_name'].value + ' ' + params._fields['last_name'].value\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text"
- },
- "first_name": {
- "type": "text",
- "store": true
- },
- "last_name": {
- "type": "text",
- "store": true
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Mr",
- "first_name": "Barry",
- "last_name": "White"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "script_fields": {
- "source": {
- "script": {
- "lang": "painless",
- "source": "params._source.title + ' ' + params._source.first_name + ' ' + params._source.last_name"
- }
- },
- "stored_fields": {
- "script": {
- "lang": "painless",
- "source": "params._fields['first_name'].value + ' ' + params._fields['last_name'].value"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/engine.asciidoc",
- "line": 28
- },
- "digest": "d9de409a4a197ce7cbe3714e07155d34",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": {\n \"match\": {\n \"body\": \"foo\"\n }\n },\n \"functions\": [\n {\n \"script_score\": {\n \"script\": {\n \"source\": \"pure_df\",\n \"lang\" : \"expert_scripts\",\n \"params\": {\n \"field\": \"body\",\n \"term\": \"foo\"\n }\n }\n }\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match": {
- "body": "foo"
- }
- },
- "functions": [
- {
- "script_score": {
- "script": {
- "source": "pure_df",
- "lang": "expert_scripts",
- "params": {
- "field": "body",
- "term": "foo"
- }
- }
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 144
- },
- "digest": "d8b2a88b5eca99d3691ad3cd40266736",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my-index\n{\n \"mappings\": {\n \"properties\": {\n \"age\": { \"type\": \"integer\" }, <1>\n \"email\": { \"type\": \"keyword\" }, <2>\n \"name\": { \"type\": \"text\" } <3>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "age": {
- "type": "integer"
- },
- "email": {
- "type": "keyword"
- },
- "name": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 173
- },
- "digest": "71ba9033107882f61cdc3b32fc73568d",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my-index/_mapping\n{\n \"properties\": {\n \"employee-id\": {\n \"type\": \"keyword\",\n \"index\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "employee-id": {
- "type": "keyword",
- "index": false
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 211
- },
- "digest": "609260ad1d5998be2ca09ff1fe237efa",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /my-index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my-index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 219
- },
- "digest": "df61238ba28b6aaf41edf247b01aa893",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my-index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"age\" : {\n \"type\" : \"integer\"\n },\n \"email\" : {\n \"type\" : \"keyword\"\n },\n \"employee-id\" : {\n \"type\" : \"keyword\",\n \"index\" : false\n },\n \"name\" : {\n \"type\" : \"text\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 257
- },
- "digest": "99a52be903945b17e734a1d02a57e958",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /my-index/_mapping/field/employee-id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_mapping/field/employee-id",
- "query": null,
- "body": null,
- "params": {
- "index": "my-index",
- "fields": "employee-id"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 265
- },
- "digest": "47a0f4c64e6debd190796fc38e58c9c0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my-index\" : {\n \"mappings\" : {\n \"employee-id\" : {\n \"full_name\" : \"employee-id\",\n \"mapping\" : {\n \"employee-id\" : {\n \"type\" : \"keyword\",\n \"index\" : false\n }\n }\n }\n }\n }\n}\n"
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 458
- },
- "digest": "cfb7654fa2e29c83807da58f77b27599",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": { <1>\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 474
- },
- "digest": "11c9b5d511fd839f4affeb018d17200d",
- "lang": "console",
- "found": [],
- "source": "PUT index/_mappings\n{\n \"properties\": { <1>\n \"bar\": {\n \"type\": \"text\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index/_mappings",
- "query": null,
- "body": {
- "properties": {
- "bar": {
- "type": "text"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 489
- },
- "digest": "0afeb69cc1474ac6d35223e615dc8c91",
- "lang": "console",
- "found": [],
- "source": "GET index/_mappings",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_mappings",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 497
- },
- "digest": "10f9b58f6865b6449505e650d90b311b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"index\": {\n \"mappings\": {\n \"properties\": { <1>\n \"foo\": {\n \"type\": \"keyword\"\n },\n \"bar\": {\n \"type\": \"text\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 523
- },
- "digest": "ab1b1bdda7528003a08d6d5911081483",
- "lang": "console",
- "found": [],
- "source": "PUT index/_doc/1\n{\n \"foo\": \"baz\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "foo": "baz"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 531
- },
- "digest": "5d34ab14e4e9c9ab2d355ff787e9fdd9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}"
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 550
- },
- "digest": "de8d7db07c3008039c7691955a553e4c",
- "lang": "console",
- "found": [],
- "source": "GET index/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 563
- },
- "digest": "f85d1cf4a5b9145632f585cd8c99e49d",
- "lang": "console",
- "found": [],
- "source": "POST index/_update/1\n{\n \"doc\" : {\n \"foo\" : \"qux\"\n }\n}\n\nGET /index/_source/1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/index/_update/1",
- "query": null,
- "body": {
- "doc": {
- "foo": "qux"
- }
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "update"
- },
- {
- "method": "GET",
- "url": "/index/_source/1",
- "query": null,
- "body": null,
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "get_source"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 580
- },
- "digest": "6dce46ae7f4da2467ea1e68cc9b67b31",
- "lang": "console",
- "found": [],
- "source": "POST _bulk\n{ \"index\" : { \"_index\" : \"index\", \"_id\" : \"3\" } }\n{ \"foo\" : \"baz\" }\n{ \"index\" : { \"_index\" : \"index\", \"_id\" : \"4\" } }\n{ \"foo\" : \"qux\" }",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_bulk",
- "query": null,
- "body": [
- {
- "index": {
- "_index": "index",
- "_id": "3"
- }
- },
- {
- "foo": "baz"
- },
- {
- "index": {
- "_index": "index",
- "_id": "4"
- }
- },
- {
- "foo": "qux"
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/removal_of_types.asciidoc",
- "line": 612
- },
- "digest": "a1114fcb15a01180db9918231e495bbc",
- "lang": "console",
- "found": [],
- "source": "PUT _template/template1\n{\n \"index_patterns\":[ \"index-1-*\" ],\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n}\n\nPUT index-1-01\n{\n \"mappings\": {\n \"properties\": {\n \"bar\": {\n \"type\": \"long\"\n }\n }\n }\n}\n\nPUT index-2-01\n{\n \"mappings\": {\n \"properties\": {\n \"bar\": {\n \"type\": \"long\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/template1",
- "query": null,
- "body": {
- "index_patterns": [
- "index-1-*"
- ],
- "mappings": {
- "properties": {
- "foo": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "name": "template1"
- },
- "api": "indices.put_template"
- },
- {
- "method": "PUT",
- "url": "/index-1-01",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "bar": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "index-1-01"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index-2-01",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "bar": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "index-2-01"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/alias.asciidoc",
- "line": 12
- },
- "digest": "2716453454dbf9c6dde2ea6850a62214",
- "lang": "console",
- "found": [],
- "source": "PUT trips\n{\n \"mappings\": {\n \"properties\": {\n \"distance\": {\n \"type\": \"long\"\n },\n \"route_length_miles\": {\n \"type\": \"alias\",\n \"path\": \"distance\" <1>\n },\n \"transit_mode\": {\n \"type\": \"keyword\"\n }\n }\n }\n}\n\nGET _search\n{\n \"query\": {\n \"range\" : {\n \"route_length_miles\" : {\n \"gte\" : 39\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/trips",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "distance": {
- "type": "long"
- },
- "route_length_miles": {
- "type": "alias",
- "path": "distance"
- },
- "transit_mode": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "trips"
- },
- "api": "indices.create"
- },
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "route_length_miles": {
- "gte": 39
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/alias.asciidoc",
- "line": 55
- },
- "digest": "a2dabdcbb661e7690166ae6d0de27e46",
- "lang": "console",
- "found": [],
- "source": "GET trips/_field_caps?fields=route_*,transit_mode",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/trips/_field_caps",
- "query": {
- "fields": "route_*,transit_mode"
- },
- "body": null,
- "params": {
- "index": "trips"
- },
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/alias.asciidoc",
- "line": 86
- },
- "digest": "f6c9d72fa26cbedd0c3f9fa64a88c38a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match_all\": {}\n },\n \"_source\": \"route_length_miles\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "_source": "route_length_miles"
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/array.asciidoc",
- "line": 42
- },
- "digest": "4d6997c70a1851f9151443c0d38b532e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"message\": \"some arrays in this document...\",\n \"tags\": [ \"elasticsearch\", \"wow\" ], <1>\n \"lists\": [ <2>\n {\n \"name\": \"prog_list\",\n \"description\": \"programming list\"\n },\n {\n \"name\": \"cool_list\",\n \"description\": \"cool stuff list\"\n }\n ]\n}\n\nPUT my_index/_doc/2 <3>\n{\n \"message\": \"no arrays in this document...\",\n \"tags\": \"elasticsearch\",\n \"lists\": {\n \"name\": \"prog_list\",\n \"description\": \"programming list\"\n }\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"tags\": \"elasticsearch\" <4>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "message": "some arrays in this document...",
- "tags": [
- "elasticsearch",
- "wow"
- ],
- "lists": [
- {
- "name": "prog_list",
- "description": "programming list"
- },
- {
- "name": "cool_list",
- "description": "cool stuff list"
- }
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "message": "no arrays in this document...",
- "tags": "elasticsearch",
- "lists": {
- "name": "prog_list",
- "description": "programming list"
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "tags": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/binary.asciidoc",
- "line": 12
- },
- "digest": "9296dd085f411739f5b0ec80eb9b9e27",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"name\": {\n \"type\": \"text\"\n },\n \"blob\": {\n \"type\": \"binary\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"name\": \"Some binary blob\",\n \"blob\": \"U29tZSBiaW5hcnkgYmxvYg==\" <1>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "type": "text"
- },
- "blob": {
- "type": "binary"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "name": "Some binary blob",
- "blob": "U29tZSBiaW5hcnkgYmxvYg=="
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/boolean.asciidoc",
- "line": 22
- },
- "digest": "1c1be1df747c9f8ecc9f82e980387d8f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"is_published\": {\n \"type\": \"boolean\"\n }\n }\n }\n}\n\nPOST my_index/_doc/1\n{\n \"is_published\": \"true\" <1>\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"is_published\": true <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "is_published": {
- "type": "boolean"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "is_published": "true"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "is_published": true
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/boolean.asciidoc",
- "line": 58
- },
- "digest": "636ec3c018ac15ec11caf6f3d835a08c",
- "lang": "console",
- "found": [],
- "source": "POST my_index/_doc/1\n{\n \"is_published\": true\n}\n\nPOST my_index/_doc/2\n{\n \"is_published\": false\n}\n\nGET my_index/_search\n{\n \"aggs\": {\n \"publish_state\": {\n \"terms\": {\n \"field\": \"is_published\"\n }\n }\n },\n \"script_fields\": {\n \"is_published\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['is_published'].value\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "is_published": true
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "is_published": false
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "aggs": {
- "publish_state": {
- "terms": {
- "field": "is_published"
- }
- }
- },
- "script_fields": {
- "is_published": {
- "script": {
- "lang": "painless",
- "source": "doc['is_published'].value"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/date.asciidoc",
- "line": 35
- },
- "digest": "645136747d37368a14ab34de8bd046c6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"date\": \"2015-01-01\" } <2>\n\nPUT my_index/_doc/2\n{ \"date\": \"2015-01-01T12:10:30Z\" } <3>\n\nPUT my_index/_doc/3\n{ \"date\": 1420070400001 } <4>\n\nGET my_index/_search\n{\n \"sort\": { \"date\": \"asc\"} <5>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "date": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "date": "2015-01-01"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "date": "2015-01-01T12:10:30Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": null,
- "body": {
- "date": 1420070400001
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "sort": {
- "date": "asc"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/date.asciidoc",
- "line": 77
- },
- "digest": "e2a042c629429855c3bcaefffb26b7fa",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date\",\n \"format\": \"yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "date": {
- "type": "date",
- "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/date_nanos.asciidoc",
- "line": 32
- },
- "digest": "46dd5948cfc34adf1dfe024fc960bb01",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date_nanos\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"date\": \"2015-01-01\" } <2>\n\nPUT my_index/_doc/2\n{ \"date\": \"2015-01-01T12:10:30.123456789Z\" } <3>\n\nPUT my_index/_doc/3\n{ \"date\": 1420070400 } <4>\n\nGET my_index/_search\n{\n \"sort\": { \"date\": \"asc\"} <5>\n}\n\nGET my_index/_search\n{\n \"script_fields\" : {\n \"my_field\" : {\n \"script\" : {\n \"lang\" : \"painless\",\n \"source\" : \"doc['date'].value.nano\" <6>\n }\n }\n }\n}\n\nGET my_index/_search\n{\n \"docvalue_fields\" : [\n {\n \"field\" : \"my_ip_field\",\n \"format\": \"strict_date_time\" <7>\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "date": {
- "type": "date_nanos"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "date": "2015-01-01"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "date": "2015-01-01T12:10:30.123456789Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": null,
- "body": {
- "date": 1420070400
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "sort": {
- "date": "asc"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "script_fields": {
- "my_field": {
- "script": {
- "lang": "painless",
- "source": "doc['date'].value.nano"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "docvalue_fields": [
- {
- "field": "my_ip_field",
- "format": "strict_date_time"
- }
- ]
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/dense-vector.asciidoc",
- "line": 20
- },
- "digest": "7c7b74084cc9f18b085c25a208bd1306",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_vector\": {\n \"type\": \"dense_vector\",\n \"dims\": 3 <1>\n },\n \"my_text\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"my_text\" : \"text1\",\n \"my_vector\" : [0.5, 10, 6]\n}\n\nPUT my_index/_doc/2\n{\n \"my_text\" : \"text2\",\n \"my_vector\" : [-0.5, 10, 10]\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_vector": {
- "type": "dense_vector",
- "dims": 3
- },
- "my_text": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_text": "text1",
- "my_vector": [
- 0.5,
- 10,
- 6
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "my_text": "text2",
- "my_vector": [
- -0.5,
- 10,
- 10
- ]
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/histogram.asciidoc",
- "line": 74
- },
- "digest": "7d6b1797b1178e96d287831a94bb9658",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_histogram\": {\n \"type\" : \"histogram\"\n },\n \"my_text\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_histogram": {
- "type": "histogram"
- },
- "my_text": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/histogram.asciidoc",
- "line": 94
- },
- "digest": "09774dd1a8613672844caadb2bc8dc1e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"my_text\" : \"histogram_1\",\n \"my_histogram\" : {\n \"values\" : [0.1, 0.2, 0.3, 0.4, 0.5], <1>\n \"counts\" : [3, 7, 23, 12, 6] <2>\n }\n}\n\nPUT my_index/_doc/2\n{\n \"my_text\" : \"histogram_2\",\n \"my_histogram\" : {\n \"values\" : [0.1, 0.25, 0.35, 0.4, 0.45, 0.5], <1>\n \"counts\" : [8, 17, 8, 7, 6, 2] <2>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_text": "histogram_1",
- "my_histogram": {
- "values": [
- 0.1,
- 0.2,
- 0.3,
- 0.4,
- 0.5
- ],
- "counts": [
- 3,
- 7,
- 23,
- 12,
- 6
- ]
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "my_text": "histogram_2",
- "my_histogram": {
- "values": [
- 0.1,
- 0.25,
- 0.35,
- 0.4,
- 0.45,
- 0.5
- ],
- "counts": [
- 8,
- 17,
- 8,
- 7,
- 6,
- 2
- ]
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/flattened.asciidoc",
- "line": 38
- },
- "digest": "8aa74aee3dcf4b34028e4c5e1c1ed27b",
- "lang": "console",
- "found": [],
- "source": "PUT bug_reports\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\"\n },\n \"labels\": {\n \"type\": \"flattened\"\n }\n }\n }\n}\n\nPOST bug_reports/_doc/1\n{\n \"title\": \"Results are not sorted correctly.\",\n \"labels\": {\n \"priority\": \"urgent\",\n \"release\": [\"v1.2.5\", \"v1.3.0\"],\n \"timestamp\": {\n \"created\": 1541458026,\n \"closed\": 1541457010\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/bug_reports",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text"
- },
- "labels": {
- "type": "flattened"
- }
- }
- }
- },
- "params": {
- "index": "bug_reports"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/bug_reports/_doc/1",
- "query": null,
- "body": {
- "title": "Results are not sorted correctly.",
- "labels": {
- "priority": "urgent",
- "release": [
- "v1.2.5",
- "v1.3.0"
- ],
- "timestamp": {
- "created": 1541458026,
- "closed": 1541457010
- }
- }
- },
- "params": {
- "index": "bug_reports",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/flattened.asciidoc",
- "line": 76
- },
- "digest": "169b39bb889ecd47541bed3e48725488",
- "lang": "console",
- "found": [],
- "source": "POST bug_reports/_search\n{\n \"query\": {\n \"term\": {\"labels\": \"urgent\"}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/bug_reports/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "labels": "urgent"
- }
- }
- },
- "params": {
- "index": "bug_reports"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/flattened.asciidoc",
- "line": 88
- },
- "digest": "2f4a55dfeba8851b306ef9c1b216ef54",
- "lang": "console",
- "found": [],
- "source": "POST bug_reports/_search\n{\n \"query\": {\n \"term\": {\"labels.release\": \"v1.3.0\"}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/bug_reports/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "labels.release": "v1.3.0"
- }
- }
- },
- "params": {
- "index": "bug_reports"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-point.asciidoc",
- "line": 20
- },
- "digest": "f1b512400f2f7ca0b0f2e4bb45a8b2fe",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Geo-point as an object\",\n \"location\": { <1>\n \"lat\": 41.12,\n \"lon\": -71.34\n }\n}\n\nPUT my_index/_doc/2\n{\n \"text\": \"Geo-point as a string\",\n \"location\": \"41.12,-71.34\" <2>\n}\n\nPUT my_index/_doc/3\n{\n \"text\": \"Geo-point as a geohash\",\n \"location\": \"drm3btev3e86\" <3>\n}\n\nPUT my_index/_doc/4\n{\n \"text\": \"Geo-point as an array\",\n \"location\": [ -71.34, 41.12 ] <4>\n}\n\nPUT my_index/_doc/5\n{\n \"text\": \"Geo-point as a WKT POINT primitive\",\n \"location\" : \"POINT (-71.34 41.12)\" <5>\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"geo_bounding_box\": { <6>\n \"location\": {\n \"top_left\": {\n \"lat\": 42,\n \"lon\": -72\n },\n \"bottom_right\": {\n \"lat\": 40,\n \"lon\": -74\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Geo-point as an object",
- "location": {
- "lat": 41.12,
- "lon": -71.34
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "text": "Geo-point as a string",
- "location": "41.12,-71.34"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": null,
- "body": {
- "text": "Geo-point as a geohash",
- "location": "drm3btev3e86"
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/4",
- "query": null,
- "body": {
- "text": "Geo-point as an array",
- "location": [
- -71.34,
- 41.12
- ]
- },
- "params": {
- "index": "my_index",
- "id": "4"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/5",
- "query": null,
- "body": {
- "text": "Geo-point as a WKT POINT primitive",
- "location": "POINT (-71.34 41.12)"
- },
- "params": {
- "index": "my_index",
- "id": "5"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "geo_bounding_box": {
- "location": {
- "top_left": {
- "lat": 42,
- "lon": -72
- },
- "bottom_right": {
- "lat": 40,
- "lon": -74
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 212
- },
- "digest": "3fef996cf6795e881918ffedc273c642",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 304
- },
- "digest": "f851d1be5d5e5fe5455ba81344d01133",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"point\",\n \"coordinates\" : [-77.03653, 38.897676]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "point",
- "coordinates": [
- -77.03653,
- 38.897676
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 317
- },
- "digest": "d673a2c008015ac6f754661ae336131c",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POINT (-77.03653 38.897676)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POINT (-77.03653 38.897676)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 334
- },
- "digest": "21a9348800406e09b8bdaab192245096",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"linestring\",\n \"coordinates\" : [[-77.03653, 38.897676], [-77.009051, 38.889939]]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "linestring",
- "coordinates": [
- [
- -77.03653,
- 38.897676
- ],
- [
- -77.009051,
- 38.889939
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 347
- },
- "digest": "48625e23b05d33977451cde7b98b634a",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"LINESTRING (-77.03653 38.897676, -77.009051 38.889939)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "LINESTRING (-77.03653 38.897676, -77.009051 38.889939)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 366
- },
- "digest": "1d6ee162260a21f6e4597eadbea88650",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- 100,
- 0
- ],
- [
- 101,
- 0
- ],
- [
- 101,
- 1
- ],
- [
- 100,
- 1
- ],
- [
- 100,
- 0
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 381
- },
- "digest": "18c34a2c5820e330a125dfddf2624c69",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 393
- },
- "digest": "f83e3ea198f6e87046aab2c5dea60d61",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],\n [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- 100,
- 0
- ],
- [
- 101,
- 0
- ],
- [
- 101,
- 1
- ],
- [
- 100,
- 1
- ],
- [
- 100,
- 0
- ]
- ],
- [
- [
- 100.2,
- 0.2
- ],
- [
- 100.8,
- 0.2
- ],
- [
- 100.8,
- 0.8
- ],
- [
- 100.2,
- 0.8
- ],
- [
- 100.2,
- 0.2
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 409
- },
- "digest": "00eb71b03b73e605da6368041a64a8ad",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 436
- },
- "digest": "4c42c8835876a2271e7ba63d6bd3149f",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [-177.0, 10.0], [176.0, 15.0], [172.0, 0.0], [176.0, -15.0], [-177.0, -10.0], [-177.0, 10.0] ],\n [ [178.2, 8.2], [-178.8, 8.2], [-180.8, -8.8], [178.2, 8.8] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- -177,
- 10
- ],
- [
- 176,
- 15
- ],
- [
- 172,
- 0
- ],
- [
- 176,
- -15
- ],
- [
- -177,
- -10
- ],
- [
- -177,
- 10
- ]
- ],
- [
- [
- 178.2,
- 8.2
- ],
- [
- -178.8,
- 8.2
- ],
- [
- -180.8,
- -8.8
- ],
- [
- 178.2,
- 8.8
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 455
- },
- "digest": "60294ea29c96c432047d4fffcb3cc8b4",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"orientation\" : \"clockwise\",\n \"coordinates\" : [\n [ [100.0, 0.0], [100.0, 1.0], [101.0, 1.0], [101.0, 0.0], [100.0, 0.0] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "orientation": "clockwise",
- "coordinates": [
- [
- [
- 100,
- 0
- ],
- [
- 100,
- 1
- ],
- [
- 101,
- 1
- ],
- [
- 101,
- 0
- ],
- [
- 100,
- 0
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 475
- },
- "digest": "2eca42af76c6ddc657fca3948f3865bd",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multipoint\",\n \"coordinates\" : [\n [102.0, 2.0], [103.0, 2.0]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multipoint",
- "coordinates": [
- [
- 102,
- 2
- ],
- [
- 103,
- 2
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 490
- },
- "digest": "f1e1f4f37194a899e7056d0782804790",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTIPOINT (102.0 2.0, 103.0 2.0)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTIPOINT (102.0 2.0, 103.0 2.0)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 504
- },
- "digest": "c4ba19b62e87ed837dc6f1f9fe184244",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multilinestring\",\n \"coordinates\" : [\n [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0] ],\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0] ],\n [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multilinestring",
- "coordinates": [
- [
- [
- 102,
- 2
- ],
- [
- 103,
- 2
- ],
- [
- 103,
- 3
- ],
- [
- 102,
- 3
- ]
- ],
- [
- [
- 100,
- 0
- ],
- [
- 101,
- 0
- ],
- [
- 101,
- 1
- ],
- [
- 100,
- 1
- ]
- ],
- [
- [
- 100.2,
- 0.2
- ],
- [
- 100.8,
- 0.2
- ],
- [
- 100.8,
- 0.8
- ],
- [
- 100.2,
- 0.8
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 521
- },
- "digest": "117096e1830e7acedf38bd6a92a9c8b4",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 535
- },
- "digest": "4be91bb5ac3a1b83b767a060c58e0b12",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multipolygon\",\n \"coordinates\" : [\n [ [[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]] ],\n [ [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],\n [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multipolygon",
- "coordinates": [
- [
- [
- [
- 102,
- 2
- ],
- [
- 103,
- 2
- ],
- [
- 103,
- 3
- ],
- [
- 102,
- 3
- ],
- [
- 102,
- 2
- ]
- ]
- ],
- [
- [
- [
- 100,
- 0
- ],
- [
- 101,
- 0
- ],
- [
- 101,
- 1
- ],
- [
- 100,
- 1
- ],
- [
- 100,
- 0
- ]
- ],
- [
- [
- 100.2,
- 0.2
- ],
- [
- 100.8,
- 0.2
- ],
- [
- 100.8,
- 0.8
- ],
- [
- 100.2,
- 0.8
- ],
- [
- 100.2,
- 0.2
- ]
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 552
- },
- "digest": "9290410340f0e66e67fa96aacc83bbdc",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTIPOLYGON (((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTIPOLYGON (((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 566
- },
- "digest": "a99750fb5d296fa8df97ee71a34c698c",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\": \"geometrycollection\",\n \"geometries\": [\n {\n \"type\": \"point\",\n \"coordinates\": [100.0, 0.0]\n },\n {\n \"type\": \"linestring\",\n \"coordinates\": [ [101.0, 0.0], [102.0, 1.0] ]\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "geometrycollection",
- "geometries": [
- {
- "type": "point",
- "coordinates": [
- 100,
- 0
- ]
- },
- {
- "type": "linestring",
- "coordinates": [
- [
- 101,
- 0
- ],
- [
- 102,
- 1
- ]
- ]
- }
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 588
- },
- "digest": "71bb89f56d847b636a050c553c0cd0a7",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"GEOMETRYCOLLECTION (POINT (100.0 0.0), LINESTRING (101.0 0.0, 102.0 1.0))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "GEOMETRYCOLLECTION (POINT (100.0 0.0), LINESTRING (101.0 0.0, 102.0 1.0))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 604
- },
- "digest": "f893fffd649507119d0a9afd98a0cf87",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"envelope\",\n \"coordinates\" : [ [100.0, 1.0], [101.0, 0.0] ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "envelope",
- "coordinates": [
- [
- 100,
- 1
- ],
- [
- 101,
- 0
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 619
- },
- "digest": "65208190e9640cb4ca67271f1694814d",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"BBOX (100.0, 102.0, 2.0, 0.0)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "BBOX (100.0, 102.0, 2.0, 0.0)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 636
- },
- "digest": "76039c2fd422a6bb6340848cc0a78bbd",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"circle\",\n \"coordinates\" : [101.0, 1.0],\n \"radius\" : \"100m\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "circle",
- "coordinates": [
- 101,
- 1
- ],
- "radius": "100m"
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/ip.asciidoc",
- "line": 11
- },
- "digest": "ef38d941f9d914c095e729046a2e2d95",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"ip_addr\": {\n \"type\": \"ip\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"ip_addr\": \"192.168.1.1\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"ip_addr\": \"192.168.0.0/16\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "ip_addr": {
- "type": "ip"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "ip_addr": "192.168.1.1"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "ip_addr": "192.168.0.0/16"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/ip.asciidoc",
- "line": 77
- },
- "digest": "96d3e3ee5d410507ca6ffb64a7e3d88e",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"ip_addr\": \"192.168.0.0/16\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "ip_addr": "192.168.0.0/16"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/ip.asciidoc",
- "line": 91
- },
- "digest": "f880cf334c8d355edc3abf196d9a8b67",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"ip_addr\": \"2001:db8::/48\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "ip_addr": "2001:db8::/48"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/ip.asciidoc",
- "line": 108
- },
- "digest": "db5fe7de772a7607b8d104cc35a6bc6c",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"query_string\" : {\n \"query\": \"ip_addr:\\\"2001:db8::/48\\\"\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "ip_addr:\"2001:db8::/48\""
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 14
- },
- "digest": "adbb85423739e45e6d072fd6bebb140e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_id\": {\n \"type\": \"keyword\"\n },\n \"my_join_field\": { <1>\n \"type\": \"join\",\n \"relations\": {\n \"question\": \"answer\" <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_id": {
- "type": "keyword"
- },
- "my_join_field": {
- "type": "join",
- "relations": {
- "question": "answer"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 41
- },
- "digest": "ce09baf41be8157b688e19e36b6050c9",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"my_id\": \"1\",\n \"text\": \"This is a question\",\n \"my_join_field\": {\n \"name\": \"question\" <1>\n }\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"my_id\": \"2\",\n \"text\": \"This is another question\",\n \"my_join_field\": {\n \"name\": \"question\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "my_id": "1",
- "text": "This is a question",
- "my_join_field": {
- "name": "question"
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "my_id": "2",
- "text": "This is another question",
- "my_join_field": {
- "name": "question"
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 68
- },
- "digest": "34a90fc67bf423c562cfbc91ca1016cf",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"my_id\": \"1\",\n \"text\": \"This is a question\",\n \"my_join_field\": \"question\" <1>\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"my_id\": \"2\",\n \"text\": \"This is another question\",\n \"my_join_field\": \"question\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "my_id": "1",
- "text": "This is a question",
- "my_join_field": "question"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "my_id": "2",
- "text": "This is another question",
- "my_join_field": "question"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 96
- },
- "digest": "f2b074b37e37cc12abf1b5c795965912",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/3?routing=1&refresh <1>\n{\n \"my_id\": \"3\",\n \"text\": \"This is an answer\",\n \"my_join_field\": {\n \"name\": \"answer\", <2>\n \"parent\": \"1\" <3>\n }\n}\n\nPUT my_index/_doc/4?routing=1&refresh\n{\n \"my_id\": \"4\",\n \"text\": \"This is another answer\",\n \"my_join_field\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "my_id": "3",
- "text": "This is an answer",
- "my_join_field": {
- "name": "answer",
- "parent": "1"
- }
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/4",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "my_id": "4",
- "text": "This is another answer",
- "my_join_field": {
- "name": "answer",
- "parent": "1"
- }
- },
- "params": {
- "index": "my_index",
- "id": "4"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 165
- },
- "digest": "275353b0245fde574d0b11f2aba2836e",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"match_all\": {}\n },\n \"sort\": [\"my_id\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "sort": [
- "my_id"
- ]
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 179
- },
- "digest": "e3d73c2ed2f1f17f401fbe06127a415f",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...,\n \"hits\": {\n \"total\" : {\n \"value\": 4,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": [\n {\n \"_index\": \"my_index\",\n \"_id\": \"1\",\n \"_score\": null,\n \"_source\": {\n \"my_id\": \"1\",\n \"text\": \"This is a question\",\n \"my_join_field\": \"question\" <1>\n },\n \"sort\": [\n \"1\"\n ]\n },\n {\n \"_index\": \"my_index\",\n \"_id\": \"2\",\n \"_score\": null,\n \"_source\": {\n \"my_id\": \"2\",\n \"text\": \"This is another question\",\n \"my_join_field\": \"question\" <2>\n },\n \"sort\": [\n \"2\"\n ]\n },\n {\n \"_index\": \"my_index\",\n \"_id\": \"3\",\n \"_score\": null,\n \"_routing\": \"1\",\n \"_source\": {\n \"my_id\": \"3\",\n \"text\": \"This is an answer\",\n \"my_join_field\": {\n \"name\": \"answer\", <3>\n \"parent\": \"1\" <4>\n }\n },\n \"sort\": [\n \"3\"\n ]\n },\n {\n \"_index\": \"my_index\",\n \"_id\": \"4\",\n \"_score\": null,\n \"_routing\": \"1\",\n \"_source\": {\n \"my_id\": \"4\",\n \"text\": \"This is another answer\",\n \"my_join_field\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n }\n },\n \"sort\": [\n \"4\"\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 272
- },
- "digest": "26fe7b3c9aeab972725b6d708cc6df22",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"parent_id\": { <1>\n \"type\": \"answer\",\n \"id\": \"1\"\n }\n },\n \"aggs\": {\n \"parents\": {\n \"terms\": {\n \"field\": \"my_join_field#question\", <2>\n \"size\": 10\n }\n }\n },\n \"script_fields\": {\n \"parent\": {\n \"script\": {\n \"source\": \"doc['my_join_field#question']\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "parent_id": {
- "type": "answer",
- "id": "1"
- }
- },
- "aggs": {
- "parents": {
- "terms": {
- "field": "my_join_field#question",
- "size": 10
- }
- }
- },
- "script_fields": {
- "parent": {
- "script": {
- "source": "doc['my_join_field#question']"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 325
- },
- "digest": "e0b414b45460d424ab838b5136492fa1",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_join_field\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": \"answer\"\n },\n \"eager_global_ordinals\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_join_field": {
- "type": "join",
- "relations": {
- "question": "answer"
- },
- "eager_global_ordinals": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 346
- },
- "digest": "2c090fe7ec7b66b3f5c178d71c46323b",
- "lang": "console",
- "found": [],
- "source": "# Per-index\nGET _stats/fielddata?human&fields=my_join_field#question\n\n# Per-node per-index\nGET _nodes/stats/indices/fielddata?human&fields=my_join_field#question",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats/fielddata",
- "query": {
- "human": true,
- "fields": "my_join_field"
- },
- "body": null,
- "params": {
- "metric": "fielddata"
- },
- "api": "indices.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "human": true,
- "fields": "my_join_field"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 360
- },
- "digest": "bc358cfd219faf9353cb65820981a0df",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_join_field\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": [\"answer\", \"comment\"] <1>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_join_field": {
- "type": "join",
- "relations": {
- "question": [
- "answer",
- "comment"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 387
- },
- "digest": "1cc03b9715d9a3f876f7b7bb7fe66394",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_join_field\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": [\"answer\", \"comment\"], <1>\n \"answer\": \"vote\" <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_join_field": {
- "type": "join",
- "relations": {
- "question": [
- "answer",
- "comment"
- ],
- "answer": "vote"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 422
- },
- "digest": "6eecf0fbf95d132beb0f49b3181da419",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/3?routing=1&refresh <1>\n{\n \"text\": \"This is a vote\",\n \"my_join_field\": {\n \"name\": \"vote\",\n \"parent\": \"2\" <2>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "text": "This is a vote",
- "my_join_field": {
- "name": "vote",
- "parent": "2"
- }
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/keyword.asciidoc",
- "line": 20
- },
- "digest": "46c4b0dfb674825f9579203d41e7f404",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"tags\": {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "tags": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/nested.asciidoc",
- "line": 19
- },
- "digest": "8baccd8688a6bad1749b8935f9601ea4",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"group\" : \"fans\",\n \"user\" : [ <1>\n {\n \"first\" : \"John\",\n \"last\" : \"Smith\"\n },\n {\n \"first\" : \"Alice\",\n \"last\" : \"White\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "group": "fans",
- "user": [
- {
- "first": "John",
- "last": "Smith"
- },
- {
- "first": "Alice",
- "last": "White"
- }
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/nested.asciidoc",
- "line": 55
- },
- "digest": "b214942b938e47f2c486e523546cb574",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": [\n { \"match\": { \"user.first\": \"Alice\" }},\n { \"match\": { \"user.last\": \"Smith\" }}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "user.first": "Alice"
- }
- },
- {
- "match": {
- "user.last": "Smith"
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/nested.asciidoc",
- "line": 80
- },
- "digest": "b919f88e6f47a40d5793479440a90ba6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"user\": {\n \"type\": \"nested\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"group\" : \"fans\",\n \"user\" : [\n {\n \"first\" : \"John\",\n \"last\" : \"Smith\"\n },\n {\n \"first\" : \"Alice\",\n \"last\" : \"White\"\n }\n ]\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"user\",\n \"query\": {\n \"bool\": {\n \"must\": [\n { \"match\": { \"user.first\": \"Alice\" }},\n { \"match\": { \"user.last\": \"Smith\" }} <2>\n ]\n }\n }\n }\n }\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"user\",\n \"query\": {\n \"bool\": {\n \"must\": [\n { \"match\": { \"user.first\": \"Alice\" }},\n { \"match\": { \"user.last\": \"White\" }} <3>\n ]\n }\n },\n \"inner_hits\": { <4>\n \"highlight\": {\n \"fields\": {\n \"user.first\": {}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user": {
- "type": "nested"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "group": "fans",
- "user": [
- {
- "first": "John",
- "last": "Smith"
- },
- {
- "first": "Alice",
- "last": "White"
- }
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "user",
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "user.first": "Alice"
- }
- },
- {
- "match": {
- "user.last": "Smith"
- }
- }
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "user",
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "user.first": "Alice"
- }
- },
- {
- "match": {
- "user.last": "White"
- }
- }
- ]
- }
- },
- "inner_hits": {
- "highlight": {
- "fields": {
- "user.first": {}
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/numeric.asciidoc",
- "line": 22
- },
- "digest": "a71c438cc4df1cafe3109ccff475afdb",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"number_of_bytes\": {\n \"type\": \"integer\"\n },\n \"time_in_seconds\": {\n \"type\": \"float\"\n },\n \"price\": {\n \"type\": \"scaled_float\",\n \"scaling_factor\": 100\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "number_of_bytes": {
- "type": "integer"
- },
- "time_in_seconds": {
- "type": "float"
- },
- "price": {
- "type": "scaled_float",
- "scaling_factor": 100
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/object.asciidoc",
- "line": 11
- },
- "digest": "9bb2dc0500011e0774f4bdfebf57a7a0",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{ <1>\n \"region\": \"US\",\n \"manager\": { <2>\n \"age\": 30,\n \"name\": { <3>\n \"first\": \"John\",\n \"last\": \"Smith\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "region": "US",
- "manager": {
- "age": 30,
- "name": {
- "first": "John",
- "last": "Smith"
- }
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/object.asciidoc",
- "line": 46
- },
- "digest": "8e907d7533581efadf7831b05dd9f794",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": { <1>\n \"region\": {\n \"type\": \"keyword\"\n },\n \"manager\": { <2>\n \"properties\": {\n \"age\": { \"type\": \"integer\" },\n \"name\": { <3>\n \"properties\": {\n \"first\": { \"type\": \"text\" },\n \"last\": { \"type\": \"text\" }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "region": {
- "type": "keyword"
- },
- "manager": {
- "properties": {
- "age": {
- "type": "integer"
- },
- "name": {
- "properties": {
- "first": {
- "type": "text"
- },
- "last": {
- "type": "text"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 20
- },
- "digest": "05c14dd0bda732cfa36f7fb88138d98e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"query\": {\n \"type\": \"percolator\"\n },\n \"field\": {\n \"type\": \"text\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "field": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 40
- },
- "digest": "dc1f917924b43416a9ec7f8c9505f885",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/match_value\n{\n \"query\" : {\n \"match\" : {\n \"field\" : \"value\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/match_value",
- "query": null,
- "body": {
- "query": {
- "match": {
- "field": "value"
- }
- }
- },
- "params": {
- "index": "my_index",
- "id": "match_value"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 70
- },
- "digest": "3eb4cdd4a799a117ac1ff5f02b18a512",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"query\" : {\n \"type\" : \"percolator\"\n },\n \"body\" : {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPOST _aliases\n{\n \"actions\": [\n {\n \"add\": {\n \"index\": \"index\",\n \"alias\": \"queries\" <1>\n }\n }\n ]\n}\n\nPUT queries/_doc/1?refresh\n{\n \"query\" : {\n \"match\" : {\n \"body\" : \"quick brown fox\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "body": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "index",
- "alias": "queries"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- },
- {
- "method": "PUT",
- "url": "/queries/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "body": "quick brown fox"
- }
- }
- },
- "params": {
- "index": "queries",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 115
- },
- "digest": "f09817fd13ff3dce52eb79d0722409c3",
- "lang": "console",
- "found": [],
- "source": "PUT new_index\n{\n \"mappings\": {\n \"properties\": {\n \"query\" : {\n \"type\" : \"percolator\"\n },\n \"body\" : {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPOST /_reindex?refresh\n{\n \"source\": {\n \"index\": \"index\"\n },\n \"dest\": {\n \"index\": \"new_index\"\n }\n}\n\nPOST _aliases\n{\n \"actions\": [ <1>\n {\n \"remove\": {\n \"index\" : \"index\",\n \"alias\": \"queries\"\n }\n },\n {\n \"add\": {\n \"index\": \"new_index\",\n \"alias\": \"queries\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/new_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "body": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "new_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/_reindex",
- "query": {
- "refresh": true
- },
- "body": {
- "source": {
- "index": "index"
- },
- "dest": {
- "index": "new_index"
- }
- },
- "params": null,
- "api": "reindex"
- },
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "remove": {
- "index": "index",
- "alias": "queries"
- }
- },
- {
- "add": {
- "index": "new_index",
- "alias": "queries"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 165
- },
- "digest": "60cab62af1540db2ad3b696b0ee1d7a8",
- "lang": "console",
- "found": [],
- "source": "GET /queries/_search\n{\n \"query\": {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"body\" : \"fox jumps over the lazy dog\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/queries/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "body": "fox jumps over the lazy dog"
- }
- }
- }
- },
- "params": {
- "index": "queries"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 183
- },
- "digest": "8bb3c37f6c007d069b7107b6c1e306b2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 3,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.13076457,\n \"hits\": [\n {\n \"_index\": \"new_index\", <1>\n \"_id\": \"1\",\n \"_score\": 0.13076457,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"body\": \"quick brown fox\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 262
- },
- "digest": "360c4f373e72ba861584ee85bd218124",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\" : {\n \"tokenizer\": \"standard\",\n \"filter\" : [\"lowercase\", \"porter_stem\"]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"query\" : {\n \"type\": \"percolator\"\n },\n \"body\" : {\n \"type\": \"text\",\n \"analyzer\": \"my_analyzer\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "porter_stem"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "body": {
- "type": "text",
- "analyzer": "my_analyzer"
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 295
- },
- "digest": "3e13c8a81f40a537eddc0b57633b45f8",
- "lang": "console",
- "found": [],
- "source": "POST /test_index/_analyze\n{\n \"analyzer\" : \"my_analyzer\",\n \"text\" : \"missing bicycles\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "missing bicycles"
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 307
- },
- "digest": "d674b0d80bef84b374861ff1023e8ac6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"miss\",\n \"start_offset\": 0,\n \"end_offset\": 7,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"bicycl\",\n \"start_offset\": 8,\n \"end_offset\": 16,\n \"type\": \"\",\n \"position\": 1\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 331
- },
- "digest": "7a2b9a7b2b6553a48bd4db60a939c0fc",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index/_doc/1?refresh\n{\n \"query\" : {\n \"match\" : {\n \"body\" : {\n \"query\" : \"miss bicycl\",\n \"analyzer\" : \"whitespace\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "body": {
- "query": "miss bicycl",
- "analyzer": "whitespace"
- }
- }
- }
- },
- "params": {
- "index": "test_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 355
- },
- "digest": "45813d971bfa890ffa2f51f3f480cce5",
- "lang": "console",
- "found": [],
- "source": "GET /test_index/_search\n{\n \"query\": {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"body\" : \"Bycicles are missing\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test_index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "body": "Bycicles are missing"
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 373
- },
- "digest": "6c36ac2864631f76aa6b04ac6b4d18a4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 6,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.13076457,\n \"hits\": [\n {\n \"_index\": \"test_index\",\n \"_id\": \"1\",\n \"_score\": 0.13076457,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"body\": {\n \"query\": \"miss bicycl\",\n \"analyzer\": \"whitespace\"\n }\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 427
- },
- "digest": "a04a8d90f8245ff5f30a9983909faa1d",
- "lang": "console",
- "found": [],
- "source": "PUT my_queries1\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"wildcard_prefix\": { <1>\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"wildcard_edge_ngram\"\n ]\n }\n },\n \"filter\": {\n \"wildcard_edge_ngram\": { <2>\n \"type\": \"edge_ngram\",\n \"min_gram\": 1,\n \"max_gram\": 32\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"query\": {\n \"type\": \"percolator\"\n },\n \"my_field\": {\n \"type\": \"text\",\n \"fields\": {\n \"prefix\": { <3>\n \"type\": \"text\",\n \"analyzer\": \"wildcard_prefix\",\n \"search_analyzer\": \"standard\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_queries1",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "wildcard_prefix": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "wildcard_edge_ngram"
- ]
- }
- },
- "filter": {
- "wildcard_edge_ngram": {
- "type": "edge_ngram",
- "min_gram": 1,
- "max_gram": 32
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "my_field": {
- "type": "text",
- "fields": {
- "prefix": {
- "type": "text",
- "analyzer": "wildcard_prefix",
- "search_analyzer": "standard"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_queries1"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 495
- },
- "digest": "ed688d86eeaa4d7969acb0f574eb917f",
- "lang": "console",
- "found": [],
- "source": "PUT /my_queries1/_doc/1?refresh\n{\n \"query\": {\n \"term\": {\n \"my_field.prefix\": \"abc\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_queries1/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "term": {
- "my_field.prefix": "abc"
- }
- }
- },
- "params": {
- "index": "my_queries1",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 513
- },
- "digest": "d2f6040c058a9555dfa62bb42d896a8f",
- "lang": "console",
- "found": [],
- "source": "GET /my_queries1/_search\n{\n \"query\": {\n \"percolate\": {\n \"field\": \"query\",\n \"document\": {\n \"my_field\": \"abcd\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_queries1/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "my_field": "abcd"
- }
- }
- }
- },
- "params": {
- "index": "my_queries1"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 529
- },
- "digest": "c314bccc7efd6cdf7fed6aa2585900c7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 6,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.18864399,\n \"hits\": [\n {\n \"_index\": \"my_queries1\",\n \"_id\": \"1\",\n \"_score\": 0.18864399,\n \"_source\": {\n \"query\": {\n \"term\": {\n \"my_field.prefix\": \"abc\"\n }\n }\n },\n \"fields\": {\n \"_percolator_document_slot\": [\n 0\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 574
- },
- "digest": "343dd09a8c76987e586858be3bdc51eb",
- "lang": "console",
- "found": [],
- "source": "PUT my_queries2\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"wildcard_suffix\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"reverse\",\n \"wildcard_edge_ngram\"\n ]\n },\n \"wildcard_suffix_search_time\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"reverse\"\n ]\n }\n },\n \"filter\": {\n \"wildcard_edge_ngram\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 1,\n \"max_gram\": 32\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"query\": {\n \"type\": \"percolator\"\n },\n \"my_field\": {\n \"type\": \"text\",\n \"fields\": {\n \"suffix\": {\n \"type\": \"text\",\n \"analyzer\": \"wildcard_suffix\",\n \"search_analyzer\": \"wildcard_suffix_search_time\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_queries2",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "wildcard_suffix": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "reverse",
- "wildcard_edge_ngram"
- ]
- },
- "wildcard_suffix_search_time": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "reverse"
- ]
- }
- },
- "filter": {
- "wildcard_edge_ngram": {
- "type": "edge_ngram",
- "min_gram": 1,
- "max_gram": 32
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "my_field": {
- "type": "text",
- "fields": {
- "suffix": {
- "type": "text",
- "analyzer": "wildcard_suffix",
- "search_analyzer": "wildcard_suffix_search_time"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_queries2"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 649
- },
- "digest": "bd7330af2609bdd8aa10958f5e640b93",
- "lang": "console",
- "found": [],
- "source": "PUT /my_queries2/_doc/2?refresh\n{\n \"query\": {\n \"match\": { <1>\n \"my_field.suffix\": \"xyz\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_queries2/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "my_field.suffix": "xyz"
- }
- }
- },
- "params": {
- "index": "my_queries2",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 668
- },
- "digest": "4aa81a694266fb634904224d14cd9a87",
- "lang": "console",
- "found": [],
- "source": "GET /my_queries2/_search\n{\n \"query\": {\n \"percolate\": {\n \"field\": \"query\",\n \"document\": {\n \"my_field\": \"wxyz\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_queries2/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "my_field": "wxyz"
- }
- }
- }
- },
- "params": {
- "index": "my_queries2"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 21
- },
- "digest": "2b371fbf0654d76436d49f5703d6c137",
- "lang": "console",
- "found": [],
- "source": "PUT range_index\n{\n \"settings\": {\n \"number_of_shards\": 2\n },\n \"mappings\": {\n \"properties\": {\n \"expected_attendees\": {\n \"type\": \"integer_range\"\n },\n \"time_frame\": {\n \"type\": \"date_range\", <1>\n \"format\": \"yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis\"\n }\n }\n }\n}\n\nPUT range_index/_doc/1?refresh\n{\n \"expected_attendees\" : { <2>\n \"gte\" : 10,\n \"lte\" : 20\n },\n \"time_frame\" : { <3>\n \"gte\" : \"2015-10-31 12:00:00\", <4>\n \"lte\" : \"2015-11-01\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/range_index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 2
- },
- "mappings": {
- "properties": {
- "expected_attendees": {
- "type": "integer_range"
- },
- "time_frame": {
- "type": "date_range",
- "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/range_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "expected_attendees": {
- "gte": 10,
- "lte": 20
- },
- "time_frame": {
- "gte": "2015-10-31 12:00:00",
- "lte": "2015-11-01"
- }
- },
- "params": {
- "index": "range_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 62
- },
- "digest": "84edb44c5b74426f448b2baa101092d6",
- "lang": "console",
- "found": [],
- "source": "GET range_index/_search\n{\n \"query\" : {\n \"term\" : {\n \"expected_attendees\" : {\n \"value\": 12\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/range_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "expected_attendees": {
- "value": 12
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 78
- },
- "digest": "570b8a6473120ec5941ccae33072efd7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\" : {\n \"total\": 2,\n \"successful\": 2,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\" : 1.0,\n \"hits\" : [\n {\n \"_index\" : \"range_index\",\n \"_id\" : \"1\",\n \"_score\" : 1.0,\n \"_source\" : {\n \"expected_attendees\" : {\n \"gte\" : 10, \"lte\" : 20\n },\n \"time_frame\" : {\n \"gte\" : \"2015-10-31 12:00:00\", \"lte\" : \"2015-11-01\"\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 117
- },
- "digest": "1572696b97822d3332be51700e09672f",
- "lang": "console",
- "found": [],
- "source": "GET range_index/_search\n{\n \"query\" : {\n \"range\" : {\n \"time_frame\" : { <1>\n \"gte\" : \"2015-10-31\",\n \"lte\" : \"2015-11-01\",\n \"relation\" : \"within\" <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/range_index/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "time_frame": {
- "gte": "2015-10-31",
- "lte": "2015-11-01",
- "relation": "within"
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 139
- },
- "digest": "570b8a6473120ec5941ccae33072efd7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\" : {\n \"total\": 2,\n \"successful\": 2,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\" : 1.0,\n \"hits\" : [\n {\n \"_index\" : \"range_index\",\n \"_id\" : \"1\",\n \"_score\" : 1.0,\n \"_source\" : {\n \"expected_attendees\" : {\n \"gte\" : 10, \"lte\" : 20\n },\n \"time_frame\" : {\n \"gte\" : \"2015-10-31 12:00:00\", \"lte\" : \"2015-11-01\"\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 182
- },
- "digest": "f894f680943a8af8328aab4741e6ab93",
- "lang": "console",
- "found": [],
- "source": "PUT range_index/_mapping\n{\n \"properties\": {\n \"ip_whitelist\": {\n \"type\": \"ip_range\"\n }\n }\n}\n\nPUT range_index/_doc/2\n{\n \"ip_whitelist\" : \"192.168.0.0/16\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/range_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "ip_whitelist": {
- "type": "ip_range"
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "indices.put_mapping"
- },
- {
- "method": "PUT",
- "url": "/range_index/_doc/2",
- "query": null,
- "body": {
- "ip_whitelist": "192.168.0.0/16"
- },
- "params": {
- "index": "range_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/rank-feature.asciidoc",
- "line": 11
- },
- "digest": "1e088f892b20697fd6e537a3ecf624ee",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"pagerank\": {\n \"type\": \"rank_feature\" <1>\n },\n \"url_length\": {\n \"type\": \"rank_feature\",\n \"positive_score_impact\": false <2>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"pagerank\": 8,\n \"url_length\": 22\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "pagerank": {
- "type": "rank_feature"
- },
- "url_length": {
- "type": "rank_feature",
- "positive_score_impact": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "pagerank": 8,
- "url_length": 22
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/rank-features.asciidoc",
- "line": 16
- },
- "digest": "17867d05695ddeaee5d5aea2263ac589",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"topics\": {\n \"type\": \"rank_features\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"topics\": { <2>\n \"politics\": 20,\n \"economics\": 50.8\n }\n}\n\nPUT my_index/_doc/2\n{\n \"topics\": {\n \"politics\": 5.2,\n \"sports\": 80.1\n }\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"topics.politics\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "topics": {
- "type": "rank_features"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "topics": {
- "politics": 20,
- "economics": 50.8
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "topics": {
- "politics": 5.2,
- "sports": 80.1
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "topics.politics"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 18
- },
- "digest": "6f31f9cfe0dd741ccad4af62ba8f815e",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_field\": {\n \"type\": \"search_as_you_type\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_field": {
- "type": "search_as_you_type"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 71
- },
- "digest": "867e5fad9c57055712fe2b69fa69a97c",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"my_field\": \"quick brown fox jump lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "my_field": "quick brown fox jump lazy dog"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 87
- },
- "digest": "9bd25962f177e86dbc5a8030a420cc31",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"multi_match\": {\n \"query\": \"brown f\",\n \"type\": \"bool_prefix\",\n \"fields\": [\n \"my_field\",\n \"my_field._2gram\",\n \"my_field._3gram\"\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "brown f",
- "type": "bool_prefix",
- "fields": [
- "my_field",
- "my_field._2gram",
- "my_field._3gram"
- ]
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 106
- },
- "digest": "cf032a0749b770fb4f77af46d1059c18",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 44,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 1,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 0.8630463,\n \"hits\" : [\n {\n \"_index\" : \"my_index\",\n \"_id\" : \"1\",\n \"_score\" : 0.8630463,\n \"_source\" : {\n \"my_field\" : \"quick brown fox jump lazy dog\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 147
- },
- "digest": "0ced86822f8c0a479af5e1fe28dfc2ec",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"match_phrase_prefix\": {\n \"my_field\": \"brown f\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase_prefix": {
- "my_field": "brown f"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/text.asciidoc",
- "line": 22
- },
- "digest": "24ea1c6cdf10165228951e562b7ec0ef",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"full_name\": {\n \"type\": \"text\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "full_name": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/token-count.asciidoc",
- "line": 14
- },
- "digest": "98c3d643f71c1fd71238ebb748e846e7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"name\": { <1>\n \"type\": \"text\",\n \"fields\": {\n \"length\": { <2>\n \"type\": \"token_count\",\n \"analyzer\": \"standard\"\n }\n }\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"name\": \"John Smith\" }\n\nPUT my_index/_doc/2\n{ \"name\": \"Rachel Alice Williams\" }\n\nGET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"name.length\": 3 <3>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "type": "text",
- "fields": {
- "length": {
- "type": "token_count",
- "analyzer": "standard"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "name": "John Smith"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "name": "Rachel Alice Williams"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "name.length": 3
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 77
- },
- "digest": "04409304cd13f4cfa8efbed87aea9b15",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"geometry\": {\n \"type\": \"shape\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geometry": {
- "type": "shape"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 141
- },
- "digest": "a55bdc75b139d947d64b32dc9824e558",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"point\",\n \"coordinates\" : [-377.03653, 389.897676]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "point",
- "coordinates": [
- -377.03653,
- 389.897676
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 154
- },
- "digest": "8fb11f30a609b13c1373ce4a26124159",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POINT (-377.03653 389.897676)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POINT (-377.03653 389.897676)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 171
- },
- "digest": "bff745b32238691bae88de22530643cb",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"linestring\",\n \"coordinates\" : [[-377.03653, 389.897676], [-377.009051, 389.889939]]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "linestring",
- "coordinates": [
- [
- -377.03653,
- 389.897676
- ],
- [
- -377.009051,
- 389.889939
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 184
- },
- "digest": "c4f62c66f967c6e0da3616957efbeccf",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"LINESTRING (-377.03653 389.897676, -377.009051 389.889939)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "LINESTRING (-377.03653 389.897676, -377.009051 389.889939)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 200
- },
- "digest": "567829f263dd472bf76500db05d2200a",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [1000.0, -1001.0], [1001.0, -1001.0], [1001.0, -1000.0], [1000.0, -1000.0], [1000.0, -1001.0] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- 1000,
- -1001
- ],
- [
- 1001,
- -1001
- ],
- [
- 1001,
- -1000
- ],
- [
- 1000,
- -1000
- ],
- [
- 1000,
- -1001
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 215
- },
- "digest": "ae5f9956a525e976bfc37dcb4e7414ae",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POLYGON ((1000.0 -1001.0, 1001.0 -1001.0, 1001.0 -1000.0, 1000.0 -1000.0, 1000.0 -1001.0))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POLYGON ((1000.0 -1001.0, 1001.0 -1001.0, 1001.0 -1000.0, 1000.0 -1000.0, 1000.0 -1001.0))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 227
- },
- "digest": "4f869e56eb25586ac402ccfb00aa0359",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [1000.0, -1001.0], [1001.0, -1001.0], [1001.0, -1000.0], [1000.0, -1000.0], [1000.0, -1001.0] ],\n [ [1000.2, -1001.2], [1000.8, -1001.2], [1000.8, -1001.8], [1000.2, -1001.8], [1000.2, -1001.2] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- 1000,
- -1001
- ],
- [
- 1001,
- -1001
- ],
- [
- 1001,
- -1000
- ],
- [
- 1000,
- -1000
- ],
- [
- 1000,
- -1001
- ]
- ],
- [
- [
- 1000.2,
- -1001.2
- ],
- [
- 1000.8,
- -1001.2
- ],
- [
- 1000.8,
- -1001.8
- ],
- [
- 1000.2,
- -1001.8
- ],
- [
- 1000.2,
- -1001.2
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 243
- },
- "digest": "a5816a58c1fa769c23c6211ab449e6f3",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POLYGON ((1000.0 1000.0, 1001.0 1000.0, 1001.0 1001.0, 1000.0 1001.0, 1000.0 1000.0), (1000.2 1000.2, 1000.8 1000.2, 1000.8 1000.8, 1000.2 1000.8, 1000.2 1000.2))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POLYGON ((1000.0 1000.0, 1001.0 1000.0, 1001.0 1001.0, 1000.0 1001.0, 1000.0 1000.0), (1000.2 1000.2, 1000.8 1000.2, 1000.8 1000.8, 1000.2 1000.8, 1000.2 1000.2))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 265
- },
- "digest": "1f1ccd9af526b2251bf960a85288fc97",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"orientation\" : \"clockwise\",\n \"coordinates\" : [\n [ [1000.0, 1000.0], [1000.0, 1001.0], [1001.0, 1001.0], [1001.0, 1000.0], [1000.0, 1000.0] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "orientation": "clockwise",
- "coordinates": [
- [
- [
- 1000,
- 1000
- ],
- [
- 1000,
- 1001
- ],
- [
- 1001,
- 1001
- ],
- [
- 1001,
- 1000
- ],
- [
- 1000,
- 1000
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 285
- },
- "digest": "02da8c5d098d9e7cc263efac344a96de",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multipoint\",\n \"coordinates\" : [\n [1002.0, 1002.0], [1003.0, 2000.0]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multipoint",
- "coordinates": [
- [
- 1002,
- 1002
- ],
- [
- 1003,
- 2000
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 300
- },
- "digest": "577b09f45256ff855252d29e1d1cd433",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTIPOINT (1002.0 2000.0, 1003.0 2000.0)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTIPOINT (1002.0 2000.0, 1003.0 2000.0)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 314
- },
- "digest": "76c551d13c3d907ad6dc56b85bec76de",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multilinestring\",\n \"coordinates\" : [\n [ [1002.0, 200.0], [1003.0, 200.0], [1003.0, 300.0], [1002.0, 300.0] ],\n [ [1000.0, 100.0], [1001.0, 100.0], [1001.0, 100.0], [1000.0, 100.0] ],\n [ [1000.2, 100.2], [1000.8, 100.2], [1000.8, 100.8], [1000.2, 100.8] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multilinestring",
- "coordinates": [
- [
- [
- 1002,
- 200
- ],
- [
- 1003,
- 200
- ],
- [
- 1003,
- 300
- ],
- [
- 1002,
- 300
- ]
- ],
- [
- [
- 1000,
- 100
- ],
- [
- 1001,
- 100
- ],
- [
- 1001,
- 100
- ],
- [
- 1000,
- 100
- ]
- ],
- [
- [
- 1000.2,
- 100.2
- ],
- [
- 1000.8,
- 100.2
- ],
- [
- 1000.8,
- 100.8
- ],
- [
- 1000.2,
- 100.8
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 331
- },
- "digest": "9aeca1d56bb2ff0701587b269163311e",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTILINESTRING ((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0), (1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0), (1000.2 0.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTILINESTRING ((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0), (1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0), (1000.2 0.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 345
- },
- "digest": "9d2464f0dce99d47f2699d953ee55b37",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multipolygon\",\n \"coordinates\" : [\n [ [[1002.0, 200.0], [1003.0, 200.0], [1003.0, 300.0], [1002.0, 300.0], [1002.0, 200.0]] ],\n [ [[1000.0, 200.0], [1001.0, 100.0], [1001.0, 100.0], [1000.0, 100.0], [1000.0, 100.0]],\n [[1000.2, 200.2], [1000.8, 100.2], [1000.8, 100.8], [1000.2, 100.8], [1000.2, 100.2]] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multipolygon",
- "coordinates": [
- [
- [
- [
- 1002,
- 200
- ],
- [
- 1003,
- 200
- ],
- [
- 1003,
- 300
- ],
- [
- 1002,
- 300
- ],
- [
- 1002,
- 200
- ]
- ]
- ],
- [
- [
- [
- 1000,
- 200
- ],
- [
- 1001,
- 100
- ],
- [
- 1001,
- 100
- ],
- [
- 1000,
- 100
- ],
- [
- 1000,
- 100
- ]
- ],
- [
- [
- 1000.2,
- 200.2
- ],
- [
- 1000.8,
- 100.2
- ],
- [
- 1000.8,
- 100.8
- ],
- [
- 1000.2,
- 100.8
- ],
- [
- 1000.2,
- 100.2
- ]
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 362
- },
- "digest": "e7f366d76e3e53b4c0c30f7b0c21fbc0",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTIPOLYGON (((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0, 102.0 200.0)), ((1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0, 1000.0 100.0), (1000.2 100.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8, 1000.2 100.2)))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTIPOLYGON (((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0, 102.0 200.0)), ((1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0, 1000.0 100.0), (1000.2 100.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8, 1000.2 100.2)))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 376
- },
- "digest": "4b3ef0f1d3cb9598a3fb94c03948e9e2",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\": \"geometrycollection\",\n \"geometries\": [\n {\n \"type\": \"point\",\n \"coordinates\": [1000.0, 100.0]\n },\n {\n \"type\": \"linestring\",\n \"coordinates\": [ [1001.0, 100.0], [1002.0, 100.0] ]\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "geometrycollection",
- "geometries": [
- {
- "type": "point",
- "coordinates": [
- 1000,
- 100
- ]
- },
- {
- "type": "linestring",
- "coordinates": [
- [
- 1001,
- 100
- ],
- [
- 1002,
- 100
- ]
- ]
- }
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 398
- },
- "digest": "72ef8c634b3594963f203d2b3631c12e",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"GEOMETRYCOLLECTION (POINT (1000.0 100.0), LINESTRING (1001.0 100.0, 1002.0 100.0))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "GEOMETRYCOLLECTION (POINT (1000.0 100.0), LINESTRING (1001.0 100.0, 1002.0 100.0))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 413
- },
- "digest": "6dd3c5a716302fdd39fcf5c150b826bc",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"envelope\",\n \"coordinates\" : [ [1000.0, 100.0], [1001.0, 100.0] ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "envelope",
- "coordinates": [
- [
- 1000,
- 100
- ],
- [
- 1001,
- 100
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 428
- },
- "digest": "70932f56df27fb502d2095fefcaa83d6",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"BBOX (1000.0, 1002.0, 2000.0, 1000.0)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "BBOX (1000.0, 1002.0, 2000.0, 1000.0)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/ignored-field.asciidoc",
- "line": 18
- },
- "digest": "3fe0fb38f75d2a34fb1e6ac9bedbcdbc",
- "lang": "console",
- "found": [],
- "source": "GET _search\n{\n \"query\": {\n \"exists\": {\n \"field\": \"_ignored\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "exists": {
- "field": "_ignored"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/ignored-field.asciidoc",
- "line": 33
- },
- "digest": "cf47cd4a39cd62a3ecad919e54a67bca",
- "lang": "console",
- "found": [],
- "source": "GET _search\n{\n \"query\": {\n \"term\": {\n \"_ignored\": \"@timestamp\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "_ignored": "@timestamp"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/id-field.asciidoc",
- "line": 12
- },
- "digest": "8d9a63d7c31f08bd27d92ece3de1649c",
- "lang": "console",
- "found": [],
- "source": "# Example documents\nPUT my_index/_doc/1\n{\n \"text\": \"Document with ID 1\"\n}\n\nPUT my_index/_doc/2?refresh=true\n{\n \"text\": \"Document with ID 2\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"terms\": {\n \"_id\": [ \"1\", \"2\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Document with ID 1"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": "true"
- },
- "body": {
- "text": "Document with ID 2"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "_id": [
- "1",
- "2"
- ]
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/index-field.asciidoc",
- "line": 11
- },
- "digest": "3c04f75bcbb07125d51b21b9b2c9f6f0",
- "lang": "console",
- "found": [],
- "source": "PUT index_1/_doc/1\n{\n \"text\": \"Document in index 1\"\n}\n\nPUT index_2/_doc/2?refresh=true\n{\n \"text\": \"Document in index 2\"\n}\n\nGET index_1,index_2/_search\n{\n \"query\": {\n \"terms\": {\n \"_index\": [\"index_1\", \"index_2\"] <1>\n }\n },\n \"aggs\": {\n \"indices\": {\n \"terms\": {\n \"field\": \"_index\", <2>\n \"size\": 10\n }\n }\n },\n \"sort\": [\n {\n \"_index\": { <3>\n \"order\": \"asc\"\n }\n }\n ],\n \"script_fields\": {\n \"index_name\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['_index']\" <4>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_1/_doc/1",
- "query": null,
- "body": {
- "text": "Document in index 1"
- },
- "params": {
- "index": "index_1",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index_2/_doc/2",
- "query": {
- "refresh": "true"
- },
- "body": {
- "text": "Document in index 2"
- },
- "params": {
- "index": "index_2",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/index_1,index_2/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "_index": [
- "index_1",
- "index_2"
- ]
- }
- },
- "aggs": {
- "indices": {
- "terms": {
- "field": "_index",
- "size": 10
- }
- }
- },
- "sort": [
- {
- "_index": {
- "order": "asc"
- }
- }
- ],
- "script_fields": {
- "index_name": {
- "script": {
- "lang": "painless",
- "source": "doc['_index']"
- }
- }
- }
- },
- "params": {
- "index": "index_1,index_2"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/meta-field.asciidoc",
- "line": 9
- },
- "digest": "e10d7f411744eb1d5ddaa2f70a368490",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"_meta\": { <1>\n \"class\": \"MyApp::User\",\n \"version\": {\n \"min\": \"1.0\",\n \"max\": \"1.3\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "_meta": {
- "class": "MyApp::User",
- "version": {
- "min": "1.0",
- "max": "1.3"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/meta-field.asciidoc",
- "line": 31
- },
- "digest": "019eab381444c3d77ad3bb4e39edfac6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_mapping\n{\n \"_meta\": {\n \"class\": \"MyApp2::User3\",\n \"version\": {\n \"min\": \"1.3\",\n \"max\": \"1.5\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "_meta": {
- "class": "MyApp2::User3",
- "version": {
- "min": "1.3",
- "max": "1.5"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/routing-field.asciidoc",
- "line": 15
- },
- "digest": "b684073ea8d34359c290c663d2a5e798",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?routing=user1&refresh=true <1>\n{\n \"title\": \"This is a document\"\n}\n\nGET my_index/_doc/1?routing=user1 <2>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "routing": "user1",
- "refresh": "true"
- },
- "body": {
- "title": "This is a document"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/1",
- "query": {
- "routing": "user1"
- },
- "body": null,
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/routing-field.asciidoc",
- "line": 33
- },
- "digest": "6817609dd2fcb73b9920327c5cf5ec77",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"terms\": {\n \"_routing\": [ \"user1\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "_routing": [
- "user1"
- ]
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/routing-field.asciidoc",
- "line": 53
- },
- "digest": "134bdbfb50c81dd3c487514faabc81d3",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search?routing=user1,user2 <1>\n{\n \"query\": {\n \"match\": {\n \"title\": \"document\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "routing": "user1,user2"
- },
- "body": {
- "query": {
- "match": {
- "title": "document"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/routing-field.asciidoc",
- "line": 78
- },
- "digest": "4f3089b403945e391f03280ae2f360a4",
- "lang": "console",
- "found": [],
- "source": "PUT my_index2\n{\n \"mappings\": {\n \"_routing\": {\n \"required\": true <1>\n }\n }\n}\n\nPUT my_index2/_doc/1 <2>\n{\n \"text\": \"No routing value provided\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index2",
- "query": null,
- "body": {
- "mappings": {
- "_routing": {
- "required": true
- }
- }
- },
- "params": {
- "index": "my_index2"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index2/_doc/1",
- "query": null,
- "body": {
- "text": "No routing value provided"
- },
- "params": {
- "index": "my_index2",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/source-field.asciidoc",
- "line": 16
- },
- "digest": "50246e04b49dab320409b95526e6e34c",
- "lang": "console",
- "found": [],
- "source": "PUT tweets\n{\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/tweets",
- "query": null,
- "body": {
- "mappings": {
- "_source": {
- "enabled": false
- }
- }
- },
- "params": {
- "index": "tweets"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/source-field.asciidoc",
- "line": 85
- },
- "digest": "b557f114e21dbc6f531d4e7621a08e8f",
- "lang": "console",
- "found": [],
- "source": "PUT logs\n{\n \"mappings\": {\n \"_source\": {\n \"includes\": [\n \"*.count\",\n \"meta.*\"\n ],\n \"excludes\": [\n \"meta.description\",\n \"meta.other.*\"\n ]\n }\n }\n}\n\nPUT logs/_doc/1\n{\n \"requests\": {\n \"count\": 10,\n \"foo\": \"bar\" <1>\n },\n \"meta\": {\n \"name\": \"Some metric\",\n \"description\": \"Some metric description\", <1>\n \"other\": {\n \"foo\": \"one\", <1>\n \"baz\": \"two\" <1>\n }\n }\n}\n\nGET logs/_search\n{\n \"query\": {\n \"match\": {\n \"meta.other.foo\": \"one\" <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs",
- "query": null,
- "body": {
- "mappings": {
- "_source": {
- "includes": [
- "*.count",
- "meta.*"
- ],
- "excludes": [
- "meta.description",
- "meta.other.*"
- ]
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/logs/_doc/1",
- "query": null,
- "body": {
- "requests": {
- "count": 10,
- "foo": "bar"
- },
- "meta": {
- "name": "Some metric",
- "description": "Some metric description",
- "other": {
- "foo": "one",
- "baz": "two"
- }
- }
- },
- "params": {
- "index": "logs",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "meta.other.foo": "one"
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/type-field.asciidoc",
- "line": 14
- },
- "digest": "cb639c02d28945379ba10dbfb982186f",
- "lang": "console",
- "found": [],
- "source": "# Example documents\n\nPUT my_index/_doc/1?refresh=true\n{\n \"text\": \"Document with type 'doc'\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": "true"
- },
- "body": {
- "text": "Document with type 'doc'"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/type-field.asciidoc",
- "line": 25
- },
- "digest": "0d7b0f40446e2001c63bef29f84530eb",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"_type\": \"_doc\" <1>\n }\n },\n \"aggs\": {\n \"types\": {\n \"terms\": {\n \"field\": \"_type\", <2>\n \"size\": 10\n }\n }\n },\n \"sort\": [\n {\n \"_type\": { <3>\n \"order\": \"desc\"\n }\n }\n ],\n \"script_fields\": {\n \"type\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['_type']\" <4>\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "_type": "_doc"
- }
- },
- "aggs": {
- "types": {
- "terms": {
- "field": "_type",
- "size": 10
- }
- }
- },
- "sort": [
- {
- "_type": {
- "order": "desc"
- }
- }
- ],
- "script_fields": {
- "type": {
- "script": {
- "lang": "painless",
- "source": "doc['_type']"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/analyzer.asciidoc",
- "line": 43
- },
- "digest": "0ae23713026515ec5047c7bbcf9842f7",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"text\": { <1>\n \"type\": \"text\",\n \"fields\": {\n \"english\": { <2>\n \"type\": \"text\",\n \"analyzer\": \"english\"\n }\n }\n }\n }\n }\n}\n\nGET my_index/_analyze <3>\n{\n \"field\": \"text\",\n \"text\": \"The quick Brown Foxes.\"\n}\n\nGET my_index/_analyze <4>\n{\n \"field\": \"text.english\",\n \"text\": \"The quick Brown Foxes.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "fields": {
- "english": {
- "type": "text",
- "analyzer": "english"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "GET",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "field": "text",
- "text": "The quick Brown Foxes."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- },
- {
- "method": "GET",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "field": "text.english",
- "text": "The quick Brown Foxes."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/analyzer.asciidoc",
- "line": 93
- },
- "digest": "5bf1e4194dce1e15eb7f48fd72b1fc6b",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\":{\n \"analysis\":{\n \"analyzer\":{\n \"my_analyzer\":{ <1>\n \"type\":\"custom\",\n \"tokenizer\":\"standard\",\n \"filter\":[\n \"lowercase\"\n ]\n },\n \"my_stop_analyzer\":{ <2>\n \"type\":\"custom\",\n \"tokenizer\":\"standard\",\n \"filter\":[\n \"lowercase\",\n \"english_stop\"\n ]\n }\n },\n \"filter\":{\n \"english_stop\":{\n \"type\":\"stop\",\n \"stopwords\":\"_english_\"\n }\n }\n }\n },\n \"mappings\":{\n \"properties\":{\n \"title\": {\n \"type\":\"text\",\n \"analyzer\":\"my_analyzer\", <3>\n \"search_analyzer\":\"my_stop_analyzer\", <4>\n \"search_quote_analyzer\":\"my_analyzer\" <5>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"title\":\"The Quick Brown Fox\"\n}\n\nPUT my_index/_doc/2\n{\n \"title\":\"A Quick Brown Fox\"\n}\n\nGET my_index/_search\n{\n \"query\":{\n \"query_string\":{\n \"query\":\"\\\"the quick brown fox\\\"\" <6>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase"
- ]
- },
- "my_stop_analyzer": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "english_stop"
- ]
- }
- },
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": "_english_"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "analyzer": "my_analyzer",
- "search_analyzer": "my_stop_analyzer",
- "search_quote_analyzer": "my_analyzer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "title": "The Quick Brown Fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "title": "A Quick Brown Fox"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "\"the quick brown fox\""
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/coerce.asciidoc",
- "line": 19
- },
- "digest": "5c734d4a7252cc155f8dc90c4785f491",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"number_one\": {\n \"type\": \"integer\"\n },\n \"number_two\": {\n \"type\": \"integer\",\n \"coerce\": false\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"number_one\": \"10\" <1>\n}\n\nPUT my_index/_doc/2\n{\n \"number_two\": \"10\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "number_one": {
- "type": "integer"
- },
- "number_two": {
- "type": "integer",
- "coerce": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "number_one": "10"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "number_two": "10"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/coerce.asciidoc",
- "line": 60
- },
- "digest": "dad2db81c728827a782a3fefd3399849",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"index.mapping.coerce\": false\n },\n \"mappings\": {\n \"properties\": {\n \"number_one\": {\n \"type\": \"integer\",\n \"coerce\": true\n },\n \"number_two\": {\n \"type\": \"integer\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"number_one\": \"10\" } <1>\n\nPUT my_index/_doc/2\n{ \"number_two\": \"10\" } <2>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.mapping.coerce": false
- },
- "mappings": {
- "properties": {
- "number_one": {
- "type": "integer",
- "coerce": true
- },
- "number_two": {
- "type": "integer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "number_one": "10"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "number_two": "10"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/copy-to.asciidoc",
- "line": 10
- },
- "digest": "363d200a378f8c3acc6d8a77df42eba7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"first_name\": {\n \"type\": \"text\",\n \"copy_to\": \"full_name\" <1>\n },\n \"last_name\": {\n \"type\": \"text\",\n \"copy_to\": \"full_name\" <1>\n },\n \"full_name\": {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"first_name\": \"John\",\n \"last_name\": \"Smith\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"full_name\": { <2>\n \"query\": \"John Smith\",\n \"operator\": \"and\"\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "first_name": {
- "type": "text",
- "copy_to": "full_name"
- },
- "last_name": {
- "type": "text",
- "copy_to": "full_name"
- },
- "full_name": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "first_name": "John",
- "last_name": "Smith"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "full_name": {
- "query": "John Smith",
- "operator": "and"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/doc-values.asciidoc",
- "line": 25
- },
- "digest": "4e75503583efc222045e0be4430a2863",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"status_code\": { <1>\n \"type\": \"keyword\"\n },\n \"session_id\": { <2>\n \"type\": \"keyword\",\n \"doc_values\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "status_code": {
- "type": "keyword"
- },
- "session_id": {
- "type": "keyword",
- "doc_values": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/dynamic.asciidoc",
- "line": 9
- },
- "digest": "e65e9805b8b17f72616f099e11a5c337",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1 <1>\n{\n \"username\": \"johnsmith\",\n \"name\": {\n \"first\": \"John\",\n \"last\": \"Smith\"\n }\n}\n\nGET my_index/_mapping <2>\n\nPUT my_index/_doc/2 <3>\n{\n \"username\": \"marywhite\",\n \"email\": \"mary@white.com\",\n \"name\": {\n \"first\": \"Mary\",\n \"middle\": \"Alice\",\n \"last\": \"White\"\n }\n}\n\nGET my_index/_mapping <4>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "username": "johnsmith",
- "name": {
- "first": "John",
- "last": "Smith"
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "username": "marywhite",
- "email": "mary@white.com",
- "name": {
- "first": "Mary",
- "middle": "Alice",
- "last": "White"
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/dynamic.asciidoc",
- "line": 60
- },
- "digest": "4b478d9b1231513362d2fa8c766cd0a5",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic\": false, <1>\n \"properties\": {\n \"user\": { <2>\n \"properties\": {\n \"name\": {\n \"type\": \"text\"\n },\n \"social_networks\": { <3>\n \"dynamic\": true,\n \"properties\": {}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic": false,
- "properties": {
- "user": {
- "properties": {
- "name": {
- "type": "text"
- },
- "social_networks": {
- "dynamic": true,
- "properties": {}
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/eager-global-ordinals.asciidoc",
- "line": 53
- },
- "digest": "f7682345a4e36a4c6e553902039a9410",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_mapping\n{\n \"properties\": {\n \"tags\": {\n \"type\": \"keyword\",\n \"eager_global_ordinals\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "tags": {
- "type": "keyword",
- "eager_global_ordinals": true
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/eager-global-ordinals.asciidoc",
- "line": 76
- },
- "digest": "9c9221059c06dd26041a95b93ec9b6df",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_mapping\n{\n \"properties\": {\n \"tags\": {\n \"type\": \"keyword\",\n \"eager_global_ordinals\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "tags": {
- "type": "keyword",
- "eager_global_ordinals": false
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/enabled.asciidoc",
- "line": 17
- },
- "digest": "b0b00ab5b673d747d36deabbc4359859",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"user_id\": {\n \"type\": \"keyword\"\n },\n \"last_updated\": {\n \"type\": \"date\"\n },\n \"session_data\": { <1>\n \"type\": \"object\",\n \"enabled\": false\n }\n }\n }\n}\n\nPUT my_index/_doc/session_1\n{\n \"user_id\": \"kimchy\",\n \"session_data\": { <2>\n \"arbitrary_object\": {\n \"some_array\": [ \"foo\", \"bar\", { \"baz\": 2 } ]\n }\n },\n \"last_updated\": \"2015-12-06T18:20:22\"\n}\n\nPUT my_index/_doc/session_2\n{\n \"user_id\": \"jpountz\",\n \"session_data\": \"none\", <3>\n \"last_updated\": \"2015-12-06T18:22:13\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "keyword"
- },
- "last_updated": {
- "type": "date"
- },
- "session_data": {
- "type": "object",
- "enabled": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/session_1",
- "query": null,
- "body": {
- "user_id": "kimchy",
- "session_data": {
- "arbitrary_object": {
- "some_array": [
- "foo",
- "bar",
- {
- "baz": 2
- }
- ]
- }
- },
- "last_updated": "2015-12-06T18:20:22"
- },
- "params": {
- "index": "my_index",
- "id": "session_1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/session_2",
- "query": null,
- "body": {
- "user_id": "jpountz",
- "session_data": "none",
- "last_updated": "2015-12-06T18:22:13"
- },
- "params": {
- "index": "my_index",
- "id": "session_2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/enabled.asciidoc",
- "line": 64
- },
- "digest": "d31274ad53af4baa23ec3e5000783cbd",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"enabled\": false <1>\n }\n}\n\nPUT my_index/_doc/session_1\n{\n \"user_id\": \"kimchy\",\n \"session_data\": {\n \"arbitrary_object\": {\n \"some_array\": [ \"foo\", \"bar\", { \"baz\": 2 } ]\n }\n },\n \"last_updated\": \"2015-12-06T18:20:22\"\n}\n\nGET my_index/_doc/session_1 <2>\n\nGET my_index/_mapping <3>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "enabled": false
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/session_1",
- "query": null,
- "body": {
- "user_id": "kimchy",
- "session_data": {
- "arbitrary_object": {
- "some_array": [
- "foo",
- "bar",
- {
- "baz": 2
- }
- ]
- }
- },
- "last_updated": "2015-12-06T18:20:22"
- },
- "params": {
- "index": "my_index",
- "id": "session_1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/session_1",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "session_1"
- },
- "api": "get"
- },
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/enabled.asciidoc",
- "line": 99
- },
- "digest": "e93514654ea0c7c9f15cda0eed61a292",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"session_data\": {\n \"type\": \"object\",\n \"enabled\": false\n }\n }\n }\n}\n\nPUT my_index/_doc/session_1\n{\n \"session_data\": \"foo bar\" <1>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "session_data": {
- "type": "object",
- "enabled": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/session_1",
- "query": null,
- "body": {
- "session_data": "foo bar"
- },
- "params": {
- "index": "my_index",
- "id": "session_1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/fielddata.asciidoc",
- "line": 56
- },
- "digest": "ef9111c1648d7820925f12e07d1346c5",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_field\": { <1>\n \"type\": \"text\",\n \"fields\": {\n \"keyword\": { <2>\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_field": {
- "type": "text",
- "fields": {
- "keyword": {
- "type": "keyword"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/fielddata.asciidoc",
- "line": 84
- },
- "digest": "a7c15fe6b5779c84ce9a34bf4b2a7ab7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_mapping\n{\n \"properties\": {\n \"my_field\": { <1>\n \"type\": \"text\",\n \"fielddata\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "my_field": {
- "type": "text",
- "fielddata": true
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/fielddata.asciidoc",
- "line": 117
- },
- "digest": "6a81d00f0d73bc5985e76b3cadab645e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"tag\": {\n \"type\": \"text\",\n \"fielddata\": true,\n \"fielddata_frequency_filter\": {\n \"min\": 0.001,\n \"max\": 0.1,\n \"min_segment_size\": 500\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "tag": {
- "type": "text",
- "fielddata": true,
- "fielddata_frequency_filter": {
- "min": 0.001,
- "max": 0.1,
- "min_segment_size": 500
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/format.asciidoc",
- "line": 13
- },
- "digest": "7f465b7e8ed42df6c42251b4481e699e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date\",\n \"format\": \"yyyy-MM-dd\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "date": {
- "type": "date",
- "format": "yyyy-MM-dd"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/ignore-above.asciidoc",
- "line": 10
- },
- "digest": "17a77b9c39526c865d7bd6b72cf4a79f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\",\n \"ignore_above\": 20 <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1 <2>\n{\n \"message\": \"Syntax error\"\n}\n\nPUT my_index/_doc/2 <3>\n{\n \"message\": \"Syntax error with some long stacktrace\"\n}\n\nGET my_index/_search <4>\n{\n \"aggs\": {\n \"messages\": {\n \"terms\": {\n \"field\": \"message\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "message": {
- "type": "keyword",
- "ignore_above": 20
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "message": "Syntax error"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "message": "Syntax error with some long stacktrace"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "aggs": {
- "messages": {
- "terms": {
- "field": "message"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/ignore-malformed.asciidoc",
- "line": 16
- },
- "digest": "56af112ba65955f3ca5ef61a199c0daa",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"number_one\": {\n \"type\": \"integer\",\n \"ignore_malformed\": true\n },\n \"number_two\": {\n \"type\": \"integer\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Some text value\",\n \"number_one\": \"foo\" <1>\n}\n\nPUT my_index/_doc/2\n{\n \"text\": \"Some text value\",\n \"number_two\": \"foo\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "number_one": {
- "type": "integer",
- "ignore_malformed": true
- },
- "number_two": {
- "type": "integer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Some text value",
- "number_one": "foo"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "text": "Some text value",
- "number_two": "foo"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/ignore-malformed.asciidoc",
- "line": 69
- },
- "digest": "835faff0d2e8874b7b9693376fa7fc57",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"index.mapping.ignore_malformed\": true <1>\n },\n \"mappings\": {\n \"properties\": {\n \"number_one\": { <1>\n \"type\": \"byte\"\n },\n \"number_two\": {\n \"type\": \"integer\",\n \"ignore_malformed\": false <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.mapping.ignore_malformed": true
- },
- "mappings": {
- "properties": {
- "number_one": {
- "type": "byte"
- },
- "number_two": {
- "type": "integer",
- "ignore_malformed": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/index-options.asciidoc",
- "line": 37
- },
- "digest": "3a24ebb542f657420fcd8fdf3f757ce6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"index_options\": \"offsets\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Quick brown fox\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"text\": \"brown fox\"\n }\n },\n \"highlight\": {\n \"fields\": {\n \"text\": {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "index_options": "offsets"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Quick brown fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "text": "brown fox"
- }
- },
- "highlight": {
- "fields": {
- "text": {}
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/index-prefixes.asciidoc",
- "line": 21
- },
- "digest": "ff5d15a265855b1c11cb20ceef6a1b58",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"body_text\": {\n \"type\": \"text\",\n \"index_prefixes\": { } <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "body_text": {
- "type": "text",
- "index_prefixes": {}
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/index-prefixes.asciidoc",
- "line": 41
- },
- "digest": "b19ec4a20c19082e5c40e3b1f28bfbcb",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"full_name\": {\n \"type\": \"text\",\n \"index_prefixes\": {\n \"min_chars\" : 1,\n \"max_chars\" : 10\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "full_name": {
- "type": "text",
- "index_prefixes": {
- "min_chars": 1,
- "max_chars": 10
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/meta.asciidoc",
- "line": 9
- },
- "digest": "bb49cbbeef6afe2dae0db46c4a10df3b",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"latency\": {\n \"type\": \"long\",\n \"meta\": {\n \"unit\": \"ms\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "latency": {
- "type": "long",
- "meta": {
- "unit": "ms"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/multi-fields.asciidoc",
- "line": 10
- },
- "digest": "5271f4ff29bb48838396e5a674664ee0",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"city\": {\n \"type\": \"text\",\n \"fields\": {\n \"raw\": { <1>\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"city\": \"New York\"\n}\n\nPUT my_index/_doc/2\n{\n \"city\": \"York\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"city\": \"york\" <2>\n }\n },\n \"sort\": {\n \"city.raw\": \"asc\" <3>\n },\n \"aggs\": {\n \"Cities\": {\n \"terms\": {\n \"field\": \"city.raw\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "city": {
- "type": "text",
- "fields": {
- "raw": {
- "type": "keyword"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "city": "New York"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "city": "York"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "city": "york"
- }
- },
- "sort": {
- "city.raw": "asc"
- },
- "aggs": {
- "Cities": {
- "terms": {
- "field": "city.raw"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/multi-fields.asciidoc",
- "line": 75
- },
- "digest": "fc8097bdfb6f3a4017bf4186ccca8a84",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"text\": { <1>\n \"type\": \"text\",\n \"fields\": {\n \"english\": { <2>\n \"type\": \"text\",\n \"analyzer\": \"english\"\n }\n }\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"text\": \"quick brown fox\" } <3>\n\nPUT my_index/_doc/2\n{ \"text\": \"quick brown foxes\" } <3>\n\nGET my_index/_search\n{\n \"query\": {\n \"multi_match\": {\n \"query\": \"quick brown foxes\",\n \"fields\": [ <4>\n \"text\",\n \"text.english\"\n ],\n \"type\": \"most_fields\" <4>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "fields": {
- "english": {
- "type": "text",
- "analyzer": "english"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "quick brown fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "text": "quick brown foxes"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "quick brown foxes",
- "fields": [
- "text",
- "text.english"
- ],
- "type": "most_fields"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/normalizer.asciidoc",
- "line": 14
- },
- "digest": "4cd40113e0fc90c37976f28d7e4a2327",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"settings\": {\n \"analysis\": {\n \"normalizer\": {\n \"my_normalizer\": {\n \"type\": \"custom\",\n \"char_filter\": [],\n \"filter\": [\"lowercase\", \"asciifolding\"]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\",\n \"normalizer\": \"my_normalizer\"\n }\n }\n }\n}\n\nPUT index/_doc/1\n{\n \"foo\": \"BÀR\"\n}\n\nPUT index/_doc/2\n{\n \"foo\": \"bar\"\n}\n\nPUT index/_doc/3\n{\n \"foo\": \"baz\"\n}\n\nPOST index/_refresh\n\nGET index/_search\n{\n \"query\": {\n \"term\": {\n \"foo\": \"BAR\"\n }\n }\n}\n\nGET index/_search\n{\n \"query\": {\n \"match\": {\n \"foo\": \"BAR\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "normalizer": {
- "my_normalizer": {
- "type": "custom",
- "char_filter": [],
- "filter": [
- "lowercase",
- "asciifolding"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "foo": {
- "type": "keyword",
- "normalizer": "my_normalizer"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "foo": "BÀR"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/2",
- "query": null,
- "body": {
- "foo": "bar"
- },
- "params": {
- "index": "index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/3",
- "query": null,
- "body": {
- "foo": "baz"
- },
- "params": {
- "index": "index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.refresh"
- },
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "foo": "BAR"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "foo": "BAR"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/normalizer.asciidoc",
- "line": 78
- },
- "digest": "3088eb56d501a35ffbd654bc1016dbe2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": $body.took,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 2,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.4700036,\n \"hits\": [\n {\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 0.4700036,\n \"_source\": {\n \"foo\": \"BÀR\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"2\",\n \"_score\": 0.4700036,\n \"_source\": {\n \"foo\": \"bar\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/params/normalizer.asciidoc",
- "line": 121
- },
- "digest": "6f842819c50e8490080dd085e0c6aca3",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"foo_terms\": {\n \"terms\": {\n \"field\": \"foo\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "foo_terms": {
- "terms": {
- "field": "foo"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/normalizer.asciidoc",
- "line": 139
- },
- "digest": "c962116c8a4852673ef22e6d05659e9b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 43,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": []\n },\n \"aggregations\": {\n \"foo_terms\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"bar\",\n \"doc_count\": 2\n },\n {\n \"key\": \"baz\",\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/params/norms.asciidoc",
- "line": 21
- },
- "digest": "f9d15004aba50331c595837c4546aeef",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_mapping\n{\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"norms\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "title": {
- "type": "text",
- "norms": false
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/null-value.asciidoc",
- "line": 12
- },
- "digest": "463e64093c0dfba910eb5b248085584f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"status_code\": {\n \"type\": \"keyword\",\n \"null_value\": \"NULL\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"status_code\": null\n}\n\nPUT my_index/_doc/2\n{\n \"status_code\": [] <2>\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"status_code\": \"NULL\" <3>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "status_code": {
- "type": "keyword",
- "null_value": "NULL"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "status_code": null
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "status_code": []
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "status_code": "NULL"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/position-increment-gap.asciidoc",
- "line": 15
- },
- "digest": "5e17abef396d757d65edf81dff5701b6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"names\": [ \"John Abraham\", \"Lincoln Smith\"]\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match_phrase\": {\n \"names\": {\n \"query\": \"Abraham Lincoln\" <1>\n }\n }\n }\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match_phrase\": {\n \"names\": {\n \"query\": \"Abraham Lincoln\",\n \"slop\": 101 <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "names": [
- "John Abraham",
- "Lincoln Smith"
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "names": {
- "query": "Abraham Lincoln"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "names": {
- "query": "Abraham Lincoln",
- "slop": 101
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/position-increment-gap.asciidoc",
- "line": 53
- },
- "digest": "a37ed1648f68b69e2ea467b38ce21ffc",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"names\": {\n \"type\": \"text\",\n \"position_increment_gap\": 0 <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"names\": [ \"John Abraham\", \"Lincoln Smith\"]\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match_phrase\": {\n \"names\": \"Abraham Lincoln\" <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "names": {
- "type": "text",
- "position_increment_gap": 0
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "names": [
- "John Abraham",
- "Lincoln Smith"
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "names": "Abraham Lincoln"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/properties.asciidoc",
- "line": 17
- },
- "digest": "241df3bb0c16b4bd53ee569a45539184",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": { <1>\n \"manager\": {\n \"properties\": { <2>\n \"age\": { \"type\": \"integer\" },\n \"name\": { \"type\": \"text\" }\n }\n },\n \"employees\": {\n \"type\": \"nested\",\n \"properties\": { <3>\n \"age\": { \"type\": \"integer\" },\n \"name\": { \"type\": \"text\" }\n }\n }\n }\n }\n}\n\nPUT my_index/_doc/1 <4>\n{\n \"region\": \"US\",\n \"manager\": {\n \"name\": \"Alice White\",\n \"age\": 30\n },\n \"employees\": [\n {\n \"name\": \"John Smith\",\n \"age\": 34\n },\n {\n \"name\": \"Peter Brown\",\n \"age\": 26\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "manager": {
- "properties": {
- "age": {
- "type": "integer"
- },
- "name": {
- "type": "text"
- }
- }
- },
- "employees": {
- "type": "nested",
- "properties": {
- "age": {
- "type": "integer"
- },
- "name": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "region": "US",
- "manager": {
- "name": "Alice White",
- "age": 30
- },
- "employees": [
- {
- "name": "John Smith",
- "age": 34
- },
- {
- "name": "Peter Brown",
- "age": 26
- }
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/properties.asciidoc",
- "line": 74
- },
- "digest": "7f21b09b9306a03491ddcf0355f33860",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"manager.name\": \"Alice White\"\n }\n },\n \"aggs\": {\n \"Employees\": {\n \"nested\": {\n \"path\": \"employees\"\n },\n \"aggs\": {\n \"Employee Ages\": {\n \"histogram\": {\n \"field\": \"employees.age\",\n \"interval\": 5\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "manager.name": "Alice White"
- }
- },
- "aggs": {
- "Employees": {
- "nested": {
- "path": "employees"
- },
- "aggs": {
- "Employee Ages": {
- "histogram": {
- "field": "employees.age",
- "interval": 5
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/search-analyzer.asciidoc",
- "line": 16
- },
- "digest": "60677e5144fed659e8417b7fa9964285",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"autocomplete_filter\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 1,\n \"max_gram\": 20\n }\n },\n \"analyzer\": {\n \"autocomplete\": { <1>\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"autocomplete_filter\"\n ]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"analyzer\": \"autocomplete\", <2>\n \"search_analyzer\": \"standard\" <2>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Quick Brown Fox\" <3>\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"text\": {\n \"query\": \"Quick Br\", <4>\n \"operator\": \"and\"\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "autocomplete_filter": {
- "type": "edge_ngram",
- "min_gram": 1,
- "max_gram": 20
- }
- },
- "analyzer": {
- "autocomplete": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "autocomplete_filter"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "analyzer": "autocomplete",
- "search_analyzer": "standard"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Quick Brown Fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "text": {
- "query": "Quick Br",
- "operator": "and"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/similarity.asciidoc",
- "line": 33
- },
- "digest": "e6e31dcdd1ca214c17e375c54069d513",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"default_field\": { <1>\n \"type\": \"text\"\n },\n \"boolean_sim_field\": {\n \"type\": \"text\",\n \"similarity\": \"boolean\" <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "default_field": {
- "type": "text"
- },
- "boolean_sim_field": {
- "type": "text",
- "similarity": "boolean"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/store.asciidoc",
- "line": 20
- },
- "digest": "ff26214b3981f7418688e4c8905d5068",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"store\": true <1>\n },\n \"date\": {\n \"type\": \"date\",\n \"store\": true <1>\n },\n \"content\": {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"title\": \"Some short title\",\n \"date\": \"2015-01-01\",\n \"content\": \"A very long content field...\"\n}\n\nGET my_index/_search\n{\n \"stored_fields\": [ \"title\", \"date\" ] <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "store": true
- },
- "date": {
- "type": "date",
- "store": true
- },
- "content": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "title": "Some short title",
- "date": "2015-01-01",
- "content": "A very long content field..."
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "stored_fields": [
- "title",
- "date"
- ]
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/term-vector.asciidoc",
- "line": 35
- },
- "digest": "325ce39f81c442a5447ce0ede550c44a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"term_vector\": \"with_positions_offsets\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Quick brown fox\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"text\": \"brown fox\"\n }\n },\n \"highlight\": {\n \"fields\": {\n \"text\": {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "term_vector": "with_positions_offsets"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Quick brown fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "text": "brown fox"
- }
- },
- "highlight": {
- "fields": {
- "text": {}
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic-mapping.asciidoc",
- "line": 11
- },
- "digest": "61c49cee90c6aa0eafbdd5cc03936e7d",
- "lang": "console",
- "found": [],
- "source": "PUT data/_doc/1 <1>\n{ \"count\": 5 }",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/data/_doc/1",
- "query": null,
- "body": {
- "count": 5
- },
- "params": {
- "index": "data",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/field-mapping.asciidoc",
- "line": 50
- },
- "digest": "4909bf2f9e86b4bdd6af1d0b13c0015d",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index/_doc/1\n{\n \"create_date\": \"2015/09/02\"\n}\n\nGET my_index/_mapping <1>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "create_date": "2015/09/02"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/field-mapping.asciidoc",
- "line": 68
- },
- "digest": "95fa846e5d0a75210f9ad1fa1acfa8f3",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"date_detection\": false\n }\n}\n\nPUT my_index/_doc/1 <1>\n{\n \"create\": \"2015/09/02\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "date_detection": false
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "create": "2015/09/02"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/field-mapping.asciidoc",
- "line": 90
- },
- "digest": "4eae628c9aaa259f80711c6e9cc6fd25",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_date_formats\": [\"MM/dd/yyyy\"]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"create_date\": \"09/25/2015\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_date_formats": [
- "MM/dd/yyyy"
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "create_date": "09/25/2015"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/field-mapping.asciidoc",
- "line": 115
- },
- "digest": "fa3cd4ffaec8273656a328ae29f32c65",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"numeric_detection\": true\n }\n}\n\nPUT my_index/_doc/1\n{\n \"my_float\": \"1.0\", <1>\n \"my_integer\": \"1\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "numeric_detection": true
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_float": "1.0",
- "my_integer": "1"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 71
- },
- "digest": "bb33e638fdeded7d721d9bbac2305fda",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"integers\": {\n \"match_mapping_type\": \"long\",\n \"mapping\": {\n \"type\": \"integer\"\n }\n }\n },\n {\n \"strings\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"text\",\n \"fields\": {\n \"raw\": {\n \"type\": \"keyword\",\n \"ignore_above\": 256\n }\n }\n }\n }\n }\n ]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"my_integer\": 5, <1>\n \"my_string\": \"Some string\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "integers": {
- "match_mapping_type": "long",
- "mapping": {
- "type": "integer"
- }
- }
- },
- {
- "strings": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "text",
- "fields": {
- "raw": {
- "type": "keyword",
- "ignore_above": 256
- }
- }
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_integer": 5,
- "my_string": "Some string"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 125
- },
- "digest": "4f54b88e05c7a62901062e9e0ed13e5a",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"longs_as_strings\": {\n \"match_mapping_type\": \"string\",\n \"match\": \"long_*\",\n \"unmatch\": \"*_text\",\n \"mapping\": {\n \"type\": \"long\"\n }\n }\n }\n ]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"long_num\": \"5\", <1>\n \"long_text\": \"foo\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "longs_as_strings": {
- "match_mapping_type": "string",
- "match": "long_*",
- "unmatch": "*_text",
- "mapping": {
- "type": "long"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "long_num": "5",
- "long_text": "foo"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 179
- },
- "digest": "0b91c082258ce623cc716b679aace653",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"full_name\": {\n \"path_match\": \"name.*\",\n \"path_unmatch\": \"*.middle\",\n \"mapping\": {\n \"type\": \"text\",\n \"copy_to\": \"full_name\"\n }\n }\n }\n ]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"name\": {\n \"first\": \"John\",\n \"middle\": \"Winston\",\n \"last\": \"Lennon\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "full_name": {
- "path_match": "name.*",
- "path_unmatch": "*.middle",
- "mapping": {
- "type": "text",
- "copy_to": "full_name"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "name": {
- "first": "John",
- "middle": "Winston",
- "last": "Lennon"
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 214
- },
- "digest": "be51ed37c8425d281a8153abe56b04cb",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index/_doc/2\n{\n \"name\": {\n \"first\": \"Paul\",\n \"last\": \"McCartney\",\n \"title\": {\n \"value\": \"Sir\",\n \"category\": \"order of chivalry\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "name": {
- "first": "Paul",
- "last": "McCartney",
- "title": {
- "value": "Sir",
- "category": "order of chivalry"
- }
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 239
- },
- "digest": "6873971eb4e4577d76d0a5bd7cd15ef9",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"named_analyzers\": {\n \"match_mapping_type\": \"string\",\n \"match\": \"*\",\n \"mapping\": {\n \"type\": \"text\",\n \"analyzer\": \"{name}\"\n }\n }\n },\n {\n \"no_doc_values\": {\n \"match_mapping_type\":\"*\",\n \"mapping\": {\n \"type\": \"{dynamic_type}\",\n \"doc_values\": false\n }\n }\n }\n ]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"english\": \"Some English text\", <1>\n \"count\": 5 <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "named_analyzers": {
- "match_mapping_type": "string",
- "match": "*",
- "mapping": {
- "type": "text",
- "analyzer": "{name}"
- }
- }
- },
- {
- "no_doc_values": {
- "match_mapping_type": "*",
- "mapping": {
- "type": "{dynamic_type}",
- "doc_values": false
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "english": "Some English text",
- "count": 5
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 291
- },
- "digest": "87f85bb49d18f73d0eed0b704e05eb90",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"strings_as_keywords\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"keyword\"\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "strings_as_keywords": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "keyword"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 319
- },
- "digest": "1a59fa2708ccb3a24c71e8306b81f17f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"strings_as_text\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"text\"\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "strings_as_text": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "text"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 344
- },
- "digest": "3e60c0b29bd3931927e6f2ee7d2ed0ef",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"strings_as_keywords\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"text\",\n \"norms\": false,\n \"fields\": {\n \"keyword\": {\n \"type\": \"keyword\",\n \"ignore_above\": 256\n }\n }\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "strings_as_keywords": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "text",
- "norms": false,
- "fields": {
- "keyword": {
- "type": "keyword",
- "ignore_above": 256
- }
- }
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 382
- },
- "digest": "9a91f7d0bf52d6c582c62daef5c9d040",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"unindexed_longs\": {\n \"match_mapping_type\": \"long\",\n \"mapping\": {\n \"type\": \"long\",\n \"index\": false\n }\n }\n },\n {\n \"unindexed_doubles\": {\n \"match_mapping_type\": \"double\",\n \"mapping\": {\n \"type\": \"float\", <1>\n \"index\": false\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "unindexed_longs": {
- "match_mapping_type": "long",
- "mapping": {
- "type": "long",
- "index": false
- }
- }
- },
- {
- "unindexed_doubles": {
- "match_mapping_type": "double",
- "mapping": {
- "type": "float",
- "index": false
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 9
- },
- "digest": "035a7a919eb6513b4769a3727b7d6447",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"whitespace\",\n \"text\": \"The quick brown fox.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "whitespace",
- "text": "The quick brown fox."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 20
- },
- "digest": "849718cd9322ec336d1805137eac05cd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"The\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0\n },\n {\n \"token\": \"quick\",\n \"start_offset\": 4,\n \"end_offset\": 9,\n \"type\": \"word\",\n \"position\": 1\n },\n {\n \"token\": \"brown\",\n \"start_offset\": 10,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2\n },\n {\n \"token\": \"fox.\",\n \"start_offset\": 16,\n \"end_offset\": 20,\n \"type\": \"word\",\n \"position\": 3\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 62
- },
- "digest": "f7ec9062b3a7578fed55f119d7c22b74",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [ \"lowercase\", \"asciifolding\" ],\n \"text\": \"Is this déja vu?\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "asciifolding"
- ],
- "text": "Is this déja vu?"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 74
- },
- "digest": "2c5b97ad9e616d74cf8ac8f4bbe664a8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"is\",\n \"start_offset\": 0,\n \"end_offset\": 2,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"this\",\n \"start_offset\": 3,\n \"end_offset\": 7,\n \"type\": \"\",\n \"position\": 1\n },\n {\n \"token\": \"deja\",\n \"start_offset\": 8,\n \"end_offset\": 12,\n \"type\": \"\",\n \"position\": 2\n },\n {\n \"token\": \"vu\",\n \"start_offset\": 13,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 3\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 125
- },
- "digest": "acebf0b821acfbd6089f71e0359a56d3",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"std_folded\": { <1>\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"asciifolding\"\n ]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"my_text\": {\n \"type\": \"text\",\n \"analyzer\": \"std_folded\" <2>\n }\n }\n }\n}\n\nGET my_index/_analyze <3>\n{\n \"analyzer\": \"std_folded\", <4>\n \"text\": \"Is this déjà vu?\"\n}\n\nGET my_index/_analyze <3>\n{\n \"field\": \"my_text\", <5>\n \"text\": \"Is this déjà vu?\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "std_folded": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "asciifolding"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "my_text": {
- "type": "text",
- "analyzer": "std_folded"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "GET",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "std_folded",
- "text": "Is this déjà vu?"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- },
- {
- "method": "GET",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "field": "my_text",
- "text": "Is this déjà vu?"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 168
- },
- "digest": "2c5b97ad9e616d74cf8ac8f4bbe664a8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"is\",\n \"start_offset\": 0,\n \"end_offset\": 2,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"this\",\n \"start_offset\": 3,\n \"end_offset\": 7,\n \"type\": \"\",\n \"position\": 1\n },\n {\n \"token\": \"deja\",\n \"start_offset\": 8,\n \"end_offset\": 12,\n \"type\": \"\",\n \"position\": 2\n },\n {\n \"token\": \"vu\",\n \"start_offset\": 13,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 3\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/analyzers/configuring.asciidoc",
- "line": 10
- },
- "digest": "98fa08f638178692476abcae1ac8ce5a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"std_english\": { <1>\n \"type\": \"standard\",\n \"stopwords\": \"_english_\"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"my_text\": {\n \"type\": \"text\",\n \"analyzer\": \"standard\", <2>\n \"fields\": {\n \"english\": {\n \"type\": \"text\",\n \"analyzer\": \"std_english\" <3>\n }\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"field\": \"my_text\", <2>\n \"text\": \"The old brown cow\"\n}\n\nPOST my_index/_analyze\n{\n \"field\": \"my_text.english\", <3>\n \"text\": \"The old brown cow\"\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "std_english": {
- "type": "standard",
- "stopwords": "_english_"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "my_text": {
- "type": "text",
- "analyzer": "standard",
- "fields": {
- "english": {
- "type": "text",
- "analyzer": "std_english"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "field": "my_text",
- "text": "The old brown cow"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "field": "my_text.english",
- "text": "The old brown cow"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/custom-analyzer.asciidoc",
- "line": 55
- },
- "digest": "81db5fb0ea5b942204f4ba27b7ae836a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_custom_analyzer\": {\n \"type\": \"custom\", <1>\n \"tokenizer\": \"standard\",\n \"char_filter\": [\n \"html_strip\"\n ],\n \"filter\": [\n \"lowercase\",\n \"asciifolding\"\n ]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_custom_analyzer\",\n \"text\": \"Is this déjà vu?\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_custom_analyzer": {
- "type": "custom",
- "tokenizer": "standard",
- "char_filter": [
- "html_strip"
- ],
- "filter": [
- "lowercase",
- "asciifolding"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_custom_analyzer",
- "text": "Is this déjà vu?"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/custom-analyzer.asciidoc",
- "line": 157
- },
- "digest": "8fb13998654631659f998e35922bcde6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_custom_analyzer\": { <1>\n \"type\": \"custom\",\n \"char_filter\": [\n \"emoticons\"\n ],\n \"tokenizer\": \"punctuation\",\n \"filter\": [\n \"lowercase\",\n \"english_stop\"\n ]\n }\n },\n \"tokenizer\": {\n \"punctuation\": { <2>\n \"type\": \"pattern\",\n \"pattern\": \"[ .,!?]\"\n }\n },\n \"char_filter\": {\n \"emoticons\": { <3>\n \"type\": \"mapping\",\n \"mappings\": [\n \":) => _happy_\",\n \":( => _sad_\"\n ]\n }\n },\n \"filter\": {\n \"english_stop\": { <4>\n \"type\": \"stop\",\n \"stopwords\": \"_english_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_custom_analyzer\",\n \"text\": \"I'm a :) person, and you?\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_custom_analyzer": {
- "type": "custom",
- "char_filter": [
- "emoticons"
- ],
- "tokenizer": "punctuation",
- "filter": [
- "lowercase",
- "english_stop"
- ]
- }
- },
- "tokenizer": {
- "punctuation": {
- "type": "pattern",
- "pattern": "[ .,!?]"
- }
- },
- "char_filter": {
- "emoticons": {
- "type": "mapping",
- "mappings": [
- ":) => _happy_",
- ":( => _sad_"
- ]
- }
- },
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": "_english_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_custom_analyzer",
- "text": "I'm a :) person, and you?"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 50
- },
- "digest": "311c6e60a020df4e301c6db9bcaf9e0a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"analyzer\": \"whitespace\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "analyzer": "whitespace"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 74
- },
- "digest": "7b2c75b4f6150485593c49f96f05fb2f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"type\": \"simple\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "type": "simple"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 130
- },
- "digest": "040e4b4d0119e4cc94eafb9db91baae5",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"message\": {\n \"query\": \"Quick foxes\",\n \"analyzer\": \"stop\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "Quick foxes",
- "analyzer": "stop"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 158
- },
- "digest": "8870b188fd9471b853f03cbc2a312261",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"analyzer\": \"whitespace\",\n \"search_analyzer\": \"simple\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "analyzer": "whitespace",
- "search_analyzer": "simple"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 186
- },
- "digest": "77c1e9a95f91229bc3f4ede13af97d34",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"type\": \"simple\"\n },\n \"default_search\": {\n \"type\": \"whitespace\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "type": "simple"
- },
- "default_search": {
- "type": "whitespace"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/fingerprint-analyzer.asciidoc",
- "line": 16
- },
- "digest": "6490d89a4e43cac5e6b9bc19840d5478",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"fingerprint\",\n \"text\": \"Yes yes, Gödel said this sentence is consistent and.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "fingerprint",
- "text": "Yes yes, Gödel said this sentence is consistent and."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/fingerprint-analyzer.asciidoc",
- "line": 86
- },
- "digest": "2659ccd414867f3a5ee262c9b7cd3f1d",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_fingerprint_analyzer\": {\n \"type\": \"fingerprint\",\n \"stopwords\": \"_english_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_fingerprint_analyzer\",\n \"text\": \"Yes yes, Gödel said this sentence is consistent and.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_fingerprint_analyzer": {
- "type": "fingerprint",
- "stopwords": "_english_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_fingerprint_analyzer",
- "text": "Yes yes, Gödel said this sentence is consistent and."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/fingerprint-analyzer.asciidoc",
- "line": 156
- },
- "digest": "ce725697f93b3eebb3a266314568565a",
- "lang": "console",
- "found": [],
- "source": "PUT /fingerprint_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"rebuilt_fingerprint\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"asciifolding\",\n \"fingerprint\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/fingerprint_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "rebuilt_fingerprint": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "asciifolding",
- "fingerprint"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "fingerprint_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/keyword-analyzer.asciidoc",
- "line": 11
- },
- "digest": "19ee488226d357d1576e7d3ae7a4693f",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"keyword\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "keyword",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/keyword-analyzer.asciidoc",
- "line": 68
- },
- "digest": "c1efc5cfcb3c29711bfe118f1baa28b0",
- "lang": "console",
- "found": [],
- "source": "PUT /keyword_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"rebuilt_keyword\": {\n \"tokenizer\": \"keyword\",\n \"filter\": [ <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/keyword_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "rebuilt_keyword": {
- "tokenizer": "keyword",
- "filter": []
- }
- }
- }
- }
- },
- "params": {
- "index": "keyword_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 81
- },
- "digest": "137c62a4443bdd7d5b95a15022a9dc30",
- "lang": "console",
- "found": [],
- "source": "PUT /arabic_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"arabic_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_arabic_\" <1>\n },\n \"arabic_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"مثال\"] <2>\n },\n \"arabic_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"arabic\"\n }\n },\n \"analyzer\": {\n \"rebuilt_arabic\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"arabic_stop\",\n \"arabic_normalization\",\n \"arabic_keywords\",\n \"arabic_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/arabic_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "arabic_stop": {
- "type": "stop",
- "stopwords": "_arabic_"
- },
- "arabic_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "مثال"
- ]
- },
- "arabic_stemmer": {
- "type": "stemmer",
- "language": "arabic"
- }
- },
- "analyzer": {
- "rebuilt_arabic": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "decimal_digit",
- "arabic_stop",
- "arabic_normalization",
- "arabic_keywords",
- "arabic_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "arabic_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 131
- },
- "digest": "f7dc2fed08e57abda2c3e8a14f8eb098",
- "lang": "console",
- "found": [],
- "source": "PUT /armenian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"armenian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_armenian_\" <1>\n },\n \"armenian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"օրինակ\"] <2>\n },\n \"armenian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"armenian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_armenian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"armenian_stop\",\n \"armenian_keywords\",\n \"armenian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/armenian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "armenian_stop": {
- "type": "stop",
- "stopwords": "_armenian_"
- },
- "armenian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "օրինակ"
- ]
- },
- "armenian_stemmer": {
- "type": "stemmer",
- "language": "armenian"
- }
- },
- "analyzer": {
- "rebuilt_armenian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "armenian_stop",
- "armenian_keywords",
- "armenian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "armenian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 179
- },
- "digest": "01f50acf7998b24969f451e922d145eb",
- "lang": "console",
- "found": [],
- "source": "PUT /basque_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"basque_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_basque_\" <1>\n },\n \"basque_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"Adibidez\"] <2>\n },\n \"basque_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"basque\"\n }\n },\n \"analyzer\": {\n \"rebuilt_basque\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"basque_stop\",\n \"basque_keywords\",\n \"basque_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/basque_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "basque_stop": {
- "type": "stop",
- "stopwords": "_basque_"
- },
- "basque_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "Adibidez"
- ]
- },
- "basque_stemmer": {
- "type": "stemmer",
- "language": "basque"
- }
- },
- "analyzer": {
- "rebuilt_basque": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "basque_stop",
- "basque_keywords",
- "basque_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "basque_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 227
- },
- "digest": "496d35c89dc991a1509f7e8fb93ade45",
- "lang": "console",
- "found": [],
- "source": "PUT /bengali_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"bengali_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_bengali_\" <1>\n },\n \"bengali_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"উদাহরণ\"] <2>\n },\n \"bengali_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"bengali\"\n }\n },\n \"analyzer\": {\n \"rebuilt_bengali\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"bengali_keywords\",\n \"indic_normalization\",\n \"bengali_normalization\",\n \"bengali_stop\",\n \"bengali_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/bengali_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "bengali_stop": {
- "type": "stop",
- "stopwords": "_bengali_"
- },
- "bengali_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "উদাহরণ"
- ]
- },
- "bengali_stemmer": {
- "type": "stemmer",
- "language": "bengali"
- }
- },
- "analyzer": {
- "rebuilt_bengali": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "decimal_digit",
- "bengali_keywords",
- "indic_normalization",
- "bengali_normalization",
- "bengali_stop",
- "bengali_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "bengali_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 278
- },
- "digest": "13670d1534125831c2059eebd86d840c",
- "lang": "console",
- "found": [],
- "source": "PUT /brazilian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"brazilian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_brazilian_\" <1>\n },\n \"brazilian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exemplo\"] <2>\n },\n \"brazilian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"brazilian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_brazilian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"brazilian_stop\",\n \"brazilian_keywords\",\n \"brazilian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/brazilian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "brazilian_stop": {
- "type": "stop",
- "stopwords": "_brazilian_"
- },
- "brazilian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exemplo"
- ]
- },
- "brazilian_stemmer": {
- "type": "stemmer",
- "language": "brazilian"
- }
- },
- "analyzer": {
- "rebuilt_brazilian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "brazilian_stop",
- "brazilian_keywords",
- "brazilian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "brazilian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 326
- },
- "digest": "d0378fe5e3aad05a2fd2e6e81213374f",
- "lang": "console",
- "found": [],
- "source": "PUT /bulgarian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"bulgarian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_bulgarian_\" <1>\n },\n \"bulgarian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"пример\"] <2>\n },\n \"bulgarian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"bulgarian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_bulgarian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"bulgarian_stop\",\n \"bulgarian_keywords\",\n \"bulgarian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/bulgarian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "bulgarian_stop": {
- "type": "stop",
- "stopwords": "_bulgarian_"
- },
- "bulgarian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "пример"
- ]
- },
- "bulgarian_stemmer": {
- "type": "stemmer",
- "language": "bulgarian"
- }
- },
- "analyzer": {
- "rebuilt_bulgarian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "bulgarian_stop",
- "bulgarian_keywords",
- "bulgarian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "bulgarian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 374
- },
- "digest": "7ab968a61bb0783f563dd6d29b253901",
- "lang": "console",
- "found": [],
- "source": "PUT /catalan_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"catalan_elision\": {\n \"type\": \"elision\",\n \"articles\": [ \"d\", \"l\", \"m\", \"n\", \"s\", \"t\"],\n \"articles_case\": true\n },\n \"catalan_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_catalan_\" <1>\n },\n \"catalan_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"example\"] <2>\n },\n \"catalan_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"catalan\"\n }\n },\n \"analyzer\": {\n \"rebuilt_catalan\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"catalan_elision\",\n \"lowercase\",\n \"catalan_stop\",\n \"catalan_keywords\",\n \"catalan_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/catalan_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "catalan_elision": {
- "type": "elision",
- "articles": [
- "d",
- "l",
- "m",
- "n",
- "s",
- "t"
- ],
- "articles_case": true
- },
- "catalan_stop": {
- "type": "stop",
- "stopwords": "_catalan_"
- },
- "catalan_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "example"
- ]
- },
- "catalan_stemmer": {
- "type": "stemmer",
- "language": "catalan"
- }
- },
- "analyzer": {
- "rebuilt_catalan": {
- "tokenizer": "standard",
- "filter": [
- "catalan_elision",
- "lowercase",
- "catalan_stop",
- "catalan_keywords",
- "catalan_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "catalan_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 431
- },
- "digest": "d305110a8cabfbebd1e38d85559d1023",
- "lang": "console",
- "found": [],
- "source": "PUT /cjk_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"english_stop\": {\n \"type\": \"stop\",\n \"stopwords\": [ <1>\n \"a\", \"and\", \"are\", \"as\", \"at\", \"be\", \"but\", \"by\", \"for\",\n \"if\", \"in\", \"into\", \"is\", \"it\", \"no\", \"not\", \"of\", \"on\",\n \"or\", \"s\", \"such\", \"t\", \"that\", \"the\", \"their\", \"then\",\n \"there\", \"these\", \"they\", \"this\", \"to\", \"was\", \"will\",\n \"with\", \"www\"\n ]\n }\n },\n \"analyzer\": {\n \"rebuilt_cjk\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"cjk_width\",\n \"lowercase\",\n \"cjk_bigram\",\n \"english_stop\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/cjk_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": [
- "a",
- "and",
- "are",
- "as",
- "at",
- "be",
- "but",
- "by",
- "for",
- "if",
- "in",
- "into",
- "is",
- "it",
- "no",
- "not",
- "of",
- "on",
- "or",
- "s",
- "such",
- "t",
- "that",
- "the",
- "their",
- "then",
- "there",
- "these",
- "they",
- "this",
- "to",
- "was",
- "will",
- "with",
- "www"
- ]
- }
- },
- "analyzer": {
- "rebuilt_cjk": {
- "tokenizer": "standard",
- "filter": [
- "cjk_width",
- "lowercase",
- "cjk_bigram",
- "english_stop"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "cjk_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 477
- },
- "digest": "a28111cdd9b5aaea96c779cbfbf38780",
- "lang": "console",
- "found": [],
- "source": "PUT /czech_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"czech_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_czech_\" <1>\n },\n \"czech_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"příklad\"] <2>\n },\n \"czech_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"czech\"\n }\n },\n \"analyzer\": {\n \"rebuilt_czech\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"czech_stop\",\n \"czech_keywords\",\n \"czech_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/czech_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "czech_stop": {
- "type": "stop",
- "stopwords": "_czech_"
- },
- "czech_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "příklad"
- ]
- },
- "czech_stemmer": {
- "type": "stemmer",
- "language": "czech"
- }
- },
- "analyzer": {
- "rebuilt_czech": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "czech_stop",
- "czech_keywords",
- "czech_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "czech_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 525
- },
- "digest": "ed85ed833bec7286a0dfbe64077c5715",
- "lang": "console",
- "found": [],
- "source": "PUT /danish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"danish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_danish_\" <1>\n },\n \"danish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"eksempel\"] <2>\n },\n \"danish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"danish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_danish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"danish_stop\",\n \"danish_keywords\",\n \"danish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/danish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "danish_stop": {
- "type": "stop",
- "stopwords": "_danish_"
- },
- "danish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "eksempel"
- ]
- },
- "danish_stemmer": {
- "type": "stemmer",
- "language": "danish"
- }
- },
- "analyzer": {
- "rebuilt_danish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "danish_stop",
- "danish_keywords",
- "danish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "danish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 573
- },
- "digest": "10d8b17e73d31dcd907de67327ed78a2",
- "lang": "console",
- "found": [],
- "source": "PUT /dutch_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"dutch_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_dutch_\" <1>\n },\n \"dutch_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"voorbeeld\"] <2>\n },\n \"dutch_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"dutch\"\n },\n \"dutch_override\": {\n \"type\": \"stemmer_override\",\n \"rules\": [\n \"fiets=>fiets\",\n \"bromfiets=>bromfiets\",\n \"ei=>eier\",\n \"kind=>kinder\"\n ]\n }\n },\n \"analyzer\": {\n \"rebuilt_dutch\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"dutch_stop\",\n \"dutch_keywords\",\n \"dutch_override\",\n \"dutch_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/dutch_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "dutch_stop": {
- "type": "stop",
- "stopwords": "_dutch_"
- },
- "dutch_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "voorbeeld"
- ]
- },
- "dutch_stemmer": {
- "type": "stemmer",
- "language": "dutch"
- },
- "dutch_override": {
- "type": "stemmer_override",
- "rules": [
- "fiets=>fiets",
- "bromfiets=>bromfiets",
- "ei=>eier",
- "kind=>kinder"
- ]
- }
- },
- "analyzer": {
- "rebuilt_dutch": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "dutch_stop",
- "dutch_keywords",
- "dutch_override",
- "dutch_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "dutch_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 631
- },
- "digest": "81c7a392efd505b686eed978fb7d9d17",
- "lang": "console",
- "found": [],
- "source": "PUT /english_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"english_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_english_\" <1>\n },\n \"english_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"example\"] <2>\n },\n \"english_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"english\"\n },\n \"english_possessive_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"possessive_english\"\n }\n },\n \"analyzer\": {\n \"rebuilt_english\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"english_possessive_stemmer\",\n \"lowercase\",\n \"english_stop\",\n \"english_keywords\",\n \"english_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/english_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": "_english_"
- },
- "english_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "example"
- ]
- },
- "english_stemmer": {
- "type": "stemmer",
- "language": "english"
- },
- "english_possessive_stemmer": {
- "type": "stemmer",
- "language": "possessive_english"
- }
- },
- "analyzer": {
- "rebuilt_english": {
- "tokenizer": "standard",
- "filter": [
- "english_possessive_stemmer",
- "lowercase",
- "english_stop",
- "english_keywords",
- "english_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "english_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 684
- },
- "digest": "2f4e28c81db47547ad39d0926babab12",
- "lang": "console",
- "found": [],
- "source": "PUT /estonian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"estonian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_estonian_\" <1>\n },\n \"estonian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"näide\"] <2>\n },\n \"estonian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"estonian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_estonian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"estonian_stop\",\n \"estonian_keywords\",\n \"estonian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/estonian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "estonian_stop": {
- "type": "stop",
- "stopwords": "_estonian_"
- },
- "estonian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "näide"
- ]
- },
- "estonian_stemmer": {
- "type": "stemmer",
- "language": "estonian"
- }
- },
- "analyzer": {
- "rebuilt_estonian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "estonian_stop",
- "estonian_keywords",
- "estonian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "estonian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 732
- },
- "digest": "85f0e5e8ab91ceab63c21dbedd9f4037",
- "lang": "console",
- "found": [],
- "source": "PUT /finnish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"finnish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_finnish_\" <1>\n },\n \"finnish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"esimerkki\"] <2>\n },\n \"finnish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"finnish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_finnish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"finnish_stop\",\n \"finnish_keywords\",\n \"finnish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/finnish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "finnish_stop": {
- "type": "stop",
- "stopwords": "_finnish_"
- },
- "finnish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "esimerkki"
- ]
- },
- "finnish_stemmer": {
- "type": "stemmer",
- "language": "finnish"
- }
- },
- "analyzer": {
- "rebuilt_finnish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "finnish_stop",
- "finnish_keywords",
- "finnish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "finnish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 780
- },
- "digest": "f545bb95214769aca993c1632a71ad2c",
- "lang": "console",
- "found": [],
- "source": "PUT /french_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"french_elision\": {\n \"type\": \"elision\",\n \"articles_case\": true,\n \"articles\": [\n \"l\", \"m\", \"t\", \"qu\", \"n\", \"s\",\n \"j\", \"d\", \"c\", \"jusqu\", \"quoiqu\",\n \"lorsqu\", \"puisqu\"\n ]\n },\n \"french_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_french_\" <1>\n },\n \"french_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"Example\"] <2>\n },\n \"french_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_french\"\n }\n },\n \"analyzer\": {\n \"rebuilt_french\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"french_elision\",\n \"lowercase\",\n \"french_stop\",\n \"french_keywords\",\n \"french_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/french_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "french_elision": {
- "type": "elision",
- "articles_case": true,
- "articles": [
- "l",
- "m",
- "t",
- "qu",
- "n",
- "s",
- "j",
- "d",
- "c",
- "jusqu",
- "quoiqu",
- "lorsqu",
- "puisqu"
- ]
- },
- "french_stop": {
- "type": "stop",
- "stopwords": "_french_"
- },
- "french_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "Example"
- ]
- },
- "french_stemmer": {
- "type": "stemmer",
- "language": "light_french"
- }
- },
- "analyzer": {
- "rebuilt_french": {
- "tokenizer": "standard",
- "filter": [
- "french_elision",
- "lowercase",
- "french_stop",
- "french_keywords",
- "french_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "french_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 838
- },
- "digest": "9606c271921cb800d5ea395b16d6ceaf",
- "lang": "console",
- "found": [],
- "source": "PUT /galician_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"galician_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_galician_\" <1>\n },\n \"galician_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exemplo\"] <2>\n },\n \"galician_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"galician\"\n }\n },\n \"analyzer\": {\n \"rebuilt_galician\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"galician_stop\",\n \"galician_keywords\",\n \"galician_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/galician_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "galician_stop": {
- "type": "stop",
- "stopwords": "_galician_"
- },
- "galician_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exemplo"
- ]
- },
- "galician_stemmer": {
- "type": "stemmer",
- "language": "galician"
- }
- },
- "analyzer": {
- "rebuilt_galician": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "galician_stop",
- "galician_keywords",
- "galician_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "galician_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 886
- },
- "digest": "187e8786e0a90f1f6278cf89b670de0a",
- "lang": "console",
- "found": [],
- "source": "PUT /german_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"german_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_german_\" <1>\n },\n \"german_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"Beispiel\"] <2>\n },\n \"german_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_german\"\n }\n },\n \"analyzer\": {\n \"rebuilt_german\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"german_stop\",\n \"german_keywords\",\n \"german_normalization\",\n \"german_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/german_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "german_stop": {
- "type": "stop",
- "stopwords": "_german_"
- },
- "german_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "Beispiel"
- ]
- },
- "german_stemmer": {
- "type": "stemmer",
- "language": "light_german"
- }
- },
- "analyzer": {
- "rebuilt_german": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "german_stop",
- "german_keywords",
- "german_normalization",
- "german_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "german_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 935
- },
- "digest": "1f00e73c144603e97f6c14ab15fa1913",
- "lang": "console",
- "found": [],
- "source": "PUT /greek_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"greek_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_greek_\" <1>\n },\n \"greek_lowercase\": {\n \"type\": \"lowercase\",\n \"language\": \"greek\"\n },\n \"greek_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"παράδειγμα\"] <2>\n },\n \"greek_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"greek\"\n }\n },\n \"analyzer\": {\n \"rebuilt_greek\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"greek_lowercase\",\n \"greek_stop\",\n \"greek_keywords\",\n \"greek_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/greek_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "greek_stop": {
- "type": "stop",
- "stopwords": "_greek_"
- },
- "greek_lowercase": {
- "type": "lowercase",
- "language": "greek"
- },
- "greek_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "παράδειγμα"
- ]
- },
- "greek_stemmer": {
- "type": "stemmer",
- "language": "greek"
- }
- },
- "analyzer": {
- "rebuilt_greek": {
- "tokenizer": "standard",
- "filter": [
- "greek_lowercase",
- "greek_stop",
- "greek_keywords",
- "greek_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "greek_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 987
- },
- "digest": "af00a58d9171d32f6efe52d94e51e526",
- "lang": "console",
- "found": [],
- "source": "PUT /hindi_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"hindi_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_hindi_\" <1>\n },\n \"hindi_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"उदाहरण\"] <2>\n },\n \"hindi_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"hindi\"\n }\n },\n \"analyzer\": {\n \"rebuilt_hindi\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"hindi_keywords\",\n \"indic_normalization\",\n \"hindi_normalization\",\n \"hindi_stop\",\n \"hindi_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/hindi_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "hindi_stop": {
- "type": "stop",
- "stopwords": "_hindi_"
- },
- "hindi_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "उदाहरण"
- ]
- },
- "hindi_stemmer": {
- "type": "stemmer",
- "language": "hindi"
- }
- },
- "analyzer": {
- "rebuilt_hindi": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "decimal_digit",
- "hindi_keywords",
- "indic_normalization",
- "hindi_normalization",
- "hindi_stop",
- "hindi_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "hindi_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1038
- },
- "digest": "84108653e9e03b4edacd878ec870df77",
- "lang": "console",
- "found": [],
- "source": "PUT /hungarian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"hungarian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_hungarian_\" <1>\n },\n \"hungarian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"példa\"] <2>\n },\n \"hungarian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"hungarian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_hungarian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"hungarian_stop\",\n \"hungarian_keywords\",\n \"hungarian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/hungarian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "hungarian_stop": {
- "type": "stop",
- "stopwords": "_hungarian_"
- },
- "hungarian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "példa"
- ]
- },
- "hungarian_stemmer": {
- "type": "stemmer",
- "language": "hungarian"
- }
- },
- "analyzer": {
- "rebuilt_hungarian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "hungarian_stop",
- "hungarian_keywords",
- "hungarian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "hungarian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1087
- },
- "digest": "eb5987b58dae90c3a8a1609410be0570",
- "lang": "console",
- "found": [],
- "source": "PUT /indonesian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"indonesian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_indonesian_\" <1>\n },\n \"indonesian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"contoh\"] <2>\n },\n \"indonesian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"indonesian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_indonesian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"indonesian_stop\",\n \"indonesian_keywords\",\n \"indonesian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/indonesian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "indonesian_stop": {
- "type": "stop",
- "stopwords": "_indonesian_"
- },
- "indonesian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "contoh"
- ]
- },
- "indonesian_stemmer": {
- "type": "stemmer",
- "language": "indonesian"
- }
- },
- "analyzer": {
- "rebuilt_indonesian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "indonesian_stop",
- "indonesian_keywords",
- "indonesian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "indonesian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1135
- },
- "digest": "160f39a50847bad0be4be1529a95e4ce",
- "lang": "console",
- "found": [],
- "source": "PUT /irish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"irish_hyphenation\": {\n \"type\": \"stop\",\n \"stopwords\": [ \"h\", \"n\", \"t\" ],\n \"ignore_case\": true\n },\n \"irish_elision\": {\n \"type\": \"elision\",\n \"articles\": [ \"d\", \"m\", \"b\" ],\n \"articles_case\": true\n },\n \"irish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_irish_\" <1>\n },\n \"irish_lowercase\": {\n \"type\": \"lowercase\",\n \"language\": \"irish\"\n },\n \"irish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"sampla\"] <2>\n },\n \"irish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"irish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_irish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"irish_hyphenation\",\n \"irish_elision\",\n \"irish_lowercase\",\n \"irish_stop\",\n \"irish_keywords\",\n \"irish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/irish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "irish_hyphenation": {
- "type": "stop",
- "stopwords": [
- "h",
- "n",
- "t"
- ],
- "ignore_case": true
- },
- "irish_elision": {
- "type": "elision",
- "articles": [
- "d",
- "m",
- "b"
- ],
- "articles_case": true
- },
- "irish_stop": {
- "type": "stop",
- "stopwords": "_irish_"
- },
- "irish_lowercase": {
- "type": "lowercase",
- "language": "irish"
- },
- "irish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "sampla"
- ]
- },
- "irish_stemmer": {
- "type": "stemmer",
- "language": "irish"
- }
- },
- "analyzer": {
- "rebuilt_irish": {
- "tokenizer": "standard",
- "filter": [
- "irish_hyphenation",
- "irish_elision",
- "irish_lowercase",
- "irish_stop",
- "irish_keywords",
- "irish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "irish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1199
- },
- "digest": "00e0c964c79fcc1876ab957da2ffce82",
- "lang": "console",
- "found": [],
- "source": "PUT /italian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"italian_elision\": {\n \"type\": \"elision\",\n \"articles\": [\n \"c\", \"l\", \"all\", \"dall\", \"dell\",\n \"nell\", \"sull\", \"coll\", \"pell\",\n \"gl\", \"agl\", \"dagl\", \"degl\", \"negl\",\n \"sugl\", \"un\", \"m\", \"t\", \"s\", \"v\", \"d\"\n ],\n \"articles_case\": true\n },\n \"italian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_italian_\" <1>\n },\n \"italian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"esempio\"] <2>\n },\n \"italian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_italian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_italian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"italian_elision\",\n \"lowercase\",\n \"italian_stop\",\n \"italian_keywords\",\n \"italian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/italian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "italian_elision": {
- "type": "elision",
- "articles": [
- "c",
- "l",
- "all",
- "dall",
- "dell",
- "nell",
- "sull",
- "coll",
- "pell",
- "gl",
- "agl",
- "dagl",
- "degl",
- "negl",
- "sugl",
- "un",
- "m",
- "t",
- "s",
- "v",
- "d"
- ],
- "articles_case": true
- },
- "italian_stop": {
- "type": "stop",
- "stopwords": "_italian_"
- },
- "italian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "esempio"
- ]
- },
- "italian_stemmer": {
- "type": "stemmer",
- "language": "light_italian"
- }
- },
- "analyzer": {
- "rebuilt_italian": {
- "tokenizer": "standard",
- "filter": [
- "italian_elision",
- "lowercase",
- "italian_stop",
- "italian_keywords",
- "italian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "italian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1258
- },
- "digest": "d983c1ea730eeabac9e914656d7c9be2",
- "lang": "console",
- "found": [],
- "source": "PUT /latvian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"latvian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_latvian_\" <1>\n },\n \"latvian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"piemērs\"] <2>\n },\n \"latvian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"latvian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_latvian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"latvian_stop\",\n \"latvian_keywords\",\n \"latvian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/latvian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "latvian_stop": {
- "type": "stop",
- "stopwords": "_latvian_"
- },
- "latvian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "piemērs"
- ]
- },
- "latvian_stemmer": {
- "type": "stemmer",
- "language": "latvian"
- }
- },
- "analyzer": {
- "rebuilt_latvian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "latvian_stop",
- "latvian_keywords",
- "latvian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "latvian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1306
- },
- "digest": "bb067c049331cc850a77b18bdfff81b5",
- "lang": "console",
- "found": [],
- "source": "PUT /lithuanian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"lithuanian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_lithuanian_\" <1>\n },\n \"lithuanian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"pavyzdys\"] <2>\n },\n \"lithuanian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"lithuanian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_lithuanian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"lithuanian_stop\",\n \"lithuanian_keywords\",\n \"lithuanian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/lithuanian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "lithuanian_stop": {
- "type": "stop",
- "stopwords": "_lithuanian_"
- },
- "lithuanian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "pavyzdys"
- ]
- },
- "lithuanian_stemmer": {
- "type": "stemmer",
- "language": "lithuanian"
- }
- },
- "analyzer": {
- "rebuilt_lithuanian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "lithuanian_stop",
- "lithuanian_keywords",
- "lithuanian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "lithuanian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1354
- },
- "digest": "2731a8577ad734a732d784c5dcb1225d",
- "lang": "console",
- "found": [],
- "source": "PUT /norwegian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"norwegian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_norwegian_\" <1>\n },\n \"norwegian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"eksempel\"] <2>\n },\n \"norwegian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"norwegian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_norwegian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"norwegian_stop\",\n \"norwegian_keywords\",\n \"norwegian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/norwegian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "norwegian_stop": {
- "type": "stop",
- "stopwords": "_norwegian_"
- },
- "norwegian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "eksempel"
- ]
- },
- "norwegian_stemmer": {
- "type": "stemmer",
- "language": "norwegian"
- }
- },
- "analyzer": {
- "rebuilt_norwegian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "norwegian_stop",
- "norwegian_keywords",
- "norwegian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "norwegian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1402
- },
- "digest": "d1a285aa244ec461d68f13e7078a33c0",
- "lang": "console",
- "found": [],
- "source": "PUT /persian_example\n{\n \"settings\": {\n \"analysis\": {\n \"char_filter\": {\n \"zero_width_spaces\": {\n \"type\": \"mapping\",\n \"mappings\": [ \"\\\\u200C=>\\\\u0020\"] <1>\n }\n },\n \"filter\": {\n \"persian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_persian_\" <2>\n }\n },\n \"analyzer\": {\n \"rebuilt_persian\": {\n \"tokenizer\": \"standard\",\n \"char_filter\": [ \"zero_width_spaces\" ],\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"arabic_normalization\",\n \"persian_normalization\",\n \"persian_stop\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/persian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "char_filter": {
- "zero_width_spaces": {
- "type": "mapping",
- "mappings": [
- "\\u200C=>\\u0020"
- ]
- }
- },
- "filter": {
- "persian_stop": {
- "type": "stop",
- "stopwords": "_persian_"
- }
- },
- "analyzer": {
- "rebuilt_persian": {
- "tokenizer": "standard",
- "char_filter": [
- "zero_width_spaces"
- ],
- "filter": [
- "lowercase",
- "decimal_digit",
- "arabic_normalization",
- "persian_normalization",
- "persian_stop"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "persian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1448
- },
- "digest": "584f502cf840134f2db5f39e2483ced1",
- "lang": "console",
- "found": [],
- "source": "PUT /portuguese_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"portuguese_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_portuguese_\" <1>\n },\n \"portuguese_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exemplo\"] <2>\n },\n \"portuguese_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_portuguese\"\n }\n },\n \"analyzer\": {\n \"rebuilt_portuguese\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"portuguese_stop\",\n \"portuguese_keywords\",\n \"portuguese_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/portuguese_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "portuguese_stop": {
- "type": "stop",
- "stopwords": "_portuguese_"
- },
- "portuguese_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exemplo"
- ]
- },
- "portuguese_stemmer": {
- "type": "stemmer",
- "language": "light_portuguese"
- }
- },
- "analyzer": {
- "rebuilt_portuguese": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "portuguese_stop",
- "portuguese_keywords",
- "portuguese_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "portuguese_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1496
- },
- "digest": "1ba7afe23a26fe9ac7856d8c5bc1059d",
- "lang": "console",
- "found": [],
- "source": "PUT /romanian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"romanian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_romanian_\" <1>\n },\n \"romanian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exemplu\"] <2>\n },\n \"romanian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"romanian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_romanian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"romanian_stop\",\n \"romanian_keywords\",\n \"romanian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/romanian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "romanian_stop": {
- "type": "stop",
- "stopwords": "_romanian_"
- },
- "romanian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exemplu"
- ]
- },
- "romanian_stemmer": {
- "type": "stemmer",
- "language": "romanian"
- }
- },
- "analyzer": {
- "rebuilt_romanian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "romanian_stop",
- "romanian_keywords",
- "romanian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "romanian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1545
- },
- "digest": "d260225cf97e068ead2a8a6bb5aefd90",
- "lang": "console",
- "found": [],
- "source": "PUT /russian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"russian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_russian_\" <1>\n },\n \"russian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"пример\"] <2>\n },\n \"russian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"russian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_russian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"russian_stop\",\n \"russian_keywords\",\n \"russian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/russian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "russian_stop": {
- "type": "stop",
- "stopwords": "_russian_"
- },
- "russian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "пример"
- ]
- },
- "russian_stemmer": {
- "type": "stemmer",
- "language": "russian"
- }
- },
- "analyzer": {
- "rebuilt_russian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "russian_stop",
- "russian_keywords",
- "russian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "russian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1593
- },
- "digest": "320645d771e952af2a67bb7445c3688d",
- "lang": "console",
- "found": [],
- "source": "PUT /sorani_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"sorani_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_sorani_\" <1>\n },\n \"sorani_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"mînak\"] <2>\n },\n \"sorani_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"sorani\"\n }\n },\n \"analyzer\": {\n \"rebuilt_sorani\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"sorani_normalization\",\n \"lowercase\",\n \"decimal_digit\",\n \"sorani_stop\",\n \"sorani_keywords\",\n \"sorani_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/sorani_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "sorani_stop": {
- "type": "stop",
- "stopwords": "_sorani_"
- },
- "sorani_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "mînak"
- ]
- },
- "sorani_stemmer": {
- "type": "stemmer",
- "language": "sorani"
- }
- },
- "analyzer": {
- "rebuilt_sorani": {
- "tokenizer": "standard",
- "filter": [
- "sorani_normalization",
- "lowercase",
- "decimal_digit",
- "sorani_stop",
- "sorani_keywords",
- "sorani_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "sorani_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1643
- },
- "digest": "327466380bcd55361973b4a96c6dccb2",
- "lang": "console",
- "found": [],
- "source": "PUT /spanish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"spanish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_spanish_\" <1>\n },\n \"spanish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"ejemplo\"] <2>\n },\n \"spanish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_spanish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_spanish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"spanish_stop\",\n \"spanish_keywords\",\n \"spanish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/spanish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "spanish_stop": {
- "type": "stop",
- "stopwords": "_spanish_"
- },
- "spanish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "ejemplo"
- ]
- },
- "spanish_stemmer": {
- "type": "stemmer",
- "language": "light_spanish"
- }
- },
- "analyzer": {
- "rebuilt_spanish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "spanish_stop",
- "spanish_keywords",
- "spanish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "spanish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1691
- },
- "digest": "f097c02541056f3c0fc855e7bbeef8a8",
- "lang": "console",
- "found": [],
- "source": "PUT /swedish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"swedish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_swedish_\" <1>\n },\n \"swedish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exempel\"] <2>\n },\n \"swedish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"swedish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_swedish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"swedish_stop\",\n \"swedish_keywords\",\n \"swedish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/swedish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "swedish_stop": {
- "type": "stop",
- "stopwords": "_swedish_"
- },
- "swedish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exempel"
- ]
- },
- "swedish_stemmer": {
- "type": "stemmer",
- "language": "swedish"
- }
- },
- "analyzer": {
- "rebuilt_swedish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "swedish_stop",
- "swedish_keywords",
- "swedish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "swedish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1739
- },
- "digest": "103296e16b4233926ad1f07360385606",
- "lang": "console",
- "found": [],
- "source": "PUT /turkish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"turkish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_turkish_\" <1>\n },\n \"turkish_lowercase\": {\n \"type\": \"lowercase\",\n \"language\": \"turkish\"\n },\n \"turkish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"örnek\"] <2>\n },\n \"turkish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"turkish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_turkish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"apostrophe\",\n \"turkish_lowercase\",\n \"turkish_stop\",\n \"turkish_keywords\",\n \"turkish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/turkish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "turkish_stop": {
- "type": "stop",
- "stopwords": "_turkish_"
- },
- "turkish_lowercase": {
- "type": "lowercase",
- "language": "turkish"
- },
- "turkish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "örnek"
- ]
- },
- "turkish_stemmer": {
- "type": "stemmer",
- "language": "turkish"
- }
- },
- "analyzer": {
- "rebuilt_turkish": {
- "tokenizer": "standard",
- "filter": [
- "apostrophe",
- "turkish_lowercase",
- "turkish_stop",
- "turkish_keywords",
- "turkish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "turkish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1792
- },
- "digest": "346f28d82acb5427c304aa574fea0008",
- "lang": "console",
- "found": [],
- "source": "PUT /thai_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"thai_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_thai_\" <1>\n }\n },\n \"analyzer\": {\n \"rebuilt_thai\": {\n \"tokenizer\": \"thai\",\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"thai_stop\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/thai_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "thai_stop": {
- "type": "stop",
- "stopwords": "_thai_"
- }
- },
- "analyzer": {
- "rebuilt_thai": {
- "tokenizer": "thai",
- "filter": [
- "lowercase",
- "decimal_digit",
- "thai_stop"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "thai_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/pattern-analyzer.asciidoc",
- "line": 26
- },
- "digest": "467833bd44b35a89a7fe0d7df5f253f1",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"pattern\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "pattern",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/pattern-analyzer.asciidoc",
- "line": 177
- },
- "digest": "314851d590d195015a76866b92cf6b32",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_email_analyzer\": {\n \"type\": \"pattern\",\n \"pattern\": \"\\\\W|_\", <1>\n \"lowercase\": true\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_email_analyzer\",\n \"text\": \"John_Smith@foo-bar.com\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_email_analyzer": {
- "type": "pattern",
- "pattern": "\\W|_",
- "lowercase": true
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_email_analyzer",
- "text": "John_Smith@foo-bar.com"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/pattern-analyzer.asciidoc",
- "line": 264
- },
- "digest": "9e2f7b134ac7c5e7c0119866b7a96700",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"camel\": {\n \"type\": \"pattern\",\n \"pattern\": \"([^\\\\p{L}\\\\d]+)|(?<=\\\\D)(?=\\\\d)|(?<=\\\\d)(?=\\\\D)|(?<=[\\\\p{L}&&[^\\\\p{Lu}]])(?=\\\\p{Lu})|(?<=\\\\p{Lu})(?=\\\\p{Lu}[\\\\p{L}&&[^\\\\p{Lu}]])\"\n }\n }\n }\n }\n}\n\nGET my_index/_analyze\n{\n \"analyzer\": \"camel\",\n \"text\": \"MooseX::FTPClass2_beta\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "camel": {
- "type": "pattern",
- "pattern": "([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "GET",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "camel",
- "text": "MooseX::FTPClass2_beta"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/pattern-analyzer.asciidoc",
- "line": 382
- },
- "digest": "f453e14bcf30853e57618bf12f83e148",
- "lang": "console",
- "found": [],
- "source": "PUT /pattern_example\n{\n \"settings\": {\n \"analysis\": {\n \"tokenizer\": {\n \"split_on_non_word\": {\n \"type\": \"pattern\",\n \"pattern\": \"\\\\W+\" <1>\n }\n },\n \"analyzer\": {\n \"rebuilt_pattern\": {\n \"tokenizer\": \"split_on_non_word\",\n \"filter\": [\n \"lowercase\" <2>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/pattern_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "tokenizer": {
- "split_on_non_word": {
- "type": "pattern",
- "pattern": "\\W+"
- }
- },
- "analyzer": {
- "rebuilt_pattern": {
- "tokenizer": "split_on_non_word",
- "filter": [
- "lowercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "pattern_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/simple-analyzer.asciidoc",
- "line": 11
- },
- "digest": "1ea24f67fbbb6293d53caf2fe0c4b984",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"simple\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "simple",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/simple-analyzer.asciidoc",
- "line": 135
- },
- "digest": "432ab6ff7cfe06988dda436907218cc5",
- "lang": "console",
- "found": [],
- "source": "PUT /simple_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"rebuilt_simple\": {\n \"tokenizer\": \"lowercase\",\n \"filter\": [ <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/simple_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "rebuilt_simple": {
- "tokenizer": "lowercase",
- "filter": []
- }
- }
- }
- }
- },
- "params": {
- "index": "simple_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/standard-analyzer.asciidoc",
- "line": 14
- },
- "digest": "6884454f57c3a41059037ea762f48d77",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"standard\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "standard",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/standard-analyzer.asciidoc",
- "line": 151
- },
- "digest": "5af5d2999833b6b1fdcd84404751a7e3",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_english_analyzer\": {\n \"type\": \"standard\",\n \"max_token_length\": 5,\n \"stopwords\": \"_english_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_english_analyzer\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_english_analyzer": {
- "type": "standard",
- "max_token_length": 5,
- "stopwords": "_english_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_english_analyzer",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/standard-analyzer.asciidoc",
- "line": 281
- },
- "digest": "ccf84c1e5e5602a9e841cb8f7e3bb29f",
- "lang": "console",
- "found": [],
- "source": "PUT /standard_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"rebuilt_standard\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\" <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/standard_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "rebuilt_standard": {
- "tokenizer": "standard",
- "filter": [
- "lowercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "standard_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/stop-analyzer.asciidoc",
- "line": 12
- },
- "digest": "42d02087f1c8ab0452ef373079a76843",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"stop\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "stop",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/stop-analyzer.asciidoc",
- "line": 130
- },
- "digest": "5a676e5f09ba584408ce6ecacda13d1d",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_stop_analyzer\": {\n \"type\": \"stop\",\n \"stopwords\": [\"the\", \"over\"]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_stop_analyzer\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_stop_analyzer": {
- "type": "stop",
- "stopwords": [
- "the",
- "over"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_stop_analyzer",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/stop-analyzer.asciidoc",
- "line": 246
- },
- "digest": "42deb4fe32afbe0f94185e256a79c447",
- "lang": "console",
- "found": [],
- "source": "PUT /stop_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"english_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_english_\" <1>\n }\n },\n \"analyzer\": {\n \"rebuilt_stop\": {\n \"tokenizer\": \"lowercase\",\n \"filter\": [\n \"english_stop\" <2>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/stop_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": "_english_"
- }
- },
- "analyzer": {
- "rebuilt_stop": {
- "tokenizer": "lowercase",
- "filter": [
- "english_stop"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "stop_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/whitespace-analyzer.asciidoc",
- "line": 11
- },
- "digest": "262a778d754add491fbc9c721ac25bf0",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"whitespace\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "whitespace",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/whitespace-analyzer.asciidoc",
- "line": 128
- },
- "digest": "31aed390c30bd4f42a5c56253695e53f",
- "lang": "console",
- "found": [],
- "source": "PUT /whitespace_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"rebuilt_whitespace\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/whitespace_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "rebuilt_whitespace": {
- "tokenizer": "whitespace",
- "filter": []
- }
- }
- }
- }
- },
- "params": {
- "index": "whitespace_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/chargroup-tokenizer.asciidoc",
- "line": 26
- },
- "digest": "f8cafb1a08bc9b2dd5239f99d4e93f4c",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": {\n \"type\": \"char_group\",\n \"tokenize_on_chars\": [\n \"whitespace\",\n \"-\",\n \"\\n\"\n ]\n },\n \"text\": \"The QUICK brown-fox\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": {
- "type": "char_group",
- "tokenize_on_chars": [
- "whitespace",
- "-",
- "\n"
- ]
- },
- "text": "The QUICK brown-fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/chargroup-tokenizer.asciidoc",
- "line": 44
- },
- "digest": "f3ac0bc5ecf9995f51d22f6fb2ec1afa",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"The\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0\n },\n {\n \"token\": \"QUICK\",\n \"start_offset\": 4,\n \"end_offset\": 9,\n \"type\": \"word\",\n \"position\": 1\n },\n {\n \"token\": \"brown\",\n \"start_offset\": 10,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2\n },\n {\n \"token\": \"fox\",\n \"start_offset\": 16,\n \"end_offset\": 19,\n \"type\": \"word\",\n \"position\": 3\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/classic-tokenizer.asciidoc",
- "line": 22
- },
- "digest": "c6d39d22188dc7bbfdad811a94cbcc2b",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"classic\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "classic",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/classic-tokenizer.asciidoc",
- "line": 145
- },
- "digest": "326f5bc3013c80c2ee005c676a877ecf",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"classic\",\n \"max_token_length\": 5\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "classic",
- "max_token_length": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/edgengram-tokenizer.asciidoc",
- "line": 25
- },
- "digest": "a512e4dd8880ce0395937db1bab1d205",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"edge_ngram\",\n \"text\": \"Quick Fox\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "edge_ngram",
- "text": "Quick Fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/edgengram-tokenizer.asciidoc",
- "line": 141
- },
- "digest": "a61389da4033bd7b73a63ff2ee258125",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 2,\n \"max_gram\": 10,\n \"token_chars\": [\n \"letter\",\n \"digit\"\n ]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"2 Quick Foxes.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "edge_ngram",
- "min_gram": 2,
- "max_gram": 10,
- "token_chars": [
- "letter",
- "digit"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "2 Quick Foxes."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/edgengram-tokenizer.asciidoc",
- "line": 261
- },
- "digest": "b8893e8f2b1aea4b093e0c4f037cfff7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"autocomplete\": {\n \"tokenizer\": \"autocomplete\",\n \"filter\": [\n \"lowercase\"\n ]\n },\n \"autocomplete_search\": {\n \"tokenizer\": \"lowercase\"\n }\n },\n \"tokenizer\": {\n \"autocomplete\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 2,\n \"max_gram\": 10,\n \"token_chars\": [\n \"letter\"\n ]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"analyzer\": \"autocomplete\",\n \"search_analyzer\": \"autocomplete_search\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"title\": \"Quick Foxes\" <1>\n}\n\nPOST my_index/_refresh\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"title\": {\n \"query\": \"Quick Fo\", <2>\n \"operator\": \"and\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "autocomplete": {
- "tokenizer": "autocomplete",
- "filter": [
- "lowercase"
- ]
- },
- "autocomplete_search": {
- "tokenizer": "lowercase"
- }
- },
- "tokenizer": {
- "autocomplete": {
- "type": "edge_ngram",
- "min_gram": 2,
- "max_gram": 10,
- "token_chars": [
- "letter"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "analyzer": "autocomplete",
- "search_analyzer": "autocomplete_search"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "title": "Quick Foxes"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/my_index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.refresh"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "title": {
- "query": "Quick Fo",
- "operator": "and"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/keyword-tokenizer.asciidoc",
- "line": 12
- },
- "digest": "09a44b619a99f6bf3f01bd5e258fd22d",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"keyword\",\n \"text\": \"New York\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "text": "New York"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/letter-tokenizer.asciidoc",
- "line": 13
- },
- "digest": "76448aaaaa2c352bb6e09d2f83a3fbb3",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"letter\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "letter",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/lowercase-tokenizer.asciidoc",
- "line": 18
- },
- "digest": "a99bc141066ef673e35f306157750ec9",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"lowercase\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "lowercase",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/ngram-tokenizer.asciidoc",
- "line": 21
- },
- "digest": "39963032d423e2f20f53c4621b6ca3c6",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"ngram\",\n \"text\": \"Quick Fox\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "ngram",
- "text": "Quick Fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/ngram-tokenizer.asciidoc",
- "line": 217
- },
- "digest": "9efcafd1f28490fd658d88df7d93c66c",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"ngram\",\n \"min_gram\": 3,\n \"max_gram\": 3,\n \"token_chars\": [\n \"letter\",\n \"digit\"\n ]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"2 Quick Foxes.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "ngram",
- "min_gram": 3,
- "max_gram": 3,
- "token_chars": [
- "letter",
- "digit"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "2 Quick Foxes."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 12
- },
- "digest": "dc4dcfeae8a5f248639335c2c9809549",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"path_hierarchy\",\n \"text\": \"/one/two/three\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "path_hierarchy",
- "text": "/one/two/three"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 93
- },
- "digest": "fcc35d56dff0291bcf3663830ce99254",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"path_hierarchy\",\n \"delimiter\": \"-\",\n \"replacement\": \"/\",\n \"skip\": 2\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"one-two-three-four-five\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "path_hierarchy",
- "delimiter": "-",
- "replacement": "/",
- "skip": 2
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "one-two-three-four-five"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer-examples.asciidoc",
- "line": 18
- },
- "digest": "840b6c5c3d9c56aed854cfab8da04486",
- "lang": "console",
- "found": [],
- "source": "PUT file-path-test\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"custom_path_tree\": {\n \"tokenizer\": \"custom_hierarchy\"\n },\n \"custom_path_tree_reversed\": {\n \"tokenizer\": \"custom_hierarchy_reversed\"\n }\n },\n \"tokenizer\": {\n \"custom_hierarchy\": {\n \"type\": \"path_hierarchy\",\n \"delimiter\": \"/\"\n },\n \"custom_hierarchy_reversed\": {\n \"type\": \"path_hierarchy\",\n \"delimiter\": \"/\",\n \"reverse\": \"true\"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"file_path\": {\n \"type\": \"text\",\n \"fields\": {\n \"tree\": {\n \"type\": \"text\",\n \"analyzer\": \"custom_path_tree\"\n },\n \"tree_reversed\": {\n \"type\": \"text\",\n \"analyzer\": \"custom_path_tree_reversed\"\n }\n }\n }\n }\n }\n}\n\nPOST file-path-test/_doc/1\n{\n \"file_path\": \"/User/alice/photos/2017/05/16/my_photo1.jpg\"\n}\n\nPOST file-path-test/_doc/2\n{\n \"file_path\": \"/User/alice/photos/2017/05/16/my_photo2.jpg\"\n}\n\nPOST file-path-test/_doc/3\n{\n \"file_path\": \"/User/alice/photos/2017/05/16/my_photo3.jpg\"\n}\n\nPOST file-path-test/_doc/4\n{\n \"file_path\": \"/User/alice/photos/2017/05/15/my_photo1.jpg\"\n}\n\nPOST file-path-test/_doc/5\n{\n \"file_path\": \"/User/bob/photos/2017/05/16/my_photo1.jpg\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/file-path-test",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "custom_path_tree": {
- "tokenizer": "custom_hierarchy"
- },
- "custom_path_tree_reversed": {
- "tokenizer": "custom_hierarchy_reversed"
- }
- },
- "tokenizer": {
- "custom_hierarchy": {
- "type": "path_hierarchy",
- "delimiter": "/"
- },
- "custom_hierarchy_reversed": {
- "type": "path_hierarchy",
- "delimiter": "/",
- "reverse": "true"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "file_path": {
- "type": "text",
- "fields": {
- "tree": {
- "type": "text",
- "analyzer": "custom_path_tree"
- },
- "tree_reversed": {
- "type": "text",
- "analyzer": "custom_path_tree_reversed"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/1",
- "query": null,
- "body": {
- "file_path": "/User/alice/photos/2017/05/16/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/2",
- "query": null,
- "body": {
- "file_path": "/User/alice/photos/2017/05/16/my_photo2.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/3",
- "query": null,
- "body": {
- "file_path": "/User/alice/photos/2017/05/16/my_photo3.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/4",
- "query": null,
- "body": {
- "file_path": "/User/alice/photos/2017/05/15/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "4"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/5",
- "query": null,
- "body": {
- "file_path": "/User/bob/photos/2017/05/16/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "5"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer-examples.asciidoc",
- "line": 97
- },
- "digest": "bd767ea03171fe71c73f58f16d5da92f",
- "lang": "console",
- "found": [],
- "source": "GET file-path-test/_search\n{\n \"query\": {\n \"match\": {\n \"file_path\": \"/User/bob/photos/2017/05\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/file-path-test/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "file_path": "/User/bob/photos/2017/05"
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer-examples.asciidoc",
- "line": 112
- },
- "digest": "b724f547c5d67e95bbc0a9920e47033c",
- "lang": "console",
- "found": [],
- "source": "GET file-path-test/_search\n{\n \"query\": {\n \"term\": {\n \"file_path.tree\": \"/User/alice/photos/2017/05/16\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/file-path-test/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "file_path.tree": "/User/alice/photos/2017/05/16"
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer-examples.asciidoc",
- "line": 131
- },
- "digest": "f1dc6f69453867ffafe86e998dd464d9",
- "lang": "console",
- "found": [],
- "source": "GET file-path-test/_search\n{\n \"query\": {\n \"term\": {\n \"file_path.tree_reversed\": {\n \"value\": \"my_photo1.jpg\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/file-path-test/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "file_path.tree_reversed": {
- "value": "my_photo1.jpg"
- }
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer-examples.asciidoc",
- "line": 149
- },
- "digest": "acc52da725a996ae696b00d9f818dfde",
- "lang": "console",
- "found": [],
- "source": "POST file-path-test/_analyze\n{\n \"analyzer\": \"custom_path_tree\",\n \"text\": \"/User/alice/photos/2017/05/16/my_photo1.jpg\"\n}\n\nPOST file-path-test/_analyze\n{\n \"analyzer\": \"custom_path_tree_reversed\",\n \"text\": \"/User/alice/photos/2017/05/16/my_photo1.jpg\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/file-path-test/_analyze",
- "query": null,
- "body": {
- "analyzer": "custom_path_tree",
- "text": "/User/alice/photos/2017/05/16/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "indices.analyze"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_analyze",
- "query": null,
- "body": {
- "analyzer": "custom_path_tree_reversed",
- "text": "/User/alice/photos/2017/05/16/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer-examples.asciidoc",
- "line": 169
- },
- "digest": "4bba59cf745ac7b996bf90308bc26957",
- "lang": "console",
- "found": [],
- "source": "GET file-path-test/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match\" : { \"file_path\" : \"16\" }\n },\n \"filter\": {\n \"term\" : { \"file_path.tree\" : \"/User/alice\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/file-path-test/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "file_path": "16"
- }
- },
- "filter": {
- "term": {
- "file_path.tree": "/User/alice"
- }
- }
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pattern-tokenizer.asciidoc",
- "line": 29
- },
- "digest": "1a6dbe5df488c4a16e2f1101ba8a25d9",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"pattern\",\n \"text\": \"The foo_bar_size's default is 5.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "pattern",
- "text": "The foo_bar_size's default is 5."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pattern-tokenizer.asciidoc",
- "line": 125
- },
- "digest": "448339a39d847c4cac57a325e23c2a5a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"pattern\",\n \"pattern\": \",\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"comma,separated,values\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "pattern",
- "pattern": ","
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "comma,separated,values"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pattern-tokenizer.asciidoc",
- "line": 213
- },
- "digest": "fa8d64d622b4d7fe3234924b4de4f0bf",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"pattern\",\n \"pattern\": \"\\\"((?:\\\\\\\\\\\"|[^\\\"]|\\\\\\\\\\\")+)\\\"\",\n \"group\": 1\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"\\\"value\\\", \\\"value with embedded \\\\\\\" quote\\\"\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "pattern",
- "pattern": "\"((?:\\\\\"|[^\"]|\\\\\")+)\"",
- "group": 1
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "\"value\", \"value with embedded \\\" quote\""
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/simplepattern-tokenizer.asciidoc",
- "line": 38
- },
- "digest": "9ffc049d5c5a570b90d913e92f910ee4",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"simple_pattern\",\n \"pattern\": \"[0123456789]{3}\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"fd-786-335-514-x\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "simple_pattern",
- "pattern": "[0123456789]{3}"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "fd-786-335-514-x"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/simplepatternsplit-tokenizer.asciidoc",
- "line": 39
- },
- "digest": "5c28bb67716ed2bbe03c1d5d3733cb42",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"simple_pattern_split\",\n \"pattern\": \"_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"an_underscored_phrase\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "simple_pattern_split",
- "pattern": "_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "an_underscored_phrase"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/standard-tokenizer.asciidoc",
- "line": 13
- },
- "digest": "88a08d0b15ef41324f5c23db533d47d1",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"standard\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/standard-tokenizer.asciidoc",
- "line": 136
- },
- "digest": "7375d4fe72c848ee3b0a799fda8bb0f0",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"standard\",\n \"max_token_length\": 5\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "standard",
- "max_token_length": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/thai-tokenizer.asciidoc",
- "line": 17
- },
- "digest": "a1e5f3956f9a697e79478fc9a6e30e1f",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"thai\",\n \"text\": \"การที่ได้ต้องแสดงว่างานดี\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "thai",
- "text": "การที่ได้ต้องแสดงว่างานดี"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/uaxurlemail-tokenizer.asciidoc",
- "line": 11
- },
- "digest": "d12df43ffcdcd937bae9b26fb475e239",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"uax_url_email\",\n \"text\": \"Email me at john.smith@global-international.com\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "uax_url_email",
- "text": "Email me at john.smith@global-international.com"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/uaxurlemail-tokenizer.asciidoc",
- "line": 92
- },
- "digest": "1125986e8e55028ff4c10b5e6c7bbebb",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"uax_url_email\",\n \"max_token_length\": 5\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"john.smith@global-international.com\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "uax_url_email",
- "max_token_length": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "john.smith@global-international.com"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/whitespace-tokenizer.asciidoc",
- "line": 11
- },
- "digest": "7b9dfe5857bde1bd8483ea3241656714",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/apostrophe-tokenfilter.asciidoc",
- "line": 22
- },
- "digest": "3343a4cf559060c422d86c786a95e535",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"apostrophe\"],\n \"text\" : \"Istanbul'a veya Istanbul'dan\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "apostrophe"
- ],
- "text": "Istanbul'a veya Istanbul'dan"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/apostrophe-tokenfilter.asciidoc",
- "line": 77
- },
- "digest": "da19e4ecfabcbabdc894687106eaccdc",
- "lang": "console",
- "found": [],
- "source": "PUT /apostrophe_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_apostrophe\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"apostrophe\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/apostrophe_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_apostrophe": {
- "tokenizer": "standard",
- "filter": [
- "apostrophe"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "apostrophe_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/asciifolding-tokenfilter.asciidoc",
- "line": 21
- },
- "digest": "00d65f7b9daa1c6b18eedd8ace206bae",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"asciifolding\"],\n \"text\" : \"açaí à la carte\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "asciifolding"
- ],
- "text": "açaí à la carte"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/asciifolding-tokenfilter.asciidoc",
- "line": 83
- },
- "digest": "a976bdf566730e35c5277740c1e3a7f2",
- "lang": "console",
- "found": [],
- "source": "PUT /asciifold_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_asciifolding\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"asciifolding\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/asciifold_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_asciifolding": {
- "tokenizer": "standard",
- "filter": [
- "asciifolding"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "asciifold_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/asciifolding-tokenfilter.asciidoc",
- "line": 118
- },
- "digest": "c5a0248213307f8e036a26e3294ad611",
- "lang": "console",
- "found": [],
- "source": "PUT /asciifold_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_asciifolding\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"my_ascii_folding\"]\n }\n },\n \"filter\" : {\n \"my_ascii_folding\" : {\n \"type\" : \"asciifolding\",\n \"preserve_original\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/asciifold_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_asciifolding": {
- "tokenizer": "standard",
- "filter": [
- "my_ascii_folding"
- ]
- }
- },
- "filter": {
- "my_ascii_folding": {
- "type": "asciifolding",
- "preserve_original": true
- }
- }
- }
- }
- },
- "params": {
- "index": "asciifold_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-bigram-tokenfilter.asciidoc",
- "line": 22
- },
- "digest": "b8c03bbd917d0cf5474a3e46ebdd7aad",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"cjk_bigram\"],\n \"text\" : \"東京都は、日本の首都であり\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "cjk_bigram"
- ],
- "text": "東京都は、日本の首都であり"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-bigram-tokenfilter.asciidoc",
- "line": 126
- },
- "digest": "7230edf3a8cdb5e4091fad668b4049dc",
- "lang": "console",
- "found": [],
- "source": "PUT /cjk_bigram_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_cjk_bigram\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"cjk_bigram\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/cjk_bigram_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_cjk_bigram": {
- "tokenizer": "standard",
- "filter": [
- "cjk_bigram"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "cjk_bigram_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-bigram-tokenfilter.asciidoc",
- "line": 176
- },
- "digest": "6b328ac5a63ac7f26b011a6905083934",
- "lang": "console",
- "found": [],
- "source": "PUT /cjk_bigram_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"han_bigrams\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"han_bigrams_filter\"]\n }\n },\n \"filter\" : {\n \"han_bigrams_filter\" : {\n \"type\" : \"cjk_bigram\",\n \"ignored_scripts\": [\n \"hangul\",\n \"hiragana\",\n \"katakana\"\n ],\n \"output_unigrams\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/cjk_bigram_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "han_bigrams": {
- "tokenizer": "standard",
- "filter": [
- "han_bigrams_filter"
- ]
- }
- },
- "filter": {
- "han_bigrams_filter": {
- "type": "cjk_bigram",
- "ignored_scripts": [
- "hangul",
- "hiragana",
- "katakana"
- ],
- "output_unigrams": true
- }
- }
- }
- }
- },
- "params": {
- "index": "cjk_bigram_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-width-tokenfilter.asciidoc",
- "line": 28
- },
- "digest": "76b279835936ee4b546a171c671c3cd7",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"cjk_width\"],\n \"text\" : \"シーサイドライナー\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "cjk_width"
- ],
- "text": "シーサイドライナー"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-width-tokenfilter.asciidoc",
- "line": 69
- },
- "digest": "3df1aa197f7498a534b0536f49aea28b",
- "lang": "console",
- "found": [],
- "source": "PUT /cjk_width_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_cjk_width\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"cjk_width\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/cjk_width_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_cjk_width": {
- "tokenizer": "standard",
- "filter": [
- "cjk_width"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "cjk_width_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/classic-tokenfilter.asciidoc",
- "line": 21
- },
- "digest": "c8bbf362f06a0d8dab33ec0d99743343",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"classic\",\n \"filter\" : [\"classic\"],\n \"text\" : \"The 2 Q.U.I.C.K. Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "classic",
- "filter": [
- "classic"
- ],
- "text": "The 2 Q.U.I.C.K. Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/classic-tokenfilter.asciidoc",
- "line": 132
- },
- "digest": "50952b8040f875ce3719c71ca1c3bc8f",
- "lang": "console",
- "found": [],
- "source": "PUT /classic_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"classic_analyzer\" : {\n \"tokenizer\" : \"classic\",\n \"filter\" : [\"classic\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/classic_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "classic_analyzer": {
- "tokenizer": "classic",
- "filter": [
- "classic"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "classic_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/common-grams-tokenfilter.asciidoc",
- "line": 28
- },
- "digest": "2fd0b3c132b46aa34cc9d92dd2d4bc85",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\n {\n \"type\": \"common_grams\",\n \"common_words\": [\"is\", \"the\"]\n }\n ],\n \"text\" : \"the quick fox is brown\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "common_grams",
- "common_words": [
- "is",
- "the"
- ]
- }
- ],
- "text": "the quick fox is brown"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/common-grams-tokenfilter.asciidoc",
- "line": 126
- },
- "digest": "63de16d533d65708cf794eb50da02fbd",
- "lang": "console",
- "found": [],
- "source": "PUT /common_grams_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"index_grams\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [\"common_grams\"]\n }\n },\n \"filter\": {\n \"common_grams\": {\n \"type\": \"common_grams\",\n \"common_words\": [\"a\", \"is\", \"the\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/common_grams_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "index_grams": {
- "tokenizer": "whitespace",
- "filter": [
- "common_grams"
- ]
- }
- },
- "filter": {
- "common_grams": {
- "type": "common_grams",
- "common_words": [
- "a",
- "is",
- "the"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "common_grams_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/common-grams-tokenfilter.asciidoc",
- "line": 206
- },
- "digest": "d2d5a5fa4ab40787db87c85e1dd2bd06",
- "lang": "console",
- "found": [],
- "source": "PUT /common_grams_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"index_grams\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [\"common_grams_query\"]\n }\n },\n \"filter\": {\n \"common_grams_query\": {\n \"type\": \"common_grams\",\n \"common_words\": [\"a\", \"is\", \"the\"],\n \"ignore_case\": true,\n \"query_mode\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/common_grams_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "index_grams": {
- "tokenizer": "whitespace",
- "filter": [
- "common_grams_query"
- ]
- }
- },
- "filter": {
- "common_grams_query": {
- "type": "common_grams",
- "common_words": [
- "a",
- "is",
- "the"
- ],
- "ignore_case": true,
- "query_mode": true
- }
- }
- }
- }
- },
- "params": {
- "index": "common_grams_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/condition-tokenfilter.asciidoc",
- "line": 22
- },
- "digest": "09944369863fd8666d5301d717317276",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"condition\",\n \"filter\": [ \"lowercase\" ],\n \"script\": {\n \"source\": \"token.getTerm().length() < 5\"\n }\n }\n ],\n \"text\": \"THE QUICK BROWN FOX\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "condition",
- "filter": [
- "lowercase"
- ],
- "script": {
- "source": "token.getTerm().length() < 5"
- }
- }
- ],
- "text": "THE QUICK BROWN FOX"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/condition-tokenfilter.asciidoc",
- "line": 125
- },
- "digest": "a197076e0e74951ea88f20309ec257e2",
- "lang": "console",
- "found": [],
- "source": "PUT /palindrome_list\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_reverse_first_token\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"reverse_first_token\" ]\n }\n },\n \"filter\": {\n \"reverse_first_token\": {\n \"type\": \"condition\",\n \"filter\": [ \"reverse\" ],\n \"script\": {\n \"source\": \"token.getPosition() === 0\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/palindrome_list",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_reverse_first_token": {
- "tokenizer": "whitespace",
- "filter": [
- "reverse_first_token"
- ]
- }
- },
- "filter": {
- "reverse_first_token": {
- "type": "condition",
- "filter": [
- "reverse"
- ],
- "script": {
- "source": "token.getPosition() === 0"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "palindrome_list"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/decimal-digit-tokenfilter.asciidoc",
- "line": 20
- },
- "digest": "a21319c9eff1ac47d7fe7490f1ef2efa",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"decimal_digit\"],\n \"text\" : \"१-one two-२ ३\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "decimal_digit"
- ],
- "text": "१-one two-२ ३"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/decimal-digit-tokenfilter.asciidoc",
- "line": 75
- },
- "digest": "121b8bc28620095dfa570a989bcdb04e",
- "lang": "console",
- "found": [],
- "source": "PUT /decimal_digit_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_decimal_digit\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"decimal_digit\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/decimal_digit_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_decimal_digit": {
- "tokenizer": "whitespace",
- "filter": [
- "decimal_digit"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "decimal_digit_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 47
- },
- "digest": "7dc82f7d36686fd57a47e34cbda39a4e",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\"delimited_payload\"],\n \"text\": \"the|0 brown|10 fox|5 is|0 quick|10\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "delimited_payload"
- ],
- "text": "the|0 brown|10 fox|5 is|0 quick|10"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 120
- },
- "digest": "d443db2755fde3b49ca3a9d296c4a96f",
- "lang": "console",
- "found": [],
- "source": "PUT delimited_payload\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_delimited_payload\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"delimited_payload\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/delimited_payload",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_delimited_payload": {
- "tokenizer": "whitespace",
- "filter": [
- "delimited_payload"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "delimited_payload"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 173
- },
- "digest": "27f9f604e7a48799fa30529cbc0ff619",
- "lang": "console",
- "found": [],
- "source": "PUT delimited_payload_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_plus_delimited\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"plus_delimited\" ]\n }\n },\n \"filter\": {\n \"plus_delimited\": {\n \"type\": \"delimited_payload\",\n \"delimiter\": \"+\",\n \"encoding\": \"int\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/delimited_payload_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_plus_delimited": {
- "tokenizer": "whitespace",
- "filter": [
- "plus_delimited"
- ]
- }
- },
- "filter": {
- "plus_delimited": {
- "type": "delimited_payload",
- "delimiter": "+",
- "encoding": "int"
- }
- }
- }
- }
- },
- "params": {
- "index": "delimited_payload_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 206
- },
- "digest": "50c2cea2adbe9523458c2686ab11df54",
- "lang": "console",
- "found": [],
- "source": "PUT text_payloads\n{\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"term_vector\": \"with_positions_payloads\",\n \"analyzer\": \"payload_delimiter\"\n }\n }\n },\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"payload_delimiter\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"delimited_payload\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/text_payloads",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "term_vector": "with_positions_payloads",
- "analyzer": "payload_delimiter"
- }
- }
- },
- "settings": {
- "analysis": {
- "analyzer": {
- "payload_delimiter": {
- "tokenizer": "whitespace",
- "filter": [
- "delimited_payload"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "text_payloads"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 234
- },
- "digest": "d2f6fb271e97fde8685d7744e6718cc7",
- "lang": "console",
- "found": [],
- "source": "POST text_payloads/_doc/1\n{\n \"text\": \"the|0 brown|3 fox|4 is|0 quick|10\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/text_payloads/_doc/1",
- "query": null,
- "body": {
- "text": "the|0 brown|3 fox|4 is|0 quick|10"
- },
- "params": {
- "index": "text_payloads",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 246
- },
- "digest": "b24a374c0ad264abbcacb5686f5ed61c",
- "lang": "console",
- "found": [],
- "source": "GET text_payloads/_termvectors/1\n{\n \"fields\": [ \"text\" ],\n \"payloads\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/text_payloads/_termvectors/1",
- "query": null,
- "body": {
- "fields": [
- "text"
- ],
- "payloads": true
- },
- "params": {
- "index": "text_payloads",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 258
- },
- "digest": "82a0b9e193b65de0a1c71288328f5f3d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"text_payloads\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"found\": true,\n \"took\": 8,\n \"term_vectors\": {\n \"text\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 5,\n \"doc_count\": 1,\n \"sum_ttf\": 5\n },\n \"terms\": {\n \"brown\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 1,\n \"payload\": \"QEAAAA==\"\n }\n ]\n },\n \"fox\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 2,\n \"payload\": \"QIAAAA==\"\n }\n ]\n },\n \"is\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 3,\n \"payload\": \"AAAAAA==\"\n }\n ]\n },\n \"quick\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 4,\n \"payload\": \"QSAAAA==\"\n }\n ]\n },\n \"the\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 0,\n \"payload\": \"AAAAAA==\"\n }\n ]\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/dictionary-decompounder-tokenfilter.asciidoc",
- "line": 32
- },
- "digest": "3fecd5c6d0c172566da4a54320e1cff3",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"dictionary_decompounder\",\n \"word_list\": [\"Donau\", \"dampf\", \"meer\", \"schiff\"]\n }\n ],\n \"text\": \"Donaudampfschiff\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "dictionary_decompounder",
- "word_list": [
- "Donau",
- "dampf",
- "meer",
- "schiff"
- ]
- }
- ],
- "text": "Donaudampfschiff"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/dictionary-decompounder-tokenfilter.asciidoc",
- "line": 152
- },
- "digest": "a5a5fb129de2f492e8fd33043a73439c",
- "lang": "console",
- "found": [],
- "source": "PUT dictionary_decompound_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_dictionary_decompound\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"22_char_dictionary_decompound\" ]\n }\n },\n \"filter\": {\n \"22_char_dictionary_decompound\": {\n \"type\": \"dictionary_decompounder\",\n \"word_list_path\": \"analysis/example_word_list.txt\",\n \"max_subword_size\": 22\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/dictionary_decompound_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_dictionary_decompound": {
- "tokenizer": "standard",
- "filter": [
- "22_char_dictionary_decompound"
- ]
- }
- },
- "filter": {
- "22_char_dictionary_decompound": {
- "type": "dictionary_decompounder",
- "word_list_path": "analysis/example_word_list.txt",
- "max_subword_size": 22
- }
- }
- }
- }
- },
- "params": {
- "index": "dictionary_decompound_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/edgengram-tokenfilter.asciidoc",
- "line": 34
- },
- "digest": "6dbfe5565a95508e65d304131847f9fc",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n { \"type\": \"edge_ngram\",\n \"min_gram\": 1,\n \"max_gram\": 2\n }\n ],\n \"text\": \"the quick brown fox jumps\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "edge_ngram",
- "min_gram": 1,
- "max_gram": 2
- }
- ],
- "text": "the quick brown fox jumps"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/edgengram-tokenfilter.asciidoc",
- "line": 143
- },
- "digest": "16351d99d0608789d04a0bb11a537098",
- "lang": "console",
- "found": [],
- "source": "PUT edge_ngram_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_edge_ngram\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"edge_ngram\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/edge_ngram_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_edge_ngram": {
- "tokenizer": "standard",
- "filter": [
- "edge_ngram"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "edge_ngram_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/edgengram-tokenfilter.asciidoc",
- "line": 199
- },
- "digest": "6f07152055e99416deb10e95b428b847",
- "lang": "console",
- "found": [],
- "source": "PUT edge_ngram_custom_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"3_5_edgegrams\" ]\n }\n },\n \"filter\": {\n \"3_5_edgegrams\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 3,\n \"max_gram\": 5\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/edge_ngram_custom_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "tokenizer": "whitespace",
- "filter": [
- "3_5_edgegrams"
- ]
- }
- },
- "filter": {
- "3_5_edgegrams": {
- "type": "edge_ngram",
- "min_gram": 3,
- "max_gram": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "edge_ngram_custom_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/elision-tokenfilter.asciidoc",
- "line": 34
- },
- "digest": "446e8fc8ccfb13bb5ec64e32a5676d18",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"elision\"],\n \"text\" : \"j’examine près du wharf\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "elision"
- ],
- "text": "j’examine près du wharf"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/elision-tokenfilter.asciidoc",
- "line": 96
- },
- "digest": "26d49d11bb37c3f4ef8179010e34b50e",
- "lang": "console",
- "found": [],
- "source": "PUT /elision_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_elision\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"elision\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/elision_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_elision": {
- "tokenizer": "whitespace",
- "filter": [
- "elision"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "elision_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/elision-tokenfilter.asciidoc",
- "line": 165
- },
- "digest": "fc575e08d0bc8f4cb03a54e5d57fff7b",
- "lang": "console",
- "found": [],
- "source": "PUT /elision_case_sensitive_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"default\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"elision_case_sensitive\"]\n }\n },\n \"filter\" : {\n \"elision_case_sensitive\" : {\n \"type\" : \"elision\",\n \"articles\" : [\"l\", \"m\", \"t\", \"qu\", \"n\", \"s\", \"j\"],\n \"articles_case\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/elision_case_sensitive_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "tokenizer": "whitespace",
- "filter": [
- "elision_case_sensitive"
- ]
- }
- },
- "filter": {
- "elision_case_sensitive": {
- "type": "elision",
- "articles": [
- "l",
- "m",
- "t",
- "qu",
- "n",
- "s",
- "j"
- ],
- "articles_case": true
- }
- }
- }
- }
- },
- "params": {
- "index": "elision_case_sensitive_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/fingerprint-tokenfilter.asciidoc",
- "line": 35
- },
- "digest": "df82a9cb21a7557f3ddba2509f76f608",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"fingerprint\"],\n \"text\" : \"zebra jumps over resting resting dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "fingerprint"
- ],
- "text": "zebra jumps over resting resting dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/fingerprint-tokenfilter.asciidoc",
- "line": 76
- },
- "digest": "8e09caccab0c7c0f82f06cea45424396",
- "lang": "console",
- "found": [],
- "source": "PUT fingerprint_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_fingerprint\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"elision\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/fingerprint_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_fingerprint": {
- "tokenizer": "whitespace",
- "filter": [
- "elision"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "fingerprint_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/fingerprint-tokenfilter.asciidoc",
- "line": 117
- },
- "digest": "1b0f40959a7a4d124372f2bd3f7eac85",
- "lang": "console",
- "found": [],
- "source": "PUT custom_fingerprint_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"fingerprint_plus_concat\" ]\n }\n },\n \"filter\": {\n \"fingerprint_plus_concat\": {\n \"type\": \"fingerprint\",\n \"max_output_size\": 100,\n \"separator\": \"+\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_fingerprint_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_": {
- "tokenizer": "whitespace",
- "filter": [
- "fingerprint_plus_concat"
- ]
- }
- },
- "filter": {
- "fingerprint_plus_concat": {
- "type": "fingerprint",
- "max_output_size": 100,
- "separator": "+"
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_fingerprint_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/hunspell-tokenfilter.asciidoc",
- "line": 47
- },
- "digest": "0af002734dd884f9385da6c3a4ca87a1",
- "lang": "console",
- "found": [],
- "source": "PUT /hunspell_example\n{\n \"settings\": {\n \"analysis\" : {\n \"analyzer\" : {\n \"en\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [ \"lowercase\", \"en_US\" ]\n }\n },\n \"filter\" : {\n \"en_US\" : {\n \"type\" : \"hunspell\",\n \"locale\" : \"en_US\",\n \"dedup\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/hunspell_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "en": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "en_US"
- ]
- }
- },
- "filter": {
- "en_US": {
- "type": "hunspell",
- "locale": "en_US",
- "dedup": true
- }
- }
- }
- }
- },
- "params": {
- "index": "hunspell_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/hyphenation-decompounder-tokenfilter.asciidoc",
- "line": 25
- },
- "digest": "f34c02351662481dd61a5c2a3e206c60",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"hyphenation_decompounder\",\n \"hyphenation_patterns_path\": \"analysis/hyphenation_patterns.xml\",\n \"word_list\": [\"Kaffee\", \"zucker\", \"tasse\"]\n }\n ],\n \"text\": \"Kaffeetasse\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "hyphenation_decompounder",
- "hyphenation_patterns_path": "analysis/hyphenation_patterns.xml",
- "word_list": [
- "Kaffee",
- "zucker",
- "tasse"
- ]
- }
- ],
- "text": "Kaffeetasse"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/hyphenation-decompounder-tokenfilter.asciidoc",
- "line": 132
- },
- "digest": "5f8acd1e367b048b5542dbc6079bcc88",
- "lang": "console",
- "found": [],
- "source": "PUT hyphenation_decompound_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_hyphenation_decompound\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"22_char_hyphenation_decompound\" ]\n }\n },\n \"filter\": {\n \"22_char_hyphenation_decompound\": {\n \"type\": \"hyphenation_decompounder\",\n \"word_list_path\": \"analysis/example_word_list.txt\",\n \"hyphenation_patterns_path\": \"analysis/hyphenation_patterns.xml\",\n \"max_subword_size\": 22\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/hyphenation_decompound_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_hyphenation_decompound": {
- "tokenizer": "standard",
- "filter": [
- "22_char_hyphenation_decompound"
- ]
- }
- },
- "filter": {
- "22_char_hyphenation_decompound": {
- "type": "hyphenation_decompounder",
- "word_list_path": "analysis/example_word_list.txt",
- "hyphenation_patterns_path": "analysis/hyphenation_patterns.xml",
- "max_subword_size": 22
- }
- }
- }
- }
- },
- "params": {
- "index": "hyphenation_decompound_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-types-tokenfilter.asciidoc",
- "line": 38
- },
- "digest": "83cd4eb89818b4c32f654d370eafa920",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"keep_types\",\n \"types\": [ \"\" ]\n }\n ],\n \"text\": \"1 quick fox 2 lazy dogs\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "keep_types",
- "types": [
- ""
- ]
- }
- ],
- "text": "1 quick fox 2 lazy dogs"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-types-tokenfilter.asciidoc",
- "line": 91
- },
- "digest": "d94f666616dea141dcb7aaf08a35bc10",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"keep_types\",\n \"types\": [ \"\" ],\n \"mode\": \"exclude\"\n }\n ],\n \"text\": \"1 quick fox 2 lazy dogs\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "keep_types",
- "types": [
- ""
- ],
- "mode": "exclude"
- }
- ],
- "text": "1 quick fox 2 lazy dogs"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-types-tokenfilter.asciidoc",
- "line": 182
- },
- "digest": "13b02da42d3afe7f0b649e1c98ac9549",
- "lang": "console",
- "found": [],
- "source": "PUT keep_types_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"extract_alpha\" ]\n }\n },\n \"filter\": {\n \"extract_alpha\": {\n \"type\": \"keep_types\",\n \"types\": [ \"\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/keep_types_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "extract_alpha"
- ]
- }
- },
- "filter": {
- "extract_alpha": {
- "type": "keep_types",
- "types": [
- ""
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "keep_types_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-words-tokenfilter.asciidoc",
- "line": 26
- },
- "digest": "9a036a792be1d39af9fd0d1adb5f3402",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"keep\",\n \"keep_words\": [ \"dog\", \"elephant\", \"fox\" ]\n }\n ],\n \"text\": \"the quick fox jumps over the lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "keep",
- "keep_words": [
- "dog",
- "elephant",
- "fox"
- ]
- }
- ],
- "text": "the quick fox jumps over the lazy dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-words-tokenfilter.asciidoc",
- "line": 118
- },
- "digest": "642c0c1c76e9bf226cd216ebae9ab958",
- "lang": "console",
- "found": [],
- "source": "PUT keep_words_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_keep_word_array\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"keep_word_array\" ]\n },\n \"standard_keep_word_file\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"keep_word_file\" ]\n }\n },\n \"filter\": {\n \"keep_word_array\": {\n \"type\": \"keep\",\n \"keep_words\": [ \"one\", \"two\", \"three\" ]\n },\n \"keep_word_file\": {\n \"type\": \"keep\",\n \"keep_words_path\": \"analysis/example_word_list.txt\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/keep_words_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_keep_word_array": {
- "tokenizer": "standard",
- "filter": [
- "keep_word_array"
- ]
- },
- "standard_keep_word_file": {
- "tokenizer": "standard",
- "filter": [
- "keep_word_file"
- ]
- }
- },
- "filter": {
- "keep_word_array": {
- "type": "keep",
- "keep_words": [
- "one",
- "two",
- "three"
- ]
- },
- "keep_word_file": {
- "type": "keep",
- "keep_words_path": "analysis/example_word_list.txt"
- }
- }
- }
- }
- },
- "params": {
- "index": "keep_words_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 28
- },
- "digest": "863c221b28ae5e58d39bd8f138291949",
- "lang": "console",
- "found": [],
- "source": "PUT /keyword_marker_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"protect_cats\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\"lowercase\", \"protect_cats\", \"porter_stem\"]\n },\n \"normal\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\"lowercase\", \"porter_stem\"]\n }\n },\n \"filter\": {\n \"protect_cats\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"cats\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/keyword_marker_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "protect_cats": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "protect_cats",
- "porter_stem"
- ]
- },
- "normal": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "porter_stem"
- ]
- }
- },
- "filter": {
- "protect_cats": {
- "type": "keyword_marker",
- "keywords": [
- "cats"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "keyword_marker_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 59
- },
- "digest": "abcbf3c246c0d88831b875a601686e35",
- "lang": "console",
- "found": [],
- "source": "POST /keyword_marker_example/_analyze\n{\n \"analyzer\" : \"protect_cats\",\n \"text\" : \"I like cats\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/keyword_marker_example/_analyze",
- "query": null,
- "body": {
- "analyzer": "protect_cats",
- "text": "I like cats"
- },
- "params": {
- "index": "keyword_marker_example"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 71
- },
- "digest": "48a42d10bc3ac72b21ee771895d276cc",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"i\",\n \"start_offset\": 0,\n \"end_offset\": 1,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"like\",\n \"start_offset\": 2,\n \"end_offset\": 6,\n \"type\": \"\",\n \"position\": 1\n },\n {\n \"token\": \"cats\",\n \"start_offset\": 7,\n \"end_offset\": 11,\n \"type\": \"\",\n \"position\": 2\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 102
- },
- "digest": "4ab8f55a8a45d53fb1676112379c212e",
- "lang": "console",
- "found": [],
- "source": "POST /keyword_marker_example/_analyze\n{\n \"analyzer\" : \"normal\",\n \"text\" : \"I like cats\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/keyword_marker_example/_analyze",
- "query": null,
- "body": {
- "analyzer": "normal",
- "text": "I like cats"
- },
- "params": {
- "index": "keyword_marker_example"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 114
- },
- "digest": "d4a7149b7cadd06c7adc0a34de0fa3c3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"i\",\n \"start_offset\": 0,\n \"end_offset\": 1,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"like\",\n \"start_offset\": 2,\n \"end_offset\": 6,\n \"type\": \"\",\n \"position\": 1\n },\n {\n \"token\": \"cat\",\n \"start_offset\": 7,\n \"end_offset\": 11,\n \"type\": \"\",\n \"position\": 2\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 19
- },
- "digest": "9da83c9a2149bfc6fe215a612ae0a9aa",
- "lang": "console",
- "found": [],
- "source": "PUT /keyword_repeat_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"stemmed_and_unstemmed\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\"lowercase\", \"keyword_repeat\", \"porter_stem\", \"unique_stem\"]\n }\n },\n \"filter\": {\n \"unique_stem\": {\n \"type\": \"unique\",\n \"only_on_same_position\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/keyword_repeat_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "stemmed_and_unstemmed": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "keyword_repeat",
- "porter_stem",
- "unique_stem"
- ]
- }
- },
- "filter": {
- "unique_stem": {
- "type": "unique",
- "only_on_same_position": true
- }
- }
- }
- }
- },
- "params": {
- "index": "keyword_repeat_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 45
- },
- "digest": "757622a424b8445fee49746862a11b02",
- "lang": "console",
- "found": [],
- "source": "POST /keyword_repeat_example/_analyze\n{\n \"analyzer\" : \"stemmed_and_unstemmed\",\n \"text\" : \"I like cats\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/keyword_repeat_example/_analyze",
- "query": null,
- "body": {
- "analyzer": "stemmed_and_unstemmed",
- "text": "I like cats"
- },
- "params": {
- "index": "keyword_repeat_example"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 57
- },
- "digest": "cf4d2e10fb710547c77c306b3eb6c811",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"i\",\n \"start_offset\": 0,\n \"end_offset\": 1,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"like\",\n \"start_offset\": 2,\n \"end_offset\": 6,\n \"type\": \"\",\n \"position\": 1\n },\n {\n \"token\": \"cats\",\n \"start_offset\": 7,\n \"end_offset\": 11,\n \"type\": \"\",\n \"position\": 2\n },\n {\n \"token\": \"cat\",\n \"start_offset\": 7,\n \"end_offset\": 11,\n \"type\": \"\",\n \"position\": 2\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/length-tokenfilter.asciidoc",
- "line": 27
- },
- "digest": "1659420311d907d9fc024b96f4150216",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"length\",\n \"min\": 0,\n \"max\": 4\n }\n ],\n \"text\": \"the quick brown fox jumps over the lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "length",
- "min": 0,
- "max": 4
- }
- ],
- "text": "the quick brown fox jumps over the lazy dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/length-tokenfilter.asciidoc",
- "line": 109
- },
- "digest": "ea690283f301c6ce957efad93d7d5c5d",
- "lang": "console",
- "found": [],
- "source": "PUT length_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_length\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"length\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/length_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_length": {
- "tokenizer": "standard",
- "filter": [
- "length"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "length_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/length-tokenfilter.asciidoc",
- "line": 149
- },
- "digest": "d88f883ed2fb8be35cd3e72ddffcf4ef",
- "lang": "console",
- "found": [],
- "source": "PUT length_custom_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_length_2_to_10_char\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"length_2_to_10_char\" ]\n }\n },\n \"filter\": {\n \"length_2_to_10_char\": {\n \"type\": \"length\",\n \"min\": 2,\n \"max\": 10\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/length_custom_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_length_2_to_10_char": {
- "tokenizer": "whitespace",
- "filter": [
- "length_2_to_10_char"
- ]
- }
- },
- "filter": {
- "length_2_to_10_char": {
- "type": "length",
- "min": 2,
- "max": 10
- }
- }
- }
- }
- },
- "params": {
- "index": "length_custom_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/limit-token-count-tokenfilter.asciidoc",
- "line": 43
- },
- "digest": "5a3855f1b3e37d89ab7cbcc4f7ae1dd3",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"limit\",\n \"max_token_count\": 2\n }\n ],\n \"text\": \"quick fox jumps over lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "limit",
- "max_token_count": 2
- }
- ],
- "text": "quick fox jumps over lazy dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/limit-token-count-tokenfilter.asciidoc",
- "line": 96
- },
- "digest": "b96f465abb658fe32889c3d183f159a3",
- "lang": "console",
- "found": [],
- "source": "PUT limit_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_one_token_limit\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"limit\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/limit_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_one_token_limit": {
- "tokenizer": "standard",
- "filter": [
- "limit"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "limit_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/limit-token-count-tokenfilter.asciidoc",
- "line": 123
- },
- "digest": "63521e0089c631d6668c44a0a9d7fdcc",
- "lang": "console",
- "found": [],
- "source": "PUT custom_limit_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_five_token_limit\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"five_token_limit\" ]\n }\n },\n \"filter\": {\n \"five_token_limit\": {\n \"type\": \"limit\",\n \"max_token_count\": 5\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_limit_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_five_token_limit": {
- "tokenizer": "whitespace",
- "filter": [
- "five_token_limit"
- ]
- }
- },
- "filter": {
- "five_token_limit": {
- "type": "limit",
- "max_token_count": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_limit_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/lowercase-tokenfilter.asciidoc",
- "line": 20
- },
- "digest": "aa3284717241ed79d3d1d3bdbbdce598",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"lowercase\"],\n \"text\" : \"THE Quick FoX JUMPs\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "lowercase"
- ],
- "text": "THE Quick FoX JUMPs"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/lowercase-tokenfilter.asciidoc",
- "line": 82
- },
- "digest": "bf173db2ec48059c47eb8a7268545add",
- "lang": "console",
- "found": [],
- "source": "PUT lowercase_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_lowercase\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"lowercase\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/lowercase_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_lowercase": {
- "tokenizer": "whitespace",
- "filter": [
- "lowercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "lowercase_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/lowercase-tokenfilter.asciidoc",
- "line": 131
- },
- "digest": "f268416813befd13c604642c6fe6eda9",
- "lang": "console",
- "found": [],
- "source": "PUT custom_lowercase_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"greek_lowercase_example\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\"greek_lowercase\"]\n }\n },\n \"filter\": {\n \"greek_lowercase\": {\n \"type\": \"lowercase\",\n \"language\": \"greek\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_lowercase_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "greek_lowercase_example": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "greek_lowercase"
- ]
- }
- },
- "filter": {
- "greek_lowercase": {
- "type": "lowercase",
- "language": "greek"
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_lowercase_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/multiplexer-tokenfilter.asciidoc",
- "line": 36
- },
- "digest": "c306212babadc14fa124b88fd8c43a6b",
- "lang": "console",
- "found": [],
- "source": "PUT /multiplexer_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [ \"my_multiplexer\" ]\n }\n },\n \"filter\" : {\n \"my_multiplexer\" : {\n \"type\" : \"multiplexer\",\n \"filters\" : [ \"lowercase\", \"lowercase, porter_stem\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/multiplexer_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "my_multiplexer"
- ]
- }
- },
- "filter": {
- "my_multiplexer": {
- "type": "multiplexer",
- "filters": [
- "lowercase",
- "lowercase, porter_stem"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "multiplexer_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/multiplexer-tokenfilter.asciidoc",
- "line": 61
- },
- "digest": "fa9a3ef94470f3d9bd6500b65bf993d1",
- "lang": "console",
- "found": [],
- "source": "POST /multiplexer_example/_analyze\n{\n \"analyzer\" : \"my_analyzer\",\n \"text\" : \"Going HOME\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/multiplexer_example/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "Going HOME"
- },
- "params": {
- "index": "multiplexer_example"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/multiplexer-tokenfilter.asciidoc",
- "line": 73
- },
- "digest": "3b7cbf575fe4305af42563b9046ca3be",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"Going\",\n \"start_offset\": 0,\n \"end_offset\": 5,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"going\",\n \"start_offset\": 0,\n \"end_offset\": 5,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"go\",\n \"start_offset\": 0,\n \"end_offset\": 5,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"HOME\",\n \"start_offset\": 6,\n \"end_offset\": 10,\n \"type\": \"\",\n \"position\": 1\n },\n {\n \"token\": \"home\", <1>\n \"start_offset\": 6,\n \"end_offset\": 10,\n \"type\": \"\",\n \"position\": 1\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/ngram-tokenfilter.asciidoc",
- "line": 30
- },
- "digest": "f65abb38dd0cfedeb06e0cef206fbdab",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [ \"ngram\" ],\n \"text\": \"Quick fox\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "ngram"
- ],
- "text": "Quick fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/ngram-tokenfilter.asciidoc",
- "line": 161
- },
- "digest": "923aee95078219ee6eb321a252e1121b",
- "lang": "console",
- "found": [],
- "source": "PUT ngram_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_ngram\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"ngram\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/ngram_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_ngram": {
- "tokenizer": "standard",
- "filter": [
- "ngram"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "ngram_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/ngram-tokenfilter.asciidoc",
- "line": 204
- },
- "digest": "2793fa53b7d269852aa74f6bf57e34dc",
- "lang": "console",
- "found": [],
- "source": "PUT ngram_custom_example\n{\n \"settings\": {\n \"index\": {\n \"max_ngram_diff\": 2\n },\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"3_5_grams\" ]\n }\n },\n \"filter\": {\n \"3_5_grams\": {\n \"type\": \"ngram\",\n \"min_gram\": 3,\n \"max_gram\": 5\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/ngram_custom_example",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "max_ngram_diff": 2
- },
- "analysis": {
- "analyzer": {
- "default": {
- "tokenizer": "whitespace",
- "filter": [
- "3_5_grams"
- ]
- }
- },
- "filter": {
- "3_5_grams": {
- "type": "ngram",
- "min_gram": 3,
- "max_gram": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "ngram_custom_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/pattern-capture-tokenfilter.asciidoc",
- "line": 51
- },
- "digest": "f733b25cd4c448b226bb76862974eef2",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"settings\" : {\n \"analysis\" : {\n \"filter\" : {\n \"code\" : {\n \"type\" : \"pattern_capture\",\n \"preserve_original\" : true,\n \"patterns\" : [\n \"(\\\\p{Ll}+|\\\\p{Lu}\\\\p{Ll}+|\\\\p{Lu}+)\",\n \"(\\\\d+)\"\n ]\n }\n },\n \"analyzer\" : {\n \"code\" : {\n \"tokenizer\" : \"pattern\",\n \"filter\" : [ \"code\", \"lowercase\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "code": {
- "type": "pattern_capture",
- "preserve_original": true,
- "patterns": [
- "(\\p{Ll}+|\\p{Lu}\\p{Ll}+|\\p{Lu}+)",
- "(\\d+)"
- ]
- }
- },
- "analyzer": {
- "code": {
- "tokenizer": "pattern",
- "filter": [
- "code",
- "lowercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/pattern-capture-tokenfilter.asciidoc",
- "line": 91
- },
- "digest": "080c34d8151d02b760571e3a2899fa97",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"settings\" : {\n \"analysis\" : {\n \"filter\" : {\n \"email\" : {\n \"type\" : \"pattern_capture\",\n \"preserve_original\" : true,\n \"patterns\" : [\n \"([^@]+)\",\n \"(\\\\p{L}+)\",\n \"(\\\\d+)\",\n \"@(.+)\"\n ]\n }\n },\n \"analyzer\" : {\n \"email\" : {\n \"tokenizer\" : \"uax_url_email\",\n \"filter\" : [ \"email\", \"lowercase\", \"unique\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "email": {
- "type": "pattern_capture",
- "preserve_original": true,
- "patterns": [
- "([^@]+)",
- "(\\p{L}+)",
- "(\\d+)",
- "@(.+)"
- ]
- }
- },
- "analyzer": {
- "email": {
- "tokenizer": "uax_url_email",
- "filter": [
- "email",
- "lowercase",
- "unique"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/predicate-tokenfilter.asciidoc",
- "line": 22
- },
- "digest": "10338787b66a7f93270c3b88dd6197f8",
- "lang": "console",
- "found": [],
- "source": "PUT /condition_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [ \"my_script_filter\" ]\n }\n },\n \"filter\" : {\n \"my_script_filter\" : {\n \"type\" : \"predicate_token_filter\",\n \"script\" : {\n \"source\" : \"token.getTerm().length() > 5\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/condition_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "my_script_filter"
- ]
- }
- },
- "filter": {
- "my_script_filter": {
- "type": "predicate_token_filter",
- "script": {
- "source": "token.getTerm().length() > 5"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "condition_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/predicate-tokenfilter.asciidoc",
- "line": 51
- },
- "digest": "e20493a20d3992a97238b87c6930f08d",
- "lang": "console",
- "found": [],
- "source": "POST /condition_example/_analyze\n{\n \"analyzer\" : \"my_analyzer\",\n \"text\" : \"What Flapdoodle\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/condition_example/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "What Flapdoodle"
- },
- "params": {
- "index": "condition_example"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/predicate-tokenfilter.asciidoc",
- "line": 63
- },
- "digest": "f874e7c40c29fc3b2722f51140c8bf5e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"Flapdoodle\", <1>\n \"start_offset\": 5,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1 <2>\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/reverse-tokenfilter.asciidoc",
- "line": 24
- },
- "digest": "e09d30195108bd6a1f6857394a6123ea",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"reverse\"],\n \"text\" : \"quick fox jumps\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "reverse"
- ],
- "text": "quick fox jumps"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/reverse-tokenfilter.asciidoc",
- "line": 79
- },
- "digest": "aa5fbb68d3a8e0d0c894791cb6cf0b13",
- "lang": "console",
- "found": [],
- "source": "PUT reverse_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_reverse\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"reverse\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/reverse_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_reverse": {
- "tokenizer": "whitespace",
- "filter": [
- "reverse"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "reverse_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/snowball-tokenfilter.asciidoc",
- "line": 17
- },
- "digest": "e776311ef67c972f322b669dc4ab9926",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"lowercase\", \"my_snow\"]\n }\n },\n \"filter\" : {\n \"my_snow\" : {\n \"type\" : \"snowball\",\n \"language\" : \"Lovins\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "my_snow"
- ]
- }
- },
- "filter": {
- "my_snow": {
- "type": "snowball",
- "language": "Lovins"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stemmer-tokenfilter.asciidoc",
- "line": 17
- },
- "digest": "1ca618e7d72ec73c1064fa6eae3086d1",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"lowercase\", \"my_stemmer\"]\n }\n },\n \"filter\" : {\n \"my_stemmer\" : {\n \"type\" : \"stemmer\",\n \"name\" : \"light_german\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "my_stemmer"
- ]
- }
- },
- "filter": {
- "my_stemmer": {
- "type": "stemmer",
- "name": "light_german"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stemmer-override-tokenfilter.asciidoc",
- "line": 25
- },
- "digest": "8995e7cf49c4d870aea334645b70ed13",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"lowercase\", \"custom_stems\", \"porter_stem\"]\n }\n },\n \"filter\" : {\n \"custom_stems\" : {\n \"type\" : \"stemmer_override\",\n \"rules_path\" : \"analysis/stemmer_override.txt\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "custom_stems",
- "porter_stem"
- ]
- }
- },
- "filter": {
- "custom_stems": {
- "type": "stemmer_override",
- "rules_path": "analysis/stemmer_override.txt"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stemmer-override-tokenfilter.asciidoc",
- "line": 57
- },
- "digest": "35e24a98b35cadd0b1b370ada79249e1",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"lowercase\", \"custom_stems\", \"porter_stem\"]\n }\n },\n \"filter\" : {\n \"custom_stems\" : {\n \"type\" : \"stemmer_override\",\n \"rules\" : [\n \"running => run\",\n \"stemmer => stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "custom_stems",
- "porter_stem"
- ]
- }
- },
- "filter": {
- "custom_stems": {
- "type": "stemmer_override",
- "rules": [
- "running => run",
- "stemmer => stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stop-tokenfilter.asciidoc",
- "line": 38
- },
- "digest": "a4575521493d8d1fbdd450821035f821",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"my_stop\": {\n \"type\": \"stop\",\n \"stopwords\": [\"and\", \"is\", \"the\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "my_stop": {
- "type": "stop",
- "stopwords": [
- "and",
- "is",
- "the"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stop-tokenfilter.asciidoc",
- "line": 57
- },
- "digest": "ded95888c2d68c48426b013284eb896a",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"my_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_english_\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "my_stop": {
- "type": "stop",
- "stopwords": "_english_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-tokenfilter.asciidoc",
- "line": 12
- },
- "digest": "09f74df1d07d84ee133ce90f7832e712",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"synonym\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"synonym\"]\n }\n },\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym\",\n \"synonyms_path\" : \"analysis/synonym.txt\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "synonym": {
- "tokenizer": "whitespace",
- "filter": [
- "synonym"
- ]
- }
- },
- "filter": {
- "synonym": {
- "type": "synonym",
- "synonyms_path": "analysis/synonym.txt"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-tokenfilter.asciidoc",
- "line": 51
- },
- "digest": "bcc57126b24c408b5d944928b6f08c94",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"synonym\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"my_stop\", \"synonym\"]\n }\n },\n \"filter\" : {\n \"my_stop\": {\n \"type\" : \"stop\",\n \"stopwords\": [\"bar\"]\n },\n \"synonym\" : {\n \"type\" : \"synonym\",\n \"lenient\": true,\n \"synonyms\" : [\"foo, bar => baz\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "synonym": {
- "tokenizer": "standard",
- "filter": [
- "my_stop",
- "synonym"
- ]
- }
- },
- "filter": {
- "my_stop": {
- "type": "stop",
- "stopwords": [
- "bar"
- ]
- },
- "synonym": {
- "type": "synonym",
- "lenient": true,
- "synonyms": [
- "foo, bar => baz"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-tokenfilter.asciidoc",
- "line": 112
- },
- "digest": "9fb5e28535f396ab2eb8bc710eebc1e6",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym\",\n \"synonyms\" : [\n \"i-pod, i pod => ipod\",\n \"universe, cosmos\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "filter": {
- "synonym": {
- "type": "synonym",
- "synonyms": [
- "i-pod, i pod => ipod",
- "universe, cosmos"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-tokenfilter.asciidoc",
- "line": 143
- },
- "digest": "0c0f37e409459dcd40d29ea684db4706",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym\",\n \"format\" : \"wordnet\",\n \"synonyms\" : [\n \"s(100000001,1,'abstain',v,1,0).\",\n \"s(100000001,2,'refrain',v,1,0).\",\n \"s(100000001,3,'desist',v,1,0).\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "filter": {
- "synonym": {
- "type": "synonym",
- "format": "wordnet",
- "synonyms": [
- "s(100000001,1,'abstain',v,1,0).",
- "s(100000001,2,'refrain',v,1,0).",
- "s(100000001,3,'desist',v,1,0)."
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-graph-tokenfilter.asciidoc",
- "line": 26
- },
- "digest": "2f071d36aa4aff5a2fafb3dadaa38b82",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"search_synonyms\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"graph_synonyms\"]\n }\n },\n \"filter\" : {\n \"graph_synonyms\" : {\n \"type\" : \"synonym_graph\",\n \"synonyms_path\" : \"analysis/synonym.txt\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "search_synonyms": {
- "tokenizer": "whitespace",
- "filter": [
- "graph_synonyms"
- ]
- }
- },
- "filter": {
- "graph_synonyms": {
- "type": "synonym_graph",
- "synonyms_path": "analysis/synonym.txt"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-graph-tokenfilter.asciidoc",
- "line": 61
- },
- "digest": "3d253e5a0029bc96cce484302319b772",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"synonym\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"my_stop\", \"synonym_graph\"]\n }\n },\n \"filter\" : {\n \"my_stop\": {\n \"type\" : \"stop\",\n \"stopwords\": [\"bar\"]\n },\n \"synonym_graph\" : {\n \"type\" : \"synonym_graph\",\n \"lenient\": true,\n \"synonyms\" : [\"foo, bar => baz\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "synonym": {
- "tokenizer": "standard",
- "filter": [
- "my_stop",
- "synonym_graph"
- ]
- }
- },
- "filter": {
- "my_stop": {
- "type": "stop",
- "stopwords": [
- "bar"
- ]
- },
- "synonym_graph": {
- "type": "synonym_graph",
- "lenient": true,
- "synonyms": [
- "foo, bar => baz"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-graph-tokenfilter.asciidoc",
- "line": 121
- },
- "digest": "1a14fd905941ecbdbc943b05875afc6f",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym_graph\",\n \"synonyms\" : [\n \"lol, laughing out loud\",\n \"universe, cosmos\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "filter": {
- "synonym": {
- "type": "synonym_graph",
- "synonyms": [
- "lol, laughing out loud",
- "universe, cosmos"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-graph-tokenfilter.asciidoc",
- "line": 152
- },
- "digest": "f0d7d6d5c878211704d4a5f1b2f6a247",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym_graph\",\n \"format\" : \"wordnet\",\n \"synonyms\" : [\n \"s(100000001,1,'abstain',v,1,0).\",\n \"s(100000001,2,'refrain',v,1,0).\",\n \"s(100000001,3,'desist',v,1,0).\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "filter": {
- "synonym": {
- "type": "synonym_graph",
- "format": "wordnet",
- "synonyms": [
- "s(100000001,1,'abstain',v,1,0).",
- "s(100000001,2,'refrain',v,1,0).",
- "s(100000001,3,'desist',v,1,0)."
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/truncate-tokenfilter.asciidoc",
- "line": 24
- },
- "digest": "ee2d97090d617ed8aa2a87ea33556dd7",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"truncate\"],\n \"text\" : \"the quinquennial extravaganza carried on\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "truncate"
- ],
- "text": "the quinquennial extravaganza carried on"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/truncate-tokenfilter.asciidoc",
- "line": 93
- },
- "digest": "f8651356ce2e7e93fa306c30f57ed588",
- "lang": "console",
- "found": [],
- "source": "PUT custom_truncate_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_truncate\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"truncate\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_truncate_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_truncate": {
- "tokenizer": "standard",
- "filter": [
- "truncate"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_truncate_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/truncate-tokenfilter.asciidoc",
- "line": 128
- },
- "digest": "af84b3995564a7ca84360a526a4ac896",
- "lang": "console",
- "found": [],
- "source": "PUT 5_char_words_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"lowercase_5_char\": {\n \"tokenizer\": \"lowercase\",\n \"filter\": [ \"5_char_trunc\" ]\n }\n },\n \"filter\": {\n \"5_char_trunc\": {\n \"type\": \"truncate\",\n \"length\": 5\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/5_char_words_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "lowercase_5_char": {
- "tokenizer": "lowercase",
- "filter": [
- "5_char_trunc"
- ]
- }
- },
- "filter": {
- "5_char_trunc": {
- "type": "truncate",
- "length": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "5_char_words_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/unique-tokenfilter.asciidoc",
- "line": 26
- },
- "digest": "50d5c5b7e8ed9a95b8d9a25a32a77425",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"unique\"],\n \"text\" : \"the quick fox jumps the lazy fox\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "unique"
- ],
- "text": "the quick fox jumps the lazy fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/unique-tokenfilter.asciidoc",
- "line": 95
- },
- "digest": "a428d518162918733d49261ffd65cfc1",
- "lang": "console",
- "found": [],
- "source": "PUT custom_unique_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_truncate\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"unique\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_unique_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_truncate": {
- "tokenizer": "standard",
- "filter": [
- "unique"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_unique_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/unique-tokenfilter.asciidoc",
- "line": 130
- },
- "digest": "6e1157f3184fa192d47a3d0e3ea17a6c",
- "lang": "console",
- "found": [],
- "source": "PUT letter_unique_pos_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"letter_unique_pos\": {\n \"tokenizer\": \"letter\",\n \"filter\": [ \"unique_pos\" ]\n }\n },\n \"filter\": {\n \"unique_pos\": {\n \"type\": \"unique\",\n \"only_on_same_position\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/letter_unique_pos_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "letter_unique_pos": {
- "tokenizer": "letter",
- "filter": [
- "unique_pos"
- ]
- }
- },
- "filter": {
- "unique_pos": {
- "type": "unique",
- "only_on_same_position": true
- }
- }
- }
- }
- },
- "params": {
- "index": "letter_unique_pos_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/uppercase-tokenfilter.asciidoc",
- "line": 29
- },
- "digest": "9f7671119236423e0e40801ef6485af1",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"uppercase\"],\n \"text\" : \"the Quick FoX JUMPs\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "uppercase"
- ],
- "text": "the Quick FoX JUMPs"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/uppercase-tokenfilter.asciidoc",
- "line": 91
- },
- "digest": "9db72fe811ee61ee3f7baa45916d20e0",
- "lang": "console",
- "found": [],
- "source": "PUT uppercase_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_uppercase\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"uppercase\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/uppercase_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_uppercase": {
- "tokenizer": "whitespace",
- "filter": [
- "uppercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "uppercase_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/htmlstrip-charfilter.asciidoc",
- "line": 12
- },
- "digest": "d6de3491f5787f739d5cd8c2ff3dddfa",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"keyword\", <1>\n \"char_filter\": [ \"html_strip\" ],\n \"text\": \"I'm so happy!
\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "char_filter": [
- "html_strip"
- ],
- "text": "I'm so happy!
"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/htmlstrip-charfilter.asciidoc",
- "line": 74
- },
- "digest": "426f95b13a5b6042b5273d74ad8ee708",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"keyword\",\n \"char_filter\": [\"my_char_filter\"]\n }\n },\n \"char_filter\": {\n \"my_char_filter\": {\n \"type\": \"html_strip\",\n \"escaped_tags\": [\"b\"]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"I'm so happy!
\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "keyword",
- "char_filter": [
- "my_char_filter"
- ]
- }
- },
- "char_filter": {
- "my_char_filter": {
- "type": "html_strip",
- "escaped_tags": [
- "b"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "I'm so happy!
"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/mapping-charfilter.asciidoc",
- "line": 35
- },
- "digest": "f9518803f0368e326ce2f46bd213bde9",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"keyword\",\n \"char_filter\": [\n \"my_char_filter\"\n ]\n }\n },\n \"char_filter\": {\n \"my_char_filter\": {\n \"type\": \"mapping\",\n \"mappings\": [\n \"٠ => 0\",\n \"١ => 1\",\n \"٢ => 2\",\n \"٣ => 3\",\n \"٤ => 4\",\n \"٥ => 5\",\n \"٦ => 6\",\n \"٧ => 7\",\n \"٨ => 8\",\n \"٩ => 9\"\n ]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"My license plate is ٢٥٠١٥\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "keyword",
- "char_filter": [
- "my_char_filter"
- ]
- }
- },
- "char_filter": {
- "my_char_filter": {
- "type": "mapping",
- "mappings": [
- "٠ => 0",
- "١ => 1",
- "٢ => 2",
- "٣ => 3",
- "٤ => 4",
- "٥ => 5",
- "٦ => 6",
- "٧ => 7",
- "٨ => 8",
- "٩ => 9"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "My license plate is ٢٥٠١٥"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/mapping-charfilter.asciidoc",
- "line": 107
- },
- "digest": "8d5c32d86f00cf27d3f52a5fc493ea30",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"char_filter\": [\n \"my_char_filter\"\n ]\n }\n },\n \"char_filter\": {\n \"my_char_filter\": {\n \"type\": \"mapping\",\n \"mappings\": [\n \":) => _happy_\",\n \":( => _sad_\"\n ]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"I'm delighted about it :(\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "char_filter": [
- "my_char_filter"
- ]
- }
- },
- "char_filter": {
- "my_char_filter": {
- "type": "mapping",
- "mappings": [
- ":) => _happy_",
- ":( => _sad_"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "I'm delighted about it :("
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/pattern-replace-charfilter.asciidoc",
- "line": 51
- },
- "digest": "2b8ba109999fc87712433cea92c99ebe",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"char_filter\": [\n \"my_char_filter\"\n ]\n }\n },\n \"char_filter\": {\n \"my_char_filter\": {\n \"type\": \"pattern_replace\",\n \"pattern\": \"(\\\\d+)-(?=\\\\d)\",\n \"replacement\": \"$1_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"My credit card is 123-456-789\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "char_filter": [
- "my_char_filter"
- ]
- }
- },
- "char_filter": {
- "my_char_filter": {
- "type": "pattern_replace",
- "pattern": "(\\d+)-(?=\\d)",
- "replacement": "$1_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "My credit card is 123-456-789"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/pattern-replace-charfilter.asciidoc",
- "line": 101
- },
- "digest": "1e1f0d83b1ca672396341af5dcfd2603",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"char_filter\": [\n \"my_char_filter\"\n ],\n \"filter\": [\n \"lowercase\"\n ]\n }\n },\n \"char_filter\": {\n \"my_char_filter\": {\n \"type\": \"pattern_replace\",\n \"pattern\": \"(?<=\\\\p{Lower})(?=\\\\p{Upper})\",\n \"replacement\": \" \"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"analyzer\": \"my_analyzer\"\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"The fooBarBaz method\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "char_filter": [
- "my_char_filter"
- ],
- "filter": [
- "lowercase"
- ]
- }
- },
- "char_filter": {
- "my_char_filter": {
- "type": "pattern_replace",
- "pattern": "(?<=\\p{Lower})(?=\\p{Upper})",
- "replacement": " "
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "analyzer": "my_analyzer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "The fooBarBaz method"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/pattern-replace-charfilter.asciidoc",
- "line": 202
- },
- "digest": "32afaee3f1326785b4009ff48576d42f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"text\": \"The fooBarBaz method\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"text\": \"bar\"\n }\n },\n \"highlight\": {\n \"fields\": {\n \"text\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "The fooBarBaz method"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "text": "bar"
- }
- },
- "highlight": {
- "fields": {
- "text": {}
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/pattern-replace-charfilter.asciidoc",
- "line": 227
- },
- "digest": "46ac4a940f3218a504b651e65c4ec3c5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"timed_out\": false,\n \"took\": $body.took,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.2876821,\n \"hits\": [\n {\n \"_index\": \"my_index\",\n \"_id\": \"1\",\n \"_score\": 0.2876821,\n \"_source\": {\n \"text\": \"The fooBarBaz method\"\n },\n \"highlight\": {\n \"text\": [\n \"The fooBarBaz method\" <1>\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "analysis/normalizers.asciidoc",
- "line": 25
- },
- "digest": "966ff3a4c5b61ed1a36d44c17ce06157",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"settings\": {\n \"analysis\": {\n \"char_filter\": {\n \"quote\": {\n \"type\": \"mapping\",\n \"mappings\": [\n \"« => \\\"\",\n \"» => \\\"\"\n ]\n }\n },\n \"normalizer\": {\n \"my_normalizer\": {\n \"type\": \"custom\",\n \"char_filter\": [\"quote\"],\n \"filter\": [\"lowercase\", \"asciifolding\"]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\",\n \"normalizer\": \"my_normalizer\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "char_filter": {
- "quote": {
- "type": "mapping",
- "mappings": [
- "« => \"",
- "» => \""
- ]
- }
- },
- "normalizer": {
- "my_normalizer": {
- "type": "custom",
- "char_filter": [
- "quote"
- ],
- "filter": [
- "lowercase",
- "asciifolding"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "foo": {
- "type": "keyword",
- "normalizer": "my_normalizer"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/discovery/voting.asciidoc",
- "line": 31
- },
- "digest": "1605be45a5711d1929d6ad2d1ae0f797",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "metadata.cluster_coordination.last_committed_config"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/discovery/adding-removing-nodes.asciidoc",
- "line": 64
- },
- "digest": "abcc9f98c6bbaf70aa0b1abf8011d2a4",
- "lang": "console",
- "found": [],
- "source": "# Add node to voting configuration exclusions list and wait for the system\n# to auto-reconfigure the node out of the voting configuration up to the\n# default timeout of 30 seconds\nPOST /_cluster/voting_config_exclusions/node_name\n\n# Add node to voting configuration exclusions list and wait for\n# auto-reconfiguration up to one minute\nPOST /_cluster/voting_config_exclusions/node_name?timeout=1m",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "modules/discovery/adding-removing-nodes.asciidoc",
- "line": 107
- },
- "digest": "92f073762634a4b2274f71002494192e",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state?filter_path=metadata.cluster_coordination.voting_config_exclusions",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "metadata.cluster_coordination.voting_config_exclusions"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/discovery/adding-removing-nodes.asciidoc",
- "line": 125
- },
- "digest": "ead4d875877d618594d0cdbdd9b7998b",
- "lang": "console",
- "found": [],
- "source": "# Wait for all the nodes with voting configuration exclusions to be removed from\n# the cluster and then remove all the exclusions, allowing any node to return to\n# the voting configuration in the future.\nDELETE /_cluster/voting_config_exclusions\n\n# Immediately remove all the voting configuration exclusions, allowing any node\n# to return to the voting configuration in the future.\nDELETE /_cluster/voting_config_exclusions?wait_for_removal=false",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "modules/cluster/disk_allocator.asciidoc",
- "line": 55
- },
- "digest": "aaaa9a186db96077879ddfcfbd625fdb",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index.blocks.read_only_allow_delete\": null\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index.blocks.read_only_allow_delete": null
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/disk_allocator.asciidoc",
- "line": 79
- },
- "digest": "4fe5a9e99dc9400d67a5a2f6f6752c07",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\": {\n \"cluster.routing.allocation.disk.watermark.low\": \"100gb\",\n \"cluster.routing.allocation.disk.watermark.high\": \"50gb\",\n \"cluster.routing.allocation.disk.watermark.flood_stage\": \"10gb\",\n \"cluster.info.update.interval\": \"1m\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "cluster.routing.allocation.disk.watermark.low": "100gb",
- "cluster.routing.allocation.disk.watermark.high": "50gb",
- "cluster.routing.allocation.disk.watermark.flood_stage": "10gb",
- "cluster.info.update.interval": "1m"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/allocation_filtering.asciidoc",
- "line": 22
- },
- "digest": "281ae12918af10b6377ec760eaa844ce",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"cluster.routing.allocation.exclude._ip\" : \"10.0.0.1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "cluster.routing.allocation.exclude._ip": "10.0.0.1"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/allocation_filtering.asciidoc",
- "line": 65
- },
- "digest": "07474768b8f9d532b524c15e512736f4",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\": {\n \"cluster.routing.allocation.exclude._ip\": \"192.168.2.*\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "cluster.routing.allocation.exclude._ip": "192.168.2.*"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/misc.asciidoc",
- "line": 79
- },
- "digest": "4207219a892339e8f3abe0df8723dd27",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\": {\n \"cluster.metadata.administrator\": \"sysadmin@example.com\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.metadata.administrator": "sysadmin@example.com"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/misc.asciidoc",
- "line": 119
- },
- "digest": "c3fa14da3d0b0f93fb59bb5386b7e776",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"transient\": {\n \"logger.org.elasticsearch.indices.recovery\": \"DEBUG\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "logger.org.elasticsearch.indices.recovery": "DEBUG"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/http.asciidoc",
- "line": 119
- },
- "digest": "45df8177c5f8a3cc4e36867742e8250c",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"logger.org.elasticsearch.http.HttpTracer\" : \"TRACE\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "logger.org.elasticsearch.http.HttpTracer": "TRACE"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/http.asciidoc",
- "line": 132
- },
- "digest": "fa4e5b5cd144dd03cd507ffa9dec5b7e",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"http.tracer.include\" : \"*\",\n \"http.tracer.exclude\" : \"\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "http.tracer.include": "*",
- "http.tracer.exclude": ""
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 47
- },
- "digest": "00629ea43db6ee1704183170df085495",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_cache/clear?request=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_cache/clear",
- "query": {
- "request": "true"
- },
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 59
- },
- "digest": "adebfecf7485326e9f7fae9de9169abc",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"index.requests.cache.enable\": false\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.requests.cache.enable": false
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 72
- },
- "digest": "f22e069bc0c6f9dae57e084c662a86fd",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index/_settings\n{ \"index.requests.cache.enable\": true }",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_settings",
- "query": null,
- "body": {
- "index.requests.cache.enable": true
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 86
- },
- "digest": "13e9c7cdd43161f1336c94fd70a0db0c",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_search?request_cache=true\n{\n \"size\": 0,\n \"aggs\": {\n \"popular_colors\": {\n \"terms\": {\n \"field\": \"colors\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "request_cache": "true"
- },
- "body": {
- "size": 0,
- "aggs": {
- "popular_colors": {
- "terms": {
- "field": "colors"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 139
- },
- "digest": "36da9668fef56910370f16bfb772cc40",
- "lang": "console",
- "found": [],
- "source": "GET /_stats/request_cache?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats/request_cache",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "metric": "request_cache"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 146
- },
- "digest": "90631797c7fbda43902abf2cc0ea8304",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/stats/indices/request_cache?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/request_cache",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "request_cache"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/transport.asciidoc",
- "line": 157
- },
- "digest": "939e79dee613238f9512fb9cbf0be816",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"logger.org.elasticsearch.transport.TransportService.tracer\" : \"TRACE\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "logger.org.elasticsearch.transport.TransportService.tracer": "TRACE"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/transport.asciidoc",
- "line": 170
- },
- "digest": "cecbbd7b4ec1bf82fd84ae96099febcc",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"transport.tracer.include\" : \"*\",\n \"transport.tracer.exclude\" : \"internal:coordination/fault_detection/*\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "transport.tracer.include": "*",
- "transport.tracer.exclude": "internal:coordination/fault_detection/*"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/remote-clusters.asciidoc",
- "line": 109
- },
- "digest": "d4ce5a9672f85094e6d833d08debc018",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"cluster_one\": {\n \"seeds\": [\n \"127.0.0.1:9300\"\n ],\n \"transport.ping_schedule\": \"30s\"\n },\n \"cluster_two\": {\n \"seeds\": [\n \"127.0.0.1:9301\"\n ],\n \"transport.compress\": true,\n \"skip_unavailable\": true\n },\n \"cluster_three\": {\n \"seeds\": [\n \"127.0.0.1:9302\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "cluster_one": {
- "seeds": [
- "127.0.0.1:9300"
- ],
- "transport.ping_schedule": "30s"
- },
- "cluster_two": {
- "seeds": [
- "127.0.0.1:9301"
- ],
- "transport.compress": true,
- "skip_unavailable": true
- },
- "cluster_three": {
- "seeds": [
- "127.0.0.1:9302"
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/remote-clusters.asciidoc",
- "line": 145
- },
- "digest": "328b7b4d0de6fac3a91205251de6e9b5",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"cluster_one\": {\n \"seeds\": [\n \"127.0.0.1:9300\"\n ],\n \"transport.ping_schedule\": \"60s\"\n },\n \"cluster_two\": {\n \"seeds\": [\n \"127.0.0.1:9301\"\n ],\n \"transport.compress\": false\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "cluster_one": {
- "seeds": [
- "127.0.0.1:9300"
- ],
- "transport.ping_schedule": "60s"
- },
- "cluster_two": {
- "seeds": [
- "127.0.0.1:9301"
- ],
- "transport.compress": false
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/remote-clusters.asciidoc",
- "line": 177
- },
- "digest": "2a0d451f9e13aca39467883b16270cc2",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"cluster_two\": { <1>\n \"seeds\": null,\n \"skip_unavailable\": null,\n \"transport\": {\n \"compress\": null\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "cluster_two": {
- "seeds": null,
- "skip_unavailable": null,
- "transport": {
- "compress": null
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/filtering.asciidoc",
- "line": 54
- },
- "digest": "dad2d4add751fde5c39475ca709cc14b",
- "lang": "console",
- "found": [],
- "source": "PUT test/_settings\n{\n \"index.routing.allocation.include.size\": \"big,medium\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_settings",
- "query": null,
- "body": {
- "index.routing.allocation.include.size": "big,medium"
- },
- "params": {
- "index": "test"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/filtering.asciidoc",
- "line": 67
- },
- "digest": "b8b198ede3d08f315348e2a857e47773",
- "lang": "console",
- "found": [],
- "source": "PUT test/_settings\n{\n \"index.routing.allocation.include.size\": \"big\",\n \"index.routing.allocation.include.rack\": \"rack1\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_settings",
- "query": null,
- "body": {
- "index.routing.allocation.include.size": "big",
- "index.routing.allocation.include.rack": "rack1"
- },
- "params": {
- "index": "test"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/filtering.asciidoc",
- "line": 109
- },
- "digest": "28ac880057135e46b3b00c7f3976538c",
- "lang": "console",
- "found": [],
- "source": "PUT test/_settings\n{\n \"index.routing.allocation.include._ip\": \"192.168.2.*\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_settings",
- "query": null,
- "body": {
- "index.routing.allocation.include._ip": "192.168.2.*"
- },
- "params": {
- "index": "test"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/delayed.asciidoc",
- "line": 40
- },
- "digest": "17e6f3fac556f08a78f7a876e71acb89",
- "lang": "console",
- "found": [],
- "source": "PUT _all/_settings\n{\n \"settings\": {\n \"index.unassigned.node_left.delayed_timeout\": \"5m\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_all/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.unassigned.node_left.delayed_timeout": "5m"
- }
- },
- "params": {
- "index": "_all"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/delayed.asciidoc",
- "line": 82
- },
- "digest": "a38f29375eabd0103f8d7c00b17bb0ab",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/health <1>",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/delayed.asciidoc",
- "line": 95
- },
- "digest": "25d40d3049e57e2bb70c2c5b88bd7b87",
- "lang": "console",
- "found": [],
- "source": "PUT _all/_settings\n{\n \"settings\": {\n \"index.unassigned.node_left.delayed_timeout\": \"0\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_all/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.unassigned.node_left.delayed_timeout": "0"
- }
- },
- "params": {
- "index": "_all"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/prioritization.asciidoc",
- "line": 17
- },
- "digest": "8703f3b1b3895543abc36e2a7a0013d3",
- "lang": "console",
- "found": [],
- "source": "PUT index_1\n\nPUT index_2\n\nPUT index_3\n{\n \"settings\": {\n \"index.priority\": 10\n }\n}\n\nPUT index_4\n{\n \"settings\": {\n \"index.priority\": 5\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_1",
- "query": null,
- "body": null,
- "params": {
- "index": "index_1"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index_2",
- "query": null,
- "body": null,
- "params": {
- "index": "index_2"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index_3",
- "query": null,
- "body": {
- "settings": {
- "index.priority": 10
- }
- },
- "params": {
- "index": "index_3"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index_4",
- "query": null,
- "body": {
- "settings": {
- "index.priority": 5
- }
- },
- "params": {
- "index": "index_4"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/prioritization.asciidoc",
- "line": 48
- },
- "digest": "a425fcab60f603504becee7d001f0a4b",
- "lang": "console",
- "found": [],
- "source": "PUT index_4/_settings\n{\n \"index.priority\": 1\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_4/_settings",
- "query": null,
- "body": {
- "index.priority": 1
- },
- "params": {
- "index": "index_4"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 22
- },
- "digest": "2342a56279106ea643026df657bf7f88",
- "lang": "console",
- "found": [],
- "source": "PUT /index\n{\n \"settings\": {\n \"index\": {\n \"similarity\": {\n \"my_similarity\": {\n \"type\": \"DFR\",\n \"basic_model\": \"g\",\n \"after_effect\": \"l\",\n \"normalization\": \"h2\",\n \"normalization.h2.c\": \"3.0\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "similarity": {
- "my_similarity": {
- "type": "DFR",
- "basic_model": "g",
- "after_effect": "l",
- "normalization": "h2",
- "normalization.h2.c": "3.0"
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 45
- },
- "digest": "528e5f1c345c3769248cc6889e8cf552",
- "lang": "console",
- "found": [],
- "source": "PUT /index/_mapping\n{\n \"properties\" : {\n \"title\" : { \"type\" : \"text\", \"similarity\" : \"my_similarity\" }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "title": {
- "type": "text",
- "similarity": "my_similarity"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 192
- },
- "digest": "dfa16b7300d225e013f23625f44c087b",
- "lang": "console",
- "found": [],
- "source": "PUT /index\n{\n \"settings\": {\n \"number_of_shards\": 1,\n \"similarity\": {\n \"scripted_tfidf\": {\n \"type\": \"scripted\",\n \"script\": {\n \"source\": \"double tf = Math.sqrt(doc.freq); double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; double norm = 1/Math.sqrt(doc.length); return query.boost * tf * idf * norm;\"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"field\": {\n \"type\": \"text\",\n \"similarity\": \"scripted_tfidf\"\n }\n }\n }\n}\n\nPUT /index/_doc/1\n{\n \"field\": \"foo bar foo\"\n}\n\nPUT /index/_doc/2\n{\n \"field\": \"bar baz\"\n}\n\nPOST /index/_refresh\n\nGET /index/_search?explain=true\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"foo^1.7\",\n \"default_field\": \"field\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 1,
- "similarity": {
- "scripted_tfidf": {
- "type": "scripted",
- "script": {
- "source": "double tf = Math.sqrt(doc.freq); double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; double norm = 1/Math.sqrt(doc.length); return query.boost * tf * idf * norm;"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "field": {
- "type": "text",
- "similarity": "scripted_tfidf"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "field": "foo bar foo"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/2",
- "query": null,
- "body": {
- "field": "bar baz"
- },
- "params": {
- "index": "index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.refresh"
- },
- {
- "method": "GET",
- "url": "/index/_search",
- "query": {
- "explain": "true"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "foo^1.7",
- "default_field": "field"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 242
- },
- "digest": "df8b1a4d943bd74796fceec5133e995b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 12,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.9508477,\n \"hits\": [\n {\n \"_shard\": \"[index][0]\",\n \"_node\": \"OzrdjxNtQGaqs4DmioFw9A\",\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 1.9508477,\n \"_source\": {\n \"field\": \"foo bar foo\"\n },\n \"_explanation\": {\n \"value\": 1.9508477,\n \"description\": \"weight(field:foo in 0) [PerFieldSimilarity], result of:\",\n \"details\": [\n {\n \"value\": 1.9508477,\n \"description\": \"score from ScriptedSimilarity(weightScript=[null], script=[Script{type=inline, lang='painless', idOrCode='double tf = Math.sqrt(doc.freq); double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; double norm = 1/Math.sqrt(doc.length); return query.boost * tf * idf * norm;', options={}, params={}}]) computed from:\",\n \"details\": [\n {\n \"value\": 1.0,\n \"description\": \"weight\",\n \"details\": []\n },\n {\n \"value\": 1.7,\n \"description\": \"query.boost\",\n \"details\": []\n },\n {\n \"value\": 2,\n \"description\": \"field.docCount\",\n \"details\": []\n },\n {\n \"value\": 4,\n \"description\": \"field.sumDocFreq\",\n \"details\": []\n },\n {\n \"value\": 5,\n \"description\": \"field.sumTotalTermFreq\",\n \"details\": []\n },\n {\n \"value\": 1,\n \"description\": \"term.docFreq\",\n \"details\": []\n },\n {\n \"value\": 2,\n \"description\": \"term.totalTermFreq\",\n \"details\": []\n },\n {\n \"value\": 2.0,\n \"description\": \"doc.freq\",\n \"details\": []\n },\n {\n \"value\": 3,\n \"description\": \"doc.length\",\n \"details\": []\n }\n ]\n }\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 357
- },
- "digest": "5f8fb5513d4f725434db2f517ad4298f",
- "lang": "console",
- "found": [],
- "source": "PUT /index\n{\n \"settings\": {\n \"number_of_shards\": 1,\n \"similarity\": {\n \"scripted_tfidf\": {\n \"type\": \"scripted\",\n \"weight_script\": {\n \"source\": \"double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; return query.boost * idf;\"\n },\n \"script\": {\n \"source\": \"double tf = Math.sqrt(doc.freq); double norm = 1/Math.sqrt(doc.length); return weight * tf * norm;\"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"field\": {\n \"type\": \"text\",\n \"similarity\": \"scripted_tfidf\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 1,
- "similarity": {
- "scripted_tfidf": {
- "type": "scripted",
- "weight_script": {
- "source": "double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; return query.boost * idf;"
- },
- "script": {
- "source": "double tf = Math.sqrt(doc.freq); double norm = 1/Math.sqrt(doc.length); return weight * tf * norm;"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "field": {
- "type": "text",
- "similarity": "scripted_tfidf"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 520
- },
- "digest": "553d79817bb1333970e99507c37a159a",
- "lang": "console",
- "found": [],
- "source": "PUT /index\n{\n \"settings\": {\n \"index\": {\n \"similarity\": {\n \"default\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "similarity": {
- "default": {
- "type": "boolean"
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 540
- },
- "digest": "48de51de87a8ad9fd8b8db1ca25b85c1",
- "lang": "console",
- "found": [],
- "source": "POST /index/_close\n\nPUT /index/_settings\n{\n \"index\": {\n \"similarity\": {\n \"default\": {\n \"type\": \"boolean\"\n }\n }\n }\n}\n\nPOST /index/_open",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/index/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.close"
- },
- {
- "method": "PUT",
- "url": "/index/_settings",
- "query": null,
- "body": {
- "index": {
- "similarity": {
- "default": {
- "type": "boolean"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.put_settings"
- },
- {
- "method": "POST",
- "url": "/index/_open",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.open"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/slowlog.asciidoc",
- "line": 33
- },
- "digest": "fa0b341d790a4da480b47bf501835359",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index.search.slowlog.threshold.query.warn\": \"10s\",\n \"index.search.slowlog.threshold.query.info\": \"5s\",\n \"index.search.slowlog.threshold.query.debug\": \"2s\",\n \"index.search.slowlog.threshold.query.trace\": \"500ms\",\n \"index.search.slowlog.threshold.fetch.warn\": \"1s\",\n \"index.search.slowlog.threshold.fetch.info\": \"800ms\",\n \"index.search.slowlog.threshold.fetch.debug\": \"500ms\",\n \"index.search.slowlog.threshold.fetch.trace\": \"200ms\",\n \"index.search.slowlog.level\": \"info\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index.search.slowlog.threshold.query.warn": "10s",
- "index.search.slowlog.threshold.query.info": "5s",
- "index.search.slowlog.threshold.query.debug": "2s",
- "index.search.slowlog.threshold.query.trace": "500ms",
- "index.search.slowlog.threshold.fetch.warn": "1s",
- "index.search.slowlog.threshold.fetch.info": "800ms",
- "index.search.slowlog.threshold.fetch.debug": "500ms",
- "index.search.slowlog.threshold.fetch.trace": "200ms",
- "index.search.slowlog.level": "info"
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/slowlog.asciidoc",
- "line": 143
- },
- "digest": "44a16db65121edaf099d944819356e2c",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index.indexing.slowlog.threshold.index.warn\": \"10s\",\n \"index.indexing.slowlog.threshold.index.info\": \"5s\",\n \"index.indexing.slowlog.threshold.index.debug\": \"2s\",\n \"index.indexing.slowlog.threshold.index.trace\": \"500ms\",\n \"index.indexing.slowlog.level\": \"info\",\n \"index.indexing.slowlog.source\": \"1000\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index.indexing.slowlog.threshold.index.warn": "10s",
- "index.indexing.slowlog.threshold.index.info": "5s",
- "index.indexing.slowlog.threshold.index.debug": "2s",
- "index.indexing.slowlog.threshold.index.trace": "500ms",
- "index.indexing.slowlog.level": "info",
- "index.indexing.slowlog.source": "1000"
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/store.asciidoc",
- "line": 30
- },
- "digest": "fba99da14d4323c91794703438979912",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"index.store.type\": \"hybridfs\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.store.type": "hybridfs"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/store.asciidoc",
- "line": 120
- },
- "digest": "9ba2e779fe3e9d12ed5fca1ba3f8be97",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"index.store.preload\": [\"nvd\", \"dvd\"]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.store.preload": [
- "nvd",
- "dvd"
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 16
- },
- "digest": "fea339c85b60ccefa6a163a70b86ca82",
- "lang": "console",
- "found": [],
- "source": "PUT twitter\n{\n \"settings\" : {\n \"index\" : {\n \"sort.field\" : \"date\", <1>\n \"sort.order\" : \"desc\" <2>\n }\n },\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "sort.field": "date",
- "sort.order": "desc"
- }
- },
- "mappings": {
- "properties": {
- "date": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 41
- },
- "digest": "a69f1a67cdc141e8dde5abb437c76959",
- "lang": "console",
- "found": [],
- "source": "PUT twitter\n{\n \"settings\" : {\n \"index\" : {\n \"sort.field\" : [\"username\", \"date\"], <1>\n \"sort.order\" : [\"asc\", \"desc\"] <2>\n }\n },\n \"mappings\": {\n \"properties\": {\n \"username\": {\n \"type\": \"keyword\",\n \"doc_values\": true\n },\n \"date\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "sort.field": [
- "username",
- "date"
- ],
- "sort.order": [
- "asc",
- "desc"
- ]
- }
- },
- "mappings": {
- "properties": {
- "username": {
- "type": "keyword",
- "doc_values": true
- },
- "date": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 114
- },
- "digest": "e01a82a0a809a4770ddc84c2cfc1ec85",
- "lang": "console",
- "found": [],
- "source": "PUT events\n{\n \"settings\" : {\n \"index\" : {\n \"sort.field\" : \"timestamp\",\n \"sort.order\" : \"desc\" <1>\n }\n },\n \"mappings\": {\n \"properties\": {\n \"timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/events",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "sort.field": "timestamp",
- "sort.order": "desc"
- }
- },
- "mappings": {
- "properties": {
- "timestamp": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "events"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 138
- },
- "digest": "46a3694ee4a7bbd4973565e5886782bb",
- "lang": "console",
- "found": [],
- "source": "GET /events/_search\n{\n \"size\": 10,\n \"sort\": [\n { \"timestamp\": \"desc\" }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/events/_search",
- "query": null,
- "body": {
- "size": 10,
- "sort": [
- {
- "timestamp": "desc"
- }
- ]
- },
- "params": {
- "index": "events"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 159
- },
- "digest": "2e8ba1e0b2a18dd276bbbe64f2b86338",
- "lang": "console",
- "found": [],
- "source": "GET /events/_search\n{\n \"size\": 10,\n \"sort\": [ <1>\n { \"timestamp\": \"desc\" }\n ],\n \"track_total_hits\": false\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/events/_search",
- "query": null,
- "body": {
- "size": 10,
- "sort": [
- {
- "timestamp": "desc"
- }
- ],
- "track_total_hits": false
- },
- "params": {
- "index": "events"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 177
- },
- "digest": "44a1acf9f77e74727d4847090036bd6c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"hits\" : { <1>\n \"max_score\" : null,\n \"hits\" : []\n },\n \"took\": 20,\n \"timed_out\": false\n}"
- },
- {
- "source_location": {
- "file": "ingest.asciidoc",
- "line": 32
- },
- "digest": "55704b69b03239fe13293fc7622d27da",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/my_pipeline_id\n{\n \"description\" : \"describe pipeline\",\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"new\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my_pipeline_id",
- "query": null,
- "body": {
- "description": "describe pipeline",
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "new"
- }
- }
- ]
- },
- "params": {
- "id": "my_pipeline_id"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest.asciidoc",
- "line": 50
- },
- "digest": "6f3a4b4a01b6fae193897f00cb4855d0",
- "lang": "console",
- "found": [],
- "source": "PUT my-index/_doc/my-id?pipeline=my_pipeline_id\n{\n \"foo\": \"bar\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/my-id",
- "query": {
- "pipeline": "my_pipeline_id"
- },
- "body": {
- "foo": "bar"
- },
- "params": {
- "index": "my-index",
- "id": "my-id"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest.asciidoc",
- "line": 61
- },
- "digest": "774147a82be722cd9e2895a001a71d42",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"my-index\",\n \"_id\" : \"my-id\",\n \"_version\" : 1,\n \"result\" : \"created\",\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 2,\n \"failed\" : 0\n },\n \"_seq_no\" : 0,\n \"_primary_term\" : 1\n}"
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 171
- },
- "digest": "841306ff1ac69cceb5bf1c28e2f26dd3",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/drop_guests_network\n{\n \"processors\": [\n {\n \"drop\": {\n \"if\": \"ctx.network_name == 'Guest'\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/drop_guests_network",
- "query": null,
- "body": {
- "processors": [
- {
- "drop": {
- "if": "ctx.network_name == 'Guest'"
- }
- }
- ]
- },
- "params": {
- "id": "drop_guests_network"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 187
- },
- "digest": "027ee5302d967b530123886906c42a90",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/1?pipeline=drop_guests_network\n{\n \"network_name\" : \"Guest\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "pipeline": "drop_guests_network"
- },
- "body": {
- "network_name": "Guest"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 198
- },
- "digest": "7d19f1f8917dda24c23ada23a7fb6ca8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": -3,\n \"result\": \"noop\",\n \"_shards\": {\n \"total\": 0,\n \"successful\": 0,\n \"failed\": 0\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 227
- },
- "digest": "9a5f1f590791012d32d29605daf82135",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/drop_guests_network\n{\n \"processors\": [\n {\n \"drop\": {\n \"if\": \"ctx.network?.name == 'Guest'\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/drop_guests_network",
- "query": null,
- "body": {
- "processors": [
- {
- "drop": {
- "if": "ctx.network?.name == 'Guest'"
- }
- }
- ]
- },
- "params": {
- "id": "drop_guests_network"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 243
- },
- "digest": "f8a8b78caaf69d44c71c476ea2a178aa",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/1?pipeline=drop_guests_network\n{\n \"network\": {\n \"name\": \"Guest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "pipeline": "drop_guests_network"
- },
- "body": {
- "network": {
- "name": "Guest"
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 258
- },
- "digest": "3eb75cee4c802d99bb526386349ee36b",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/2?pipeline=drop_guests_network\n{\n \"foo\" : \"bar\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/2",
- "query": {
- "pipeline": "drop_guests_network"
- },
- "body": {
- "foo": "bar"
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 318
- },
- "digest": "089ca88d7fd064a474e156d773211bc5",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/drop_guests_network\n{\n \"processors\": [\n {\n \"dot_expander\": {\n \"field\": \"network.name\"\n }\n },\n {\n \"drop\": {\n \"if\": \"ctx.network?.name == 'Guest'\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/drop_guests_network",
- "query": null,
- "body": {
- "processors": [
- {
- "dot_expander": {
- "field": "network.name"
- }
- },
- {
- "drop": {
- "if": "ctx.network?.name == 'Guest'"
- }
- }
- ]
- },
- "params": {
- "id": "drop_guests_network"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 339
- },
- "digest": "8f6cec77f890027ad2e01f06e1290e25",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/3?pipeline=drop_guests_network\n{\n \"network.name\": \"Guest\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/3",
- "query": {
- "pipeline": "drop_guests_network"
- },
- "body": {
- "network.name": "Guest"
- },
- "params": {
- "index": "test",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 386
- },
- "digest": "3b54be0a1a020edb8943f063f05b5cd7",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/not_prod_dropper\n{\n \"processors\": [\n {\n \"drop\": {\n \"if\": \"Collection tags = ctx.tags;if(tags != null){for (String tag : tags) {if (tag.toLowerCase().contains('prod')) { return false;}}} return true;\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/not_prod_dropper",
- "query": null,
- "body": {
- "processors": [
- {
- "drop": {
- "if": "Collection tags = ctx.tags;if(tags != null){for (String tag : tags) {if (tag.toLowerCase().contains('prod')) { return false;}}} return true;"
- }
- }
- ]
- },
- "params": {
- "id": "not_prod_dropper"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 431
- },
- "digest": "da19607976c3740945300c18e692bc49",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/1?pipeline=not_prod_dropper\n{\n \"tags\": [\"application:myapp\", \"env:Stage\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "pipeline": "not_prod_dropper"
- },
- "body": {
- "tags": [
- "application:myapp",
- "env:Stage"
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 446
- },
- "digest": "784dcf96b4970ce6c90d999cdfc2ef0b",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/2?pipeline=not_prod_dropper\n{\n \"tags\": [\"application:myapp\", \"env:Production\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/2",
- "query": {
- "pipeline": "not_prod_dropper"
- },
- "body": {
- "tags": [
- "application:myapp",
- "env:Production"
- ]
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 498
- },
- "digest": "7cc6435cb7508e532df1e761934f1683",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/logs_pipeline\n{\n \"description\": \"A pipeline of pipelines for log files\",\n \"version\": 1,\n \"processors\": [\n {\n \"pipeline\": {\n \"if\": \"ctx.service?.name == 'apache_httpd'\",\n \"name\": \"httpd_pipeline\"\n }\n },\n {\n \"pipeline\": {\n \"if\": \"ctx.service?.name == 'syslog'\",\n \"name\": \"syslog_pipeline\"\n }\n },\n {\n \"fail\": {\n \"if\": \"ctx.service?.name != 'apache_httpd' && ctx.service?.name != 'syslog'\",\n \"message\": \"This pipeline requires service.name to be either `syslog` or `apache_httpd`\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/logs_pipeline",
- "query": null,
- "body": {
- "description": "A pipeline of pipelines for log files",
- "version": 1,
- "processors": [
- {
- "pipeline": {
- "if": "ctx.service?.name == 'apache_httpd'",
- "name": "httpd_pipeline"
- }
- },
- {
- "pipeline": {
- "if": "ctx.service?.name == 'syslog'",
- "name": "syslog_pipeline"
- }
- },
- {
- "fail": {
- "if": "ctx.service?.name != 'apache_httpd' && ctx.service?.name != 'syslog'",
- "message": "This pipeline requires service.name to be either `syslog` or `apache_httpd`"
- }
- }
- ]
- },
- "params": {
- "id": "logs_pipeline"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 545
- },
- "digest": "fe2d94eba550076cc27ee21a711fdb5c",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/check_url\n{\n \"processors\": [\n {\n \"set\": {\n \"if\": \"ctx.href?.url =~ /^http[^s]/\",\n \"field\": \"href.insecure\",\n \"value\": true\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/check_url",
- "query": null,
- "body": {
- "processors": [
- {
- "set": {
- "if": "ctx.href?.url =~ /^http[^s]/",
- "field": "href.insecure",
- "value": true
- }
- }
- ]
- },
- "params": {
- "id": "check_url"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 561
- },
- "digest": "bfc92c930234ada7a3f394263b0deb1e",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/1?pipeline=check_url\n{\n \"href\": {\n \"url\": \"http://www.elastic.co/\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "pipeline": "check_url"
- },
- "body": {
- "href": {
- "url": "http://www.elastic.co/"
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 583
- },
- "digest": "229eccca4c5d8f5ad0d704c8eb43c3b9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\": 60,\n \"_primary_term\": 1,\n \"found\": true,\n \"_source\": {\n \"href\": {\n \"insecure\": true,\n \"url\": \"http://www.elastic.co/\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 609
- },
- "digest": "2ad6189aef1ecbb52bf0ddbd4e7a80cb",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/check_url\n{\n \"processors\": [\n {\n \"set\": {\n \"if\": \"ctx.href?.url != null && ctx.href.url.startsWith('http://')\",\n \"field\": \"href.insecure\",\n \"value\": true\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/check_url",
- "query": null,
- "body": {
- "processors": [
- {
- "set": {
- "if": "ctx.href?.url != null && ctx.href.url.startsWith('http://')",
- "field": "href.insecure",
- "value": true
- }
- }
- ]
- },
- "params": {
- "id": "check_url"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 305
- },
- "digest": "0c8bce944c1189a8551e8dbd99c365f2",
- "lang": "console",
- "found": [],
- "source": "PUT /postal_codes\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_shape\"\n },\n \"postal_code\": {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/postal_codes",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_shape"
- },
- "postal_code": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "postal_codes"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 324
- },
- "digest": "497a51622ef123efc44e54ba2106385e",
- "lang": "console",
- "found": [],
- "source": "PUT /postal_codes/_doc/1?refresh=wait_for\n{\n \"location\": {\n \"type\": \"envelope\",\n \"coordinates\": [[13.0, 53.0], [14.0, 52.0]]\n },\n \"postal_code\": \"96598\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/postal_codes/_doc/1",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "location": {
- "type": "envelope",
- "coordinates": [
- [
- 13,
- 53
- ],
- [
- 14,
- 52
- ]
- ]
- },
- "postal_code": "96598"
- },
- "params": {
- "index": "postal_codes",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 346
- },
- "digest": "99da25a3d63f98c16df47f21acbf37e7",
- "lang": "console",
- "found": [],
- "source": "PUT /_enrich/policy/postal_policy\n{\n \"geo_match\": {\n \"indices\": \"postal_codes\",\n \"match_field\": \"location\",\n \"enrich_fields\": [\"location\",\"postal_code\"]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_enrich/policy/postal_policy",
- "query": null,
- "body": {
- "geo_match": {
- "indices": "postal_codes",
- "match_field": "location",
- "enrich_fields": [
- "location",
- "postal_code"
- ]
- }
- },
- "params": {
- "name": "postal_policy"
- },
- "api": "enrich.put_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 362
- },
- "digest": "207c04ccbdce0e8a289070a3b0a79ecb",
- "lang": "console",
- "found": [],
- "source": "POST /_enrich/policy/postal_policy/_execute",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 381
- },
- "digest": "83b4a737514a047d31f12f110bed0b5e",
- "lang": "console",
- "found": [],
- "source": "PUT /_ingest/pipeline/postal_lookup\n{\n \"description\": \"Enrich postal codes\",\n \"processors\": [\n {\n \"enrich\": {\n \"policy_name\": \"postal_policy\",\n \"field\": \"geo_location\",\n \"target_field\": \"geo_data\",\n \"shape_relation\": \"INTERSECTS\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/postal_lookup",
- "query": null,
- "body": {
- "description": "Enrich postal codes",
- "processors": [
- {
- "enrich": {
- "policy_name": "postal_policy",
- "field": "geo_location",
- "target_field": "geo_data",
- "shape_relation": "INTERSECTS"
- }
- }
- ]
- },
- "params": {
- "id": "postal_lookup"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 403
- },
- "digest": "ad3b9d676187bebdb62e0f1de9a202e0",
- "lang": "console",
- "found": [],
- "source": "PUT /users/_doc/0?pipeline=postal_lookup\n{\n \"first_name\": \"Mardy\",\n \"last_name\": \"Brown\",\n \"geo_location\": \"POINT (13.5 52.5)\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users/_doc/0",
- "query": {
- "pipeline": "postal_lookup"
- },
- "body": {
- "first_name": "Mardy",
- "last_name": "Brown",
- "geo_location": "POINT (13.5 52.5)"
- },
- "params": {
- "index": "users",
- "id": "0"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 417
- },
- "digest": "a3f3c1f3f31dbd225da5fd14633bc4a0",
- "lang": "console",
- "found": [],
- "source": "GET /users/_doc/0",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/users/_doc/0",
- "query": null,
- "body": null,
- "params": {
- "index": "users",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 425
- },
- "digest": "1fabc3706c34195873abecc44203073a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"users\",\n \"_id\": \"0\",\n \"_version\": 1,\n \"_seq_no\": 55,\n \"_primary_term\": 1,\n \"_source\": {\n \"geo_data\": {\n \"location\": {\n \"type\": \"envelope\",\n \"coordinates\": [[13.0, 53.0], [14.0, 52.0]]\n },\n \"postal_code\": \"96598\"\n },\n \"first_name\": \"Mardy\",\n \"last_name\": \"Brown\",\n \"geo_location\": \"POINT (13.5 52.5)\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 478
- },
- "digest": "927dd38daa489175a5008799452e870a",
- "lang": "console",
- "found": [],
- "source": "PUT /users/_doc/1?refresh=wait_for\n{\n \"email\": \"mardy.brown@asciidocsmith.com\",\n \"first_name\": \"Mardy\",\n \"last_name\": \"Brown\",\n \"city\": \"New Orleans\",\n \"county\": \"Orleans\",\n \"state\": \"LA\",\n \"zip\": 70116,\n \"web\": \"mardy.asciidocsmith.com\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users/_doc/1",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "email": "mardy.brown@asciidocsmith.com",
- "first_name": "Mardy",
- "last_name": "Brown",
- "city": "New Orleans",
- "county": "Orleans",
- "state": "LA",
- "zip": 70116,
- "web": "mardy.asciidocsmith.com"
- },
- "params": {
- "index": "users",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 502
- },
- "digest": "9ab4e8a564e13475cb3a0376be56bb8e",
- "lang": "console",
- "found": [],
- "source": "PUT /_enrich/policy/users-policy\n{\n \"match\": {\n \"indices\": \"users\",\n \"match_field\": \"email\",\n \"enrich_fields\": [\"first_name\", \"last_name\", \"city\", \"zip\", \"state\"]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_enrich/policy/users-policy",
- "query": null,
- "body": {
- "match": {
- "indices": "users",
- "match_field": "email",
- "enrich_fields": [
- "first_name",
- "last_name",
- "city",
- "zip",
- "state"
- ]
- }
- },
- "params": {
- "name": "users-policy"
- },
- "api": "enrich.put_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 518
- },
- "digest": "af4f82ce86672a9bafd834f334c8e1c9",
- "lang": "console",
- "found": [],
- "source": "POST /_enrich/policy/users-policy/_execute",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 535
- },
- "digest": "958b661d89b2beeb0cfefe8edbe3e408",
- "lang": "console",
- "found": [],
- "source": "PUT /_ingest/pipeline/user_lookup\n{\n \"description\" : \"Enriching user details to messages\",\n \"processors\" : [\n {\n \"enrich\" : {\n \"policy_name\": \"users-policy\",\n \"field\" : \"email\",\n \"target_field\": \"user\",\n \"max_matches\": \"1\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/user_lookup",
- "query": null,
- "body": {
- "description": "Enriching user details to messages",
- "processors": [
- {
- "enrich": {
- "policy_name": "users-policy",
- "field": "email",
- "target_field": "user",
- "max_matches": "1"
- }
- }
- ]
- },
- "params": {
- "id": "user_lookup"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 557
- },
- "digest": "7495d7e8d99e4f5ac8034988b706e09d",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index/_doc/my_id?pipeline=user_lookup\n{\n \"email\": \"mardy.brown@asciidocsmith.com\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "user_lookup"
- },
- "body": {
- "email": "mardy.brown@asciidocsmith.com"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 569
- },
- "digest": "ce20ab8067b6e4ad68e8ad7a5a0b73fd",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 577
- },
- "digest": "51c5541ef8f46d02fe0a82a77fd10381",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"my_index\",\n \"_id\": \"my_id\",\n \"_version\": 1,\n \"_seq_no\": 55,\n \"_primary_term\": 1,\n \"_source\": {\n \"user\": {\n \"email\": \"mardy.brown@asciidocsmith.com\",\n \"first_name\": \"Mardy\",\n \"last_name\": \"Brown\",\n \"zip\": 70116,\n \"city\": \"New Orleans\",\n \"state\": \"LA\"\n },\n \"email\": \"mardy.brown@asciidocsmith.com\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 24
- },
- "digest": "92223bd2873546d7efb557de81b9f75d",
- "lang": "console",
- "found": [],
- "source": "PUT circles\n{\n \"mappings\": {\n \"properties\": {\n \"circle\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}\n\nPUT _ingest/pipeline/polygonize_circles\n{\n \"description\": \"translate circle to polygon\",\n \"processors\": [\n {\n \"circle\": {\n \"field\": \"circle\",\n \"error_distance\": 28.0,\n \"shape_type\": \"geo_shape\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/circles",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "circle": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "circles"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/polygonize_circles",
- "query": null,
- "body": {
- "description": "translate circle to polygon",
- "processors": [
- {
- "circle": {
- "field": "circle",
- "error_distance": 28,
- "shape_type": "geo_shape"
- }
- }
- ]
- },
- "params": {
- "id": "polygonize_circles"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 61
- },
- "digest": "b0b1ae9582599f501f3b3ed8a42ea2af",
- "lang": "console",
- "found": [],
- "source": "PUT circles/_doc/1?pipeline=polygonize_circles\n{\n \"circle\": \"CIRCLE (30 10 40)\"\n}\n\nGET circles/_doc/1",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/circles/_doc/1",
- "query": {
- "pipeline": "polygonize_circles"
- },
- "body": {
- "circle": "CIRCLE (30 10 40)"
- },
- "params": {
- "index": "circles",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/circles/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "circles",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 74
- },
- "digest": "0cec3cd5ad68774be62c362e10bab293",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"circles\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\": 22,\n \"_primary_term\": 1,\n \"_source\": {\n \"circle\": \"POLYGON ((30.000365257263184 10.0, 30.000111397193788 10.00034284530941, 29.999706043744222 10.000213571721195, 29.999706043744222 9.999786428278805, 30.000111397193788 9.99965715469059, 30.000365257263184 10.0))\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 94
- },
- "digest": "415b46bc2b7a7b4dcf9a73ac67ea20e9",
- "lang": "console",
- "found": [],
- "source": "PUT circles/_doc/2?pipeline=polygonize_circles\n{\n \"circle\": {\n \"type\": \"circle\",\n \"radius\": \"40m\",\n \"coordinates\": [30, 10]\n }\n}\n\nGET circles/_doc/2",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/circles/_doc/2",
- "query": {
- "pipeline": "polygonize_circles"
- },
- "body": {
- "circle": {
- "type": "circle",
- "radius": "40m",
- "coordinates": [
- 30,
- 10
- ]
- }
- },
- "params": {
- "index": "circles",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/circles/_doc/2",
- "query": null,
- "body": null,
- "params": {
- "index": "circles",
- "id": "2"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 111
- },
- "digest": "0c8975f6497b2f06e68077b613427d41",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"circles\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"_seq_no\": 22,\n \"_primary_term\": 1,\n \"_source\": {\n \"circle\": {\n \"coordinates\": [\n [\n [30.000365257263184, 10.0],\n [30.000111397193788, 10.00034284530941],\n [29.999706043744222, 10.000213571721195],\n [29.999706043744222, 9.999786428278805],\n [30.000111397193788, 9.99965715469059],\n [30.000365257263184, 10.0]\n ]\n ],\n \"type\": \"Polygon\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 20
- },
- "digest": "83c8cce0372677857609a2e80e8eb1c4",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/monthlyindex\n{\n \"description\": \"monthly date-time index naming\",\n \"processors\" : [\n {\n \"date_index_name\" : {\n \"field\" : \"date1\",\n \"index_name_prefix\" : \"myindex-\",\n \"date_rounding\" : \"M\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/monthlyindex",
- "query": null,
- "body": {
- "description": "monthly date-time index naming",
- "processors": [
- {
- "date_index_name": {
- "field": "date1",
- "index_name_prefix": "myindex-",
- "date_rounding": "M"
- }
- }
- ]
- },
- "params": {
- "id": "monthlyindex"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 40
- },
- "digest": "9f3f1b6bd431f6fa40fc17ce9a5a89b8",
- "lang": "console",
- "found": [],
- "source": "PUT /myindex/_doc/1?pipeline=monthlyindex\n{\n \"date1\" : \"2016-04-25T12:02:01.789Z\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/myindex/_doc/1",
- "query": {
- "pipeline": "monthlyindex"
- },
- "body": {
- "date1": "2016-04-25T12:02:01.789Z"
- },
- "params": {
- "index": "myindex",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 49
- },
- "digest": "2a1fdfaf9024667c454f5770786bb100",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"myindex-2016-04-01\",\n \"_id\" : \"1\",\n \"_version\" : 1,\n \"result\" : \"created\",\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 1,\n \"failed\" : 0\n },\n \"_seq_no\" : 55,\n \"_primary_term\" : 1\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 75
- },
- "digest": "44f672df54c28327070b4ca09999718c",
- "lang": "console",
- "found": [],
- "source": "POST _ingest/pipeline/_simulate\n{\n \"pipeline\" :\n {\n \"description\": \"monthly date-time index naming\",\n \"processors\" : [\n {\n \"date_index_name\" : {\n \"field\" : \"date1\",\n \"index_name_prefix\" : \"myindex-\",\n \"date_rounding\" : \"M\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_source\": {\n \"date1\": \"2016-04-25T12:02:01.789Z\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": null,
- "body": {
- "pipeline": {
- "description": "monthly date-time index naming",
- "processors": [
- {
- "date_index_name": {
- "field": "date1",
- "index_name_prefix": "myindex-",
- "date_rounding": "M"
- }
- }
- ]
- },
- "docs": [
- {
- "_source": {
- "date1": "2016-04-25T12:02:01.789Z"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 104
- },
- "digest": "bd1860d159b6986340faccaafb869863",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\" : [\n {\n \"doc\" : {\n \"_id\" : \"_id\",\n \"_index\" : \"\",\n \"_source\" : {\n \"date1\" : \"2016-04-25T12:02:01.789Z\"\n },\n \"_ingest\" : {\n \"timestamp\" : \"2016-11-08T19:43:03.850+0000\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 46
- },
- "digest": "0b6aa8f2d6916951959d6186b25d2b54",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/geoip\n{\n \"description\" : \"Add geoip info\",\n \"processors\" : [\n {\n \"geoip\" : {\n \"field\" : \"ip\"\n }\n }\n ]\n}\nPUT my_index/_doc/my_id?pipeline=geoip\n{\n \"ip\": \"8.8.8.8\"\n}\nGET my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/geoip",
- "query": null,
- "body": {
- "description": "Add geoip info",
- "processors": [
- {
- "geoip": {
- "field": "ip"
- }
- }
- ]
- },
- "params": {
- "id": "geoip"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "geoip"
- },
- "body": {
- "ip": "8.8.8.8"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 68
- },
- "digest": "e49a98d543ca4c915bca860ba4aa086e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"my_index\",\n \"_id\": \"my_id\",\n \"_version\": 1,\n \"_seq_no\": 55,\n \"_primary_term\": 1,\n \"_source\": {\n \"ip\": \"8.8.8.8\",\n \"geoip\": {\n \"continent_name\": \"North America\",\n \"country_iso_code\": \"US\",\n \"location\": { \"lat\": 37.751, \"lon\": -97.822 }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 93
- },
- "digest": "573a466d7a3a8e31194666e2ecc1d92a",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/geoip\n{\n \"description\" : \"Add geoip info\",\n \"processors\" : [\n {\n \"geoip\" : {\n \"field\" : \"ip\",\n \"target_field\" : \"geo\",\n \"database_file\" : \"GeoLite2-Country.mmdb\"\n }\n }\n ]\n}\nPUT my_index/_doc/my_id?pipeline=geoip\n{\n \"ip\": \"8.8.8.8\"\n}\nGET my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/geoip",
- "query": null,
- "body": {
- "description": "Add geoip info",
- "processors": [
- {
- "geoip": {
- "field": "ip",
- "target_field": "geo",
- "database_file": "GeoLite2-Country.mmdb"
- }
- }
- ]
- },
- "params": {
- "id": "geoip"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "geoip"
- },
- "body": {
- "ip": "8.8.8.8"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 117
- },
- "digest": "6693dd5a6a7bb3c5670ac5208e0382e5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"my_index\",\n \"_id\": \"my_id\",\n \"_version\": 1,\n \"_seq_no\": 65,\n \"_primary_term\": 1,\n \"_source\": {\n \"ip\": \"8.8.8.8\",\n \"geo\": {\n \"continent_name\": \"North America\",\n \"country_iso_code\": \"US\",\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 144
- },
- "digest": "c5681f52305e065ef13c3e0ad5393263",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/geoip\n{\n \"description\" : \"Add geoip info\",\n \"processors\" : [\n {\n \"geoip\" : {\n \"field\" : \"ip\"\n }\n }\n ]\n}\n\nPUT my_index/_doc/my_id?pipeline=geoip\n{\n \"ip\": \"80.231.5.0\"\n}\n\nGET my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/geoip",
- "query": null,
- "body": {
- "description": "Add geoip info",
- "processors": [
- {
- "geoip": {
- "field": "ip"
- }
- }
- ]
- },
- "params": {
- "id": "geoip"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "geoip"
- },
- "body": {
- "ip": "80.231.5.0"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 168
- },
- "digest": "dc4d172710fc0407deddf3d7a752c1e8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"my_index\",\n \"_id\" : \"my_id\",\n \"_version\" : 1,\n \"_seq_no\" : 71,\n \"_primary_term\": 1,\n \"found\" : true,\n \"_source\" : {\n \"ip\" : \"80.231.5.0\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 193
- },
- "digest": "0737ebaea33631f001fb3f4226948492",
- "lang": "console",
- "found": [],
- "source": "PUT my_ip_locations\n{\n \"mappings\": {\n \"properties\": {\n \"geoip\": {\n \"properties\": {\n \"location\": { \"type\": \"geo_point\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_ip_locations",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geoip": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_ip_locations"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 72
- },
- "digest": "5024c524a7db0d6bb44c1820007cc5f4",
- "lang": "console",
- "found": [],
- "source": "POST _ingest/pipeline/_simulate\n{\n \"pipeline\": {\n \"description\" : \"...\",\n \"processors\": [\n {\n \"grok\": {\n \"field\": \"message\",\n \"patterns\": [\"%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes:int} %{NUMBER:duration:double}\"]\n }\n }\n ]\n },\n \"docs\":[\n {\n \"_source\": {\n \"message\": \"55.3.244.1 GET /index.html 15824 0.043\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": null,
- "body": {
- "pipeline": {
- "description": "...",
- "processors": [
- {
- "grok": {
- "field": "message",
- "patterns": [
- "%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes:int} %{NUMBER:duration:double}"
- ]
- }
- }
- ]
- },
- "docs": [
- {
- "_source": {
- "message": "55.3.244.1 GET /index.html 15824 0.043"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 99
- },
- "digest": "600ab0d13c6197778a413bc29bb5e3ca",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_index\": \"_index\",\n \"_id\": \"_id\",\n \"_source\" : {\n \"duration\" : 0.043,\n \"request\" : \"/index.html\",\n \"method\" : \"GET\",\n \"bytes\" : 15824,\n \"client\" : \"55.3.244.1\",\n \"message\" : \"55.3.244.1 GET /index.html 15824 0.043\"\n },\n \"_ingest\": {\n \"timestamp\": \"2016-11-08T19:43:03.850+0000\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 164
- },
- "digest": "77828fcaecc3f058c48b955928198ff6",
- "lang": "console",
- "found": [],
- "source": "POST _ingest/pipeline/_simulate\n{\n \"pipeline\": {\n \"description\" : \"parse multiple patterns\",\n \"processors\": [\n {\n \"grok\": {\n \"field\": \"message\",\n \"patterns\": [\"%{FAVORITE_DOG:pet}\", \"%{FAVORITE_CAT:pet}\"],\n \"pattern_definitions\" : {\n \"FAVORITE_DOG\" : \"beagle\",\n \"FAVORITE_CAT\" : \"burmese\"\n }\n }\n }\n ]\n},\n\"docs\":[\n {\n \"_source\": {\n \"message\": \"I love burmese cats!\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": null,
- "body": {
- "pipeline": {
- "description": "parse multiple patterns",
- "processors": [
- {
- "grok": {
- "field": "message",
- "patterns": [
- "%{FAVORITE_DOG:pet}",
- "%{FAVORITE_CAT:pet}"
- ],
- "pattern_definitions": {
- "FAVORITE_DOG": "beagle",
- "FAVORITE_CAT": "burmese"
- }
- }
- }
- ]
- },
- "docs": [
- {
- "_source": {
- "message": "I love burmese cats!"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 195
- },
- "digest": "eaae18f5701d14f94da7a085805271ca",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_index\": \"_index\",\n \"_id\": \"_id\",\n \"_source\": {\n \"message\": \"I love burmese cats!\",\n \"pet\": \"burmese\"\n },\n \"_ingest\": {\n \"timestamp\": \"2016-11-08T19:43:03.850+0000\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 254
- },
- "digest": "d101a9d043cc8b6a880bbc2c64ca1e8c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_index\": \"_index\",\n \"_id\": \"_id\",\n \"_source\": {\n \"message\": \"I love burmese cats!\",\n \"pet\": \"burmese\"\n },\n \"_ingest\": {\n \"_grok_match_index\": \"1\",\n \"timestamp\": \"2016-11-08T19:43:03.850+0000\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 288
- },
- "digest": "98574a419b6be603a0af8f7f22a92d23",
- "lang": "console",
- "found": [],
- "source": "GET _ingest/processor/grok",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ingest/processor/grok",
- "query": null,
- "body": null,
- "params": null,
- "api": "ingest.processor_grok"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/pipeline.asciidoc",
- "line": 31
- },
- "digest": "8494d09c39e109a012094eb9d6ec52ac",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/pipelineA\n{\n \"description\" : \"inner pipeline\",\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"inner_pipeline_set\",\n \"value\": \"inner\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/pipelineA",
- "query": null,
- "body": {
- "description": "inner pipeline",
- "processors": [
- {
- "set": {
- "field": "inner_pipeline_set",
- "value": "inner"
- }
- }
- ]
- },
- "params": {
- "id": "pipelineA"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/pipeline.asciidoc",
- "line": 49
- },
- "digest": "02c48d461536709c3fc8a0e8147c3787",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/pipelineB\n{\n \"description\" : \"outer pipeline\",\n \"processors\" : [\n {\n \"pipeline\" : {\n \"name\": \"pipelineA\"\n }\n },\n {\n \"set\" : {\n \"field\": \"outer_pipeline_set\",\n \"value\": \"outer\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/pipelineB",
- "query": null,
- "body": {
- "description": "outer pipeline",
- "processors": [
- {
- "pipeline": {
- "name": "pipelineA"
- }
- },
- {
- "set": {
- "field": "outer_pipeline_set",
- "value": "outer"
- }
- }
- ]
- },
- "params": {
- "id": "pipelineB"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/pipeline.asciidoc",
- "line": 74
- },
- "digest": "88647e818ffcbe39e5cf627f5b9a676c",
- "lang": "console",
- "found": [],
- "source": "PUT /myindex/_doc/1?pipeline=pipelineB\n{\n \"field\": \"value\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/myindex/_doc/1",
- "query": {
- "pipeline": "pipelineB"
- },
- "body": {
- "field": "value"
- },
- "params": {
- "index": "myindex",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/pipeline.asciidoc",
- "line": 85
- },
- "digest": "ffa7b6c079bfe0840f611ddbedf9030f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"myindex\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 66,\n \"_primary_term\": 1,\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/script.asciidoc",
- "line": 50
- },
- "digest": "197d87fdb4aeccf3d9a08ae485c12306",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/my_index\n{\n \"description\": \"use index:my_index\",\n \"processors\": [\n {\n \"script\": {\n \"source\": \"\"\"\n ctx._index = 'my_index';\n \"\"\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my_index",
- "query": null,
- "body": {
- "description": "use index:my_index",
- "processors": [
- {
- "script": {
- "source": "\n ctx._index = 'my_index';\n "
- }
- }
- ]
- },
- "params": {
- "id": "my_index"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/script.asciidoc",
- "line": 69
- },
- "digest": "cdc55ad88de55999fe2d79fd4781918b",
- "lang": "console",
- "found": [],
- "source": "PUT any_index/_doc/1?pipeline=my_index\n{\n \"message\": \"text\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/any_index/_doc/1",
- "query": {
- "pipeline": "my_index"
- },
- "body": {
- "message": "text"
- },
- "params": {
- "index": "any_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/script.asciidoc",
- "line": 80
- },
- "digest": "54e1bdda2188f2ce04e3a201a78c7331",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"my_index\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 89,\n \"_primary_term\": 1,\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/set.asciidoc",
- "line": 32
- },
- "digest": "366b29ef910f12c7fbced35f39000953",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/set_os\n{\n \"description\": \"sets the value of host.os.name from the field os\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"host.os.name\",\n \"value\": \"{{os}}\"\n }\n }\n ]\n}\n\nPOST _ingest/pipeline/set_os/_simulate\n{\n \"docs\": [\n {\n \"_source\": {\n \"os\": \"Ubuntu\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/set_os",
- "query": null,
- "body": {
- "description": "sets the value of host.os.name from the field os",
- "processors": [
- {
- "set": {
- "field": "host.os.name",
- "value": "{{os}}"
- }
- }
- ]
- },
- "params": {
- "id": "set_os"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "POST",
- "url": "/_ingest/pipeline/set_os/_simulate",
- "query": null,
- "body": {
- "docs": [
- {
- "_source": {
- "os": "Ubuntu"
- }
- }
- ]
- },
- "params": {
- "id": "set_os"
- },
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/set.asciidoc",
- "line": 61
- },
- "digest": "11d6095110e3c41055edd75fa881e742",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\" : [\n {\n \"doc\" : {\n \"_index\" : \"_index\",\n \"_id\" : \"_id\",\n \"_source\" : {\n \"host\" : {\n \"os\" : {\n \"name\" : \"Ubuntu\"\n }\n },\n \"os\" : \"Ubuntu\"\n },\n \"_ingest\" : {\n \"timestamp\" : \"2019-03-11T21:54:37.909224Z\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/user-agent.asciidoc",
- "line": 27
- },
- "digest": "9c504b5c486d9df689a22b11412e61a3",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/user_agent\n{\n \"description\" : \"Add user agent information\",\n \"processors\" : [\n {\n \"user_agent\" : {\n \"field\" : \"agent\"\n }\n }\n ]\n}\nPUT my_index/_doc/my_id?pipeline=user_agent\n{\n \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\"\n}\nGET my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/user_agent",
- "query": null,
- "body": {
- "description": "Add user agent information",
- "processors": [
- {
- "user_agent": {
- "field": "agent"
- }
- }
- ]
- },
- "params": {
- "id": "user_agent"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "user_agent"
- },
- "body": {
- "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/user-agent.asciidoc",
- "line": 49
- },
- "digest": "d6031f0550f6f3a0102210637301b121",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"my_index\",\n \"_id\": \"my_id\",\n \"_version\": 1,\n \"_seq_no\": 22,\n \"_primary_term\": 1,\n \"_source\": {\n \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\n \"user_agent\": {\n \"name\": \"Chrome\",\n \"original\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\n \"version\": \"51.0.2704.103\",\n \"os\": {\n \"name\": \"Mac OS X\",\n \"version\": \"10.10.5\",\n \"full\": \"Mac OS X 10.10.5\"\n },\n \"device\" : {\n \"name\" : \"Other\"\n },\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/getting-started-ilm.asciidoc",
- "line": 46
- },
- "digest": "f2dc1a1a2a6ba3c7c4273ce41ada4207",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/datastream_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": { <1>\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"50GB\", <2>\n \"max_age\": \"30d\"\n }\n }\n },\n \"delete\": {\n \"min_age\": \"90d\", <3>\n \"actions\": {\n \"delete\": {} <4>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/datastream_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "50GB",
- "max_age": "30d"
- }
- }
- },
- "delete": {
- "min_age": "90d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "datastream_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/getting-started-ilm.asciidoc",
- "line": 93
- },
- "digest": "e3d7b19f993382750719cdfaad2fdd90",
- "lang": "console",
- "found": [],
- "source": "PUT _template/datastream_template\n{\n \"index_patterns\": [\"datastream-*\"], <1>\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1,\n \"index.lifecycle.name\": \"datastream_policy\", <2>\n \"index.lifecycle.rollover_alias\": \"datastream\" <3>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/datastream_template",
- "query": null,
- "body": {
- "index_patterns": [
- "datastream-*"
- ],
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1,
- "index.lifecycle.name": "datastream_policy",
- "index.lifecycle.rollover_alias": "datastream"
- }
- },
- "params": {
- "name": "datastream_template"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/getting-started-ilm.asciidoc",
- "line": 135
- },
- "digest": "55ee835d7c28e933ad8fcb9e45af2bf2",
- "lang": "console",
- "found": [],
- "source": "PUT datastream-000001\n{\n \"aliases\": {\n \"datastream\": {\n \"is_write_index\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/datastream-000001",
- "query": null,
- "body": {
- "aliases": {
- "datastream": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "datastream-000001"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/getting-started-ilm.asciidoc",
- "line": 173
- },
- "digest": "a1dbaff15cf8166f74c443ca58258d7e",
- "lang": "console",
- "found": [],
- "source": "GET datastream-*/_ilm/explain",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/datastream-*/_ilm/explain",
- "query": null,
- "body": null,
- "params": {
- "index": "datastream-*"
- },
- "api": "ilm.explain_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/getting-started-ilm.asciidoc",
- "line": 184
- },
- "digest": "687916650d0393d19f26ffb8c5a39927",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"datastream-000001\": {\n \"index\": \"datastream-000001\",\n \"managed\": true,\n \"policy\": \"datastream_policy\", <1>\n \"lifecycle_date_millis\": 1538475653281,\n \"age\": \"30s\", <2>\n \"phase\": \"hot\",\n \"phase_time_millis\": 1538475653317,\n \"action\": \"rollover\",\n \"action_time_millis\": 1538475653317,\n \"step\": \"attempt-rollover\", <3>\n \"step_time_millis\": 1538475653317,\n \"phase_execution\": {\n \"policy\": \"datastream_policy\",\n \"phase_definition\": { <4>\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"50gb\",\n \"max_age\": \"30d\"\n }\n }\n },\n \"version\": 1,\n \"modified_date_in_millis\": 1539609701576\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 34
- },
- "digest": "b53e3314eb39b667a9ba87fb3a286e6b",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"1d\",\n \"actions\": {\n \"allocate\": {\n \"number_of_replicas\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "min_age": "1d",
- "actions": {
- "allocate": {
- "number_of_replicas": 1
- }
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 166
- },
- "digest": "1116c769f39f0c7fe86ec2a4871efcd5",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"allocate\" : {\n \"number_of_replicas\" : 2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "allocate": {
- "number_of_replicas": 2
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 188
- },
- "digest": "0518c673094fb18ecb491a3b78af4695",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"allocate\" : {\n \"include\" : {\n \"box_type\": \"hot,warm\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "allocate": {
- "include": {
- "box_type": "hot,warm"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 213
- },
- "digest": "9d461ae140ddc018efd2650559800cd1",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"allocate\" : {\n \"number_of_replicas\": 1,\n \"require\" : {\n \"box_type\": \"cold\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "allocate": {
- "number_of_replicas": 1,
- "require": {
- "box_type": "cold"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 250
- },
- "digest": "83062a543163370328cf2e21a68c1bd3",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"delete\": {\n \"actions\": {\n \"wait_for_snapshot\" : {\n \"policy\": \"slm-policy-name\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "delete": {
- "actions": {
- "wait_for_snapshot": {
- "policy": "slm-policy-name"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 277
- },
- "digest": "053497b6960f80fd7b005b7c6d54358f",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"delete\": {\n \"actions\": {\n \"delete\" : { }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "delete": {
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 324
- },
- "digest": "eb5486d2fe4283475bf9e0e09280be16",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"forcemerge\" : {\n \"max_num_segments\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "forcemerge": {
- "max_num_segments": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 350
- },
- "digest": "0345fbd95c4516a89ac5ad261a16be8f",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"cold\": {\n \"actions\": {\n \"freeze\" : { }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "cold": {
- "actions": {
- "freeze": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 384
- },
- "digest": "fc9a1b1173690a911725cff3912e9755",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"readonly\" : { }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "readonly": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 422
- },
- "digest": "d7e7489b7d176aa854dfc785a12feab3",
- "lang": "console",
- "found": [],
- "source": "PUT my_index-000001\n{\n \"settings\": {\n \"index.lifecycle.name\": \"my_policy\",\n \"index.lifecycle.rollover_alias\": \"my_data\"\n },\n \"aliases\": {\n \"my_data\": {\n \"is_write_index\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index-000001",
- "query": null,
- "body": {
- "settings": {
- "index.lifecycle.name": "my_policy",
- "index.lifecycle.rollover_alias": "my_data"
- },
- "aliases": {
- "my_data": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "my_index-000001"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 466
- },
- "digest": "19211ccf772f1dee7b500c21f4a9a805",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\" : {\n \"max_size\": \"100GB\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "100GB"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 489
- },
- "digest": "cfd4b34f35e531a20739a3b308d57134",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\" : {\n \"max_docs\": 100000000\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_docs": 100000000
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 512
- },
- "digest": "d4a41fb74b41b41a0ee114a2311f2815",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\" : {\n \"max_age\": \"7d\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_age": "7d"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 536
- },
- "digest": "8940f2b911220acc9afef6360b6c13c4",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\" : {\n \"max_age\": \"7d\",\n \"max_size\": \"100GB\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_age": "7d",
- "max_size": "100GB"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 561
- },
- "digest": "f6c79fa1c01bb4539d0cba0bd62c1ce0",
- "lang": "console",
- "found": [],
- "source": "PUT /_ilm/policy/rollover_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"50G\"\n }\n }\n },\n \"delete\": {\n \"min_age\": \"1d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/rollover_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "50G"
- }
- }
- },
- "delete": {
- "min_age": "1d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "rollover_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 612
- },
- "digest": "149a0eea54cdf6ea3052af6dba2d2a63",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"set_priority\" : {\n \"priority\": 50\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "set_priority": {
- "priority": 50
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 664
- },
- "digest": "f3b4ddce8ff21fc1a76a7c0d9c36650e",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"shrink\" : {\n \"number_of_shards\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "shrink": {
- "number_of_shards": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 721
- },
- "digest": "a5a58e8ad66afe831bc295500e3e8739",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"unfollow\" : {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "unfollow": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/policy-definitions.asciidoc",
- "line": 746
- },
- "digest": "d14a2a6c2a8b084495b8a64708226650",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/full_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_age\": \"7d\",\n \"max_size\": \"50G\"\n }\n }\n },\n \"warm\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n },\n \"shrink\": {\n \"number_of_shards\": 1\n },\n \"allocate\": {\n \"number_of_replicas\": 2\n }\n }\n },\n \"cold\": {\n \"min_age\": \"60d\",\n \"actions\": {\n \"allocate\": {\n \"require\": {\n \"type\": \"cold\"\n }\n }\n }\n },\n \"delete\": {\n \"min_age\": \"90d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/full_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_age": "7d",
- "max_size": "50G"
- }
- }
- },
- "warm": {
- "min_age": "30d",
- "actions": {
- "forcemerge": {
- "max_num_segments": 1
- },
- "shrink": {
- "number_of_shards": 1
- },
- "allocate": {
- "number_of_replicas": 2
- }
- }
- },
- "cold": {
- "min_age": "60d",
- "actions": {
- "allocate": {
- "require": {
- "type": "cold"
- }
- }
- }
- },
- "delete": {
- "min_age": "90d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "full_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/set-up-lifecycle-policy.asciidoc",
- "line": 12
- },
- "digest": "7ecf197610e30c20f7206513ce393822",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"25GB\" <1>\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {} <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "25GB"
- }
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/set-up-lifecycle-policy.asciidoc",
- "line": 54
- },
- "digest": "3c9d99215a7020ab478bdf5c8287a14f",
- "lang": "console",
- "found": [],
- "source": "PUT _template/my_template\n{\n \"index_patterns\": [\"test-*\"], <1>\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1,\n \"index.lifecycle.name\": \"my_policy\", <2>\n \"index.lifecycle.rollover_alias\": \"test-alias\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/my_template",
- "query": null,
- "body": {
- "index_patterns": [
- "test-*"
- ],
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1,
- "index.lifecycle.name": "my_policy",
- "index.lifecycle.rollover_alias": "test-alias"
- }
- },
- "params": {
- "name": "my_template"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/set-up-lifecycle-policy.asciidoc",
- "line": 85
- },
- "digest": "25737fd456fd317cc4cc2db76b6cf28e",
- "lang": "console",
- "found": [],
- "source": "PUT test-000001\n{\n \"aliases\": {\n \"test-alias\":{\n \"is_write_index\": true <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test-000001",
- "query": null,
- "body": {
- "aliases": {
- "test-alias": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "test-000001"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/set-up-lifecycle-policy.asciidoc",
- "line": 108
- },
- "digest": "160d259243d0800900b065c4b9d2b187",
- "lang": "console",
- "found": [],
- "source": "PUT test-index\n{\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1,\n \"index.lifecycle.name\": \"my_policy\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test-index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1,
- "index.lifecycle.name": "my_policy"
- }
- },
- "params": {
- "index": "test-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 29
- },
- "digest": "0c44088f251488432966131135f1bd1c",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"25GB\"\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "25GB"
- }
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 60
- },
- "digest": "2c37ed0b33658d73a712e7942ea7433a",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"25GB\"\n }\n }\n },\n \"delete\": {\n \"min_age\": \"10d\", <1>\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "25GB"
- }
- }
- },
- "delete": {
- "min_age": "10d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 98
- },
- "digest": "7251639b2c1267d7c76ab397bbe43bbd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_policy\": {\n \"version\": 2, <1>\n \"modified_date\": 82392349, <2>\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"25gb\"\n }\n }\n },\n \"delete\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 142
- },
- "digest": "fc541f5741c1fe052439ededa84ffe8a",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_executing_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_docs\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_executing_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_docs": 1
- }
- }
- },
- "delete": {
- "min_age": "10d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_executing_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 182
- },
- "digest": "0f6fa3a706a7c17858d3dbe329839ea6",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_ilm/explain",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_ilm/explain",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "ilm.explain_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 188
- },
- "digest": "d5e55676f5242766ebb035b87ce660e2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"my_index\": {\n \"index\": \"my_index\",\n \"managed\": true,\n \"policy\": \"my_executing_policy\",\n \"lifecycle_date_millis\": 1538475653281,\n \"age\": \"30s\",\n \"phase\": \"hot\",\n \"phase_time_millis\": 1538475653317,\n \"action\": \"rollover\",\n \"action_time_millis\": 1538475653317,\n \"step\": \"check-rollover-ready\",\n \"step_time_millis\": 1538475653317,\n \"phase_execution\": {\n \"policy\": \"my_executing_policy\",\n \"modified_date_in_millis\": 1538475653317,\n \"version\": 1,\n \"phase_definition\": {\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_docs\": 1\n }\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 225
- },
- "digest": "f94601bc9cd640adb939af67116a40c8",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_executing_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"min_age\": \"1d\", <1>\n \"actions\": {\n \"rollover\": {\n \"max_docs\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_executing_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "min_age": "1d",
- "actions": {
- "rollover": {
- "max_docs": 1
- }
- }
- },
- "delete": {
- "min_age": "10d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_executing_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 264
- },
- "digest": "aada9dd17e7b08f3c5a279920c84333e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"my_index\": {\n \"index\": \"my_index\",\n \"managed\": true,\n \"policy\": \"my_executing_policy\",\n \"lifecycle_date_millis\": 1538475653281,\n \"age\": \"30s\",\n \"phase\": \"hot\",\n \"phase_time_millis\": 1538475653317,\n \"action\": \"rollover\",\n \"action_time_millis\": 1538475653317,\n \"step\": \"check-rollover-ready\",\n \"step_time_millis\": 1538475653317,\n \"phase_execution\": {\n \"policy\": \"my_executing_policy\",\n \"modified_date_in_millis\": 1538475653317,\n \"version\": 1, <1>\n \"phase_definition\": {\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_docs\": 1\n }\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 304
- },
- "digest": "416c65c55a53d0161426cc09ae999c72",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_executing_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"1d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_executing_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "min_age": "1d",
- "actions": {
- "forcemerge": {
- "max_num_segments": 1
- }
- }
- },
- "delete": {
- "min_age": "10d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_executing_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 342
- },
- "digest": "aada9dd17e7b08f3c5a279920c84333e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"my_index\": {\n \"index\": \"my_index\",\n \"managed\": true,\n \"policy\": \"my_executing_policy\",\n \"lifecycle_date_millis\": 1538475653281,\n \"age\": \"30s\",\n \"phase\": \"hot\",\n \"phase_time_millis\": 1538475653317,\n \"action\": \"rollover\",\n \"action_time_millis\": 1538475653317,\n \"step\": \"check-rollover-ready\",\n \"step_time_millis\": 1538475653317,\n \"phase_execution\": {\n \"policy\": \"my_executing_policy\",\n \"modified_date_in_millis\": 1538475653317,\n \"version\": 1, <1>\n \"phase_definition\": {\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_docs\": 1\n }\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 396
- },
- "digest": "84935bf612d1aa402a7e16dae1ab99f5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"my_index\": {\n \"index\": \"my_index\",\n \"managed\": true,\n \"policy\": \"my_executing_policy\",\n \"lifecycle_date_millis\": 1538475653281,\n \"age\": \"30s\",\n \"phase\": \"warm\",\n \"phase_time_millis\": 1538475653317,\n \"action\": \"forcemerge\",\n \"action_time_millis\": 1538475653317,\n \"step\": \"forcemerge\",\n \"step_time_millis\": 1538475653317,\n \"phase_execution\": {\n \"policy\": \"my_executing_policy\",\n \"modified_date_in_millis\": 1538475653317,\n \"version\": 3, <1>\n \"phase_definition\": {\n \"min_age\": \"1d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/update-lifecycle-policy.asciidoc",
- "line": 494
- },
- "digest": "552b6761ef052efa1e83f8a3c30d6f78",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_settings\n{\n \"lifecycle.name\": \"my_other_policy\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_settings",
- "query": null,
- "body": {
- "lifecycle.name": "my_other_policy"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 16
- },
- "digest": "9d211c6226d0b4434f01cceb76ab6ffa",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/shrink-the-index\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"5d\",\n \"actions\": {\n \"shrink\": {\n \"number_of_shards\": 4\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/shrink-the-index",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "min_age": "5d",
- "actions": {
- "shrink": {
- "number_of_shards": 4
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "shrink-the-index"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 42
- },
- "digest": "3d0b9acdacc7ecec380c57e814256472",
- "lang": "console",
- "found": [],
- "source": "PUT /myindex\n{\n \"settings\": {\n \"index.number_of_shards\": 2,\n \"index.lifecycle.name\": \"shrink-the-index\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/myindex",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 2,
- "index.lifecycle.name": "shrink-the-index"
- }
- },
- "params": {
- "index": "myindex"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 60
- },
- "digest": "943f92e1d3fa566ef23659be2d96f222",
- "lang": "console",
- "found": [],
- "source": "GET /myindex/_ilm/explain",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/myindex/_ilm/explain",
- "query": null,
- "body": null,
- "params": {
- "index": "myindex"
- },
- "api": "ilm.explain_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 68
- },
- "digest": "e29f69a4bcfe27332cb2bb994a2cb5bf",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\" : {\n \"myindex\" : {\n \"index\" : \"myindex\",\n \"managed\" : true, <1>\n \"policy\" : \"shrink-the-index\", <2>\n \"lifecycle_date_millis\" : 1541717265865,\n \"age\": \"5.1d\", <3>\n \"phase\" : \"warm\", <4>\n \"phase_time_millis\" : 1541717272601,\n \"action\" : \"shrink\", <5>\n \"action_time_millis\" : 1541717272601,\n \"step\" : \"ERROR\", <6>\n \"step_time_millis\" : 1541717272688,\n \"failed_step\" : \"shrink\", <7>\n \"step_info\" : {\n \"type\" : \"illegal_argument_exception\", <8>\n \"reason\" : \"the number of target shards [4] must be less that the number of source shards [2]\" <9>\n },\n \"phase_execution\" : {\n \"policy\" : \"shrink-the-index\",\n \"phase_definition\" : { <10>\n \"min_age\" : \"5d\",\n \"actions\" : {\n \"shrink\" : {\n \"number_of_shards\" : 4\n }\n }\n },\n \"version\" : 1,\n \"modified_date_in_millis\" : 1541717264230\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 124
- },
- "digest": "7bee02e8962e355a23559b6eaa6678f2",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/shrink-the-index\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"5d\",\n \"actions\": {\n \"shrink\": {\n \"number_of_shards\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/shrink-the-index",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "min_age": "5d",
- "actions": {
- "shrink": {
- "number_of_shards": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "shrink-the-index"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 151
- },
- "digest": "235513edcb5ce3fe2e38a781eeefa6a0",
- "lang": "console",
- "found": [],
- "source": "POST /myindex/_ilm/retry",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/myindex/_ilm/retry",
- "query": null,
- "body": null,
- "params": {
- "index": "myindex"
- },
- "api": "ilm.retry"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/start-stop-ilm.asciidoc",
- "line": 56
- },
- "digest": "182df084f028479ecbe8d7648ddad892",
- "lang": "console",
- "found": [],
- "source": "GET _ilm/status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ilm/status",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.get_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/start-stop-ilm.asciidoc",
- "line": 63
- },
- "digest": "99e0bec31e49636bc0053ac66bc29352",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"RUNNING\"\n}"
- },
- {
- "source_location": {
- "file": "ilm/start-stop-ilm.asciidoc",
- "line": 88
- },
- "digest": "585a34ad79aee16678b37da785933ac8",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/stop",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.stop"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/start-stop-ilm.asciidoc",
- "line": 105
- },
- "digest": "8de1c258461189d65cba97dbc94600cd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"STOPPING\"\n}"
- },
- {
- "source_location": {
- "file": "ilm/start-stop-ilm.asciidoc",
- "line": 127
- },
- "digest": "db8563ab7fe37081a9bb66c91d65d673",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"STOPPED\"\n}"
- },
- {
- "source_location": {
- "file": "ilm/start-stop-ilm.asciidoc",
- "line": 141
- },
- "digest": "72ae3851160fcf02b8e2cdfd4e57d238",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/start",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.start"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/start-stop-ilm.asciidoc",
- "line": 158
- },
- "digest": "99e0bec31e49636bc0053ac66bc29352",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"RUNNING\"\n}"
- },
- {
- "source_location": {
- "file": "ilm/using-policies-rollover.asciidoc",
- "line": 59
- },
- "digest": "aed01ec7b6368fa2c8f86434e176c907",
- "lang": "console",
- "found": [],
- "source": "PUT /_ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"25GB\"\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "25GB"
- }
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/using-policies-rollover.asciidoc",
- "line": 87
- },
- "digest": "f29c02d259065033bd557519d1b21481",
- "lang": "console",
- "found": [],
- "source": "PUT _template/my_template\n{\n \"index_patterns\": [\"test-*\"], <1>\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1,\n \"index.lifecycle.name\": \"my_policy\", <2>\n \"index.lifecycle.rollover_alias\": \"test-alias\" <3>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/my_template",
- "query": null,
- "body": {
- "index_patterns": [
- "test-*"
- ],
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1,
- "index.lifecycle.name": "my_policy",
- "index.lifecycle.rollover_alias": "test-alias"
- }
- },
- "params": {
- "name": "my_template"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/using-policies-rollover.asciidoc",
- "line": 118
- },
- "digest": "454e0e11e2bbb4718109a53662f8c45d",
- "lang": "console",
- "found": [],
- "source": "PUT test-000001 <1>\n{\n \"aliases\": {\n \"test-alias\":{\n \"is_write_index\": true <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test-000001",
- "query": null,
- "body": {
- "aliases": {
- "test-alias": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "test-000001"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 23
- },
- "digest": "4e2027438393cf93b9c9402b8511eab5",
- "lang": "console",
- "found": [],
- "source": "PUT _template/mylogs_template\n{\n \"index_patterns\": [\n \"mylogs-*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1\n },\n \"mappings\": {\n \"properties\": {\n \"message\": {\n \"type\": \"text\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/mylogs_template",
- "query": null,
- "body": {
- "index_patterns": [
- "mylogs-*"
- ],
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1
- },
- "mappings": {
- "properties": {
- "message": {
- "type": "text"
- },
- "@timestamp": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "name": "mylogs_template"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 49
- },
- "digest": "8502a9281f5393a7160e4e46988da672",
- "lang": "console",
- "found": [],
- "source": "POST mylogs-pre-ilm-2019.06.24/_doc\n{\n \"@timestamp\": \"2019-06-24T10:34:00\",\n \"message\": \"this is one log message\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/mylogs-pre-ilm-2019.06.24/_doc",
- "query": null,
- "body": {
- "@timestamp": "2019-06-24T10:34:00",
- "message": "this is one log message"
- },
- "params": {
- "index": "mylogs-pre-ilm-2019.06.24"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 59
- },
- "digest": "7d51f0436e87dec4274133856866b07d",
- "lang": "console",
- "found": [],
- "source": "POST mylogs-pre-ilm-2019.06.25/_doc\n{\n \"@timestamp\": \"2019-06-25T17:42:00\",\n \"message\": \"this is another log message\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/mylogs-pre-ilm-2019.06.25/_doc",
- "query": null,
- "body": {
- "@timestamp": "2019-06-25T17:42:00",
- "message": "this is another log message"
- },
- "params": {
- "index": "mylogs-pre-ilm-2019.06.25"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 128
- },
- "digest": "75097f73665235b20df09739c820ad35",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/mylogs_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"25GB\"\n }\n }\n },\n \"warm\": {\n \"min_age\": \"1d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"cold\": {\n \"min_age\": \"7d\",\n \"actions\": {\n \"freeze\": {}\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/mylogs_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "25GB"
- }
- }
- },
- "warm": {
- "min_age": "1d",
- "actions": {
- "forcemerge": {
- "max_num_segments": 1
- }
- }
- },
- "cold": {
- "min_age": "7d",
- "actions": {
- "freeze": {}
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "mylogs_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 171
- },
- "digest": "3feab5c602192b8dc58435654b17d3fe",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/mylogs_policy_existing\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"1d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"cold\": {\n \"min_age\": \"7d\",\n \"actions\": {\n \"freeze\": {}\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/mylogs_policy_existing",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "min_age": "1d",
- "actions": {
- "forcemerge": {
- "max_num_segments": 1
- }
- }
- },
- "cold": {
- "min_age": "7d",
- "actions": {
- "freeze": {}
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "mylogs_policy_existing"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 213
- },
- "digest": "ec195297eb804cba1cb19c9926773059",
- "lang": "console",
- "found": [],
- "source": "PUT mylogs-pre-ilm*/_settings <1>\n{\n \"index\": {\n \"lifecycle\": {\n \"name\": \"mylogs_policy_existing\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/mylogs-pre-ilm*/_settings",
- "query": null,
- "body": {
- "index": {
- "lifecycle": {
- "name": "mylogs_policy_existing"
- }
- }
- },
- "params": {
- "index": "mylogs-pre-ilm*"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 255
- },
- "digest": "8d39a0f0116702e981545d13371cd0eb",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/mylogs_condensed_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_age\": \"7d\",\n \"max_size\": \"50G\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/mylogs_condensed_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_age": "7d",
- "max_size": "50G"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "mylogs_condensed_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 278
- },
- "digest": "bce0d86353e212cee466ccbc90bdc6e7",
- "lang": "console",
- "found": [],
- "source": "PUT _template/mylogs_template\n{\n \"index_patterns\": [\n \"ilm-mylogs-*\" <1>\n ],\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1,\n \"index\": {\n \"lifecycle\": {\n \"name\": \"mylogs_condensed_policy\", <2>\n \"rollover_alias\": \"mylogs\" <3>\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"message\": {\n \"type\": \"text\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/mylogs_template",
- "query": null,
- "body": {
- "index_patterns": [
- "ilm-mylogs-*"
- ],
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1,
- "index": {
- "lifecycle": {
- "name": "mylogs_condensed_policy",
- "rollover_alias": "mylogs"
- }
- }
- },
- "mappings": {
- "properties": {
- "message": {
- "type": "text"
- },
- "@timestamp": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "name": "mylogs_template"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 317
- },
- "digest": "89115f8d40d9a13b0b01dc7c33ffd1cc",
- "lang": "console",
- "found": [],
- "source": "PUT ilm-mylogs-000001\n{\n \"aliases\": {\n \"mylogs\": {\n \"is_write_index\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/ilm-mylogs-000001",
- "query": null,
- "body": {
- "aliases": {
- "mylogs": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "ilm-mylogs-000001"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 356
- },
- "digest": "5df1ed33b5fcf3b9d85c20d100780d43",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\": {\n \"indices.lifecycle.poll_interval\": \"1m\" <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.lifecycle.poll_interval": "1m"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 387
- },
- "digest": "41f211cc838f1bee7eac264784f905e2",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"mylogs-*\", <1>\n \"sort\": { \"@timestamp\": \"desc\" }\n },\n \"dest\": {\n \"index\": \"mylogs\", <2>\n \"op_type\": \"create\" <3>\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "mylogs-*",
- "sort": {
- "@timestamp": "desc"
- }
- },
- "dest": {
- "index": "mylogs",
- "op_type": "create"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 417
- },
- "digest": "227e19aecb349f31e74898384322ae01",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\": {\n \"indices.lifecycle.poll_interval\": null\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.lifecycle.poll_interval": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 17
- },
- "digest": "b34d7bd889b73989ea905a4565274ea3",
- "lang": "console",
- "found": [],
- "source": "PUT sec_logs/_bulk?refresh\n{\"index\":{\"_index\" : \"sec_logs\"}}\n{ \"@timestamp\": \"2020-12-07T11:06:07.000Z\", \"agent\": { \"id\": \"8a4f500d\" }, \"event\": { \"category\": \"process\" }, \"process\": { \"name\": \"cmd.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\" } }\n{\"index\":{\"_index\" : \"sec_logs\"}}\n{ \"@timestamp\": \"2020-12-07T11:07:08.000Z\", \"agent\": { \"id\": \"8a4f500d\" }, \"event\": { \"category\": \"image_load\" }, \"file\": { \"name\": \"cmd.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\" }, \"process\": { \"name\": \"cmd.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\" } }\n{\"index\":{\"_index\" : \"sec_logs\"}}\n{ \"@timestamp\": \"2020-12-07T11:07:09.000Z\", \"agent\": { \"id\": \"8a4f500d\" }, \"event\": { \"category\": \"process\" }, \"process\": { \"name\": \"regsvr32.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\" } }",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/sec_logs/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_index": "sec_logs"
- }
- },
- {
- "@timestamp": "2020-12-07T11:06:07.000Z",
- "agent": {
- "id": "8a4f500d"
- },
- "event": {
- "category": "process"
- },
- "process": {
- "name": "cmd.exe",
- "path": "C:\\Windows\\System32\\cmd.exe"
- }
- },
- {
- "index": {
- "_index": "sec_logs"
- }
- },
- {
- "@timestamp": "2020-12-07T11:07:08.000Z",
- "agent": {
- "id": "8a4f500d"
- },
- "event": {
- "category": "image_load"
- },
- "file": {
- "name": "cmd.exe",
- "path": "C:\\Windows\\System32\\cmd.exe"
- },
- "process": {
- "name": "cmd.exe",
- "path": "C:\\Windows\\System32\\cmd.exe"
- }
- },
- {
- "index": {
- "_index": "sec_logs"
- }
- },
- {
- "@timestamp": "2020-12-07T11:07:09.000Z",
- "agent": {
- "id": "8a4f500d"
- },
- "event": {
- "category": "process"
- },
- "process": {
- "name": "regsvr32.exe",
- "path": "C:\\Windows\\System32\\regsvr32.exe"
- }
- }
- ],
- "params": {
- "index": "sec_logs"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 34
- },
- "digest": "7c7fa5c2505de6e7739d590f8ad05597",
- "lang": "console",
- "found": [],
- "source": "GET sec_logs/_eql/search\n{\n \"rule\": \"\"\"\n process where process.name == \"cmd.exe\"\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "rule": "\n process where process.name == \"cmd.exe\"\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/getting-started.asciidoc",
- "line": 10
- },
- "digest": "0a46ac2968a574ce145f197f10d30152",
- "lang": "console",
- "found": [],
- "source": "PUT /library/_bulk?refresh\n{\"index\":{\"_id\": \"Leviathan Wakes\"}}\n{\"name\": \"Leviathan Wakes\", \"author\": \"James S.A. Corey\", \"release_date\": \"2011-06-02\", \"page_count\": 561}\n{\"index\":{\"_id\": \"Hyperion\"}}\n{\"name\": \"Hyperion\", \"author\": \"Dan Simmons\", \"release_date\": \"1989-05-26\", \"page_count\": 482}\n{\"index\":{\"_id\": \"Dune\"}}\n{\"name\": \"Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1965-06-01\", \"page_count\": 604}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/library/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": "Leviathan Wakes"
- }
- },
- {
- "name": "Leviathan Wakes",
- "author": "James S.A. Corey",
- "release_date": "2011-06-02",
- "page_count": 561
- },
- {
- "index": {
- "_id": "Hyperion"
- }
- },
- {
- "name": "Hyperion",
- "author": "Dan Simmons",
- "release_date": "1989-05-26",
- "page_count": 482
- },
- {
- "index": {
- "_id": "Dune"
- }
- },
- {
- "name": "Dune",
- "author": "Frank Herbert",
- "release_date": "1965-06-01",
- "page_count": 604
- }
- ],
- "params": {
- "index": "library"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/getting-started.asciidoc",
- "line": 23
- },
- "digest": "53b14d640c4c48a5e7ea86ddc26bee64",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library WHERE release_date < '2000-01-01'\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library WHERE release_date < '2000-01-01'"
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 22
- },
- "digest": "4870ece3455f2b5c34eccaa9492f3894",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC LIMIT 5"
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 114
- },
- "digest": "b649c4dc7d187a27d2112f59e62cecea",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=csv\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "csv"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 139
- },
- "digest": "8b8c48b5fcfaaec794875537d3be2e62",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=json\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "json"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 151
- },
- "digest": "e47728a317fe6f33854f328847cd3881",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"columns\": [\n {\"name\": \"author\", \"type\": \"text\"},\n {\"name\": \"name\", \"type\": \"text\"},\n {\"name\": \"page_count\", \"type\": \"short\"},\n {\"name\": \"release_date\", \"type\": \"datetime\"}\n ],\n \"rows\": [\n [\"Peter F. Hamilton\", \"Pandora's Star\", 768, \"2004-03-02T00:00:00.000Z\"],\n [\"Vernor Vinge\", \"A Fire Upon the Deep\", 613, \"1992-06-01T00:00:00.000Z\"],\n [\"Frank Herbert\", \"Dune\", 604, \"1965-06-01T00:00:00.000Z\"],\n [\"Alastair Reynolds\", \"Revelation Space\", 585, \"2000-03-15T00:00:00.000Z\"],\n [\"James S.A. Corey\", \"Leviathan Wakes\", 561, \"2011-06-02T00:00:00.000Z\"]\n ],\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWWWdrRlVfSS1TbDYtcW9lc1FJNmlYdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl+v///w8=\"\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 174
- },
- "digest": "92d82b9d1bda5a8ae1117d03413f4e67",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=tsv\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "tsv"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 200
- },
- "digest": "a972c38ee41dc899708825790a113cb8",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 227
- },
- "digest": "d38b8ef18ca89eafb1e175ec9a393259",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=yaml\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "yaml"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 282
- },
- "digest": "212042898296f208dbf957f33c07e3b2",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=json\n{\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "json"
- },
- "body": {
- "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8="
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 294
- },
- "digest": "96d85cb20318cdd8edb5c1c7611d3e6f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"rows\" : [\n [\"Dan Simmons\", \"Hyperion\", 482, \"1989-05-26T00:00:00.000Z\"],\n [\"Iain M. Banks\", \"Consider Phlebas\", 471, \"1987-04-23T00:00:00.000Z\"],\n [\"Neal Stephenson\", \"Snow Crash\", 470, \"1992-06-01T00:00:00.000Z\"],\n [\"Frank Herbert\", \"God Emperor of Dune\", 454, \"1981-05-28T00:00:00.000Z\"],\n [\"Frank Herbert\", \"Children of Dune\", 408, \"1976-04-21T00:00:00.000Z\"]\n ],\n \"cursor\" : \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWODRMaXBUaVlRN21iTlRyWHZWYUdrdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl9f///w8=\"\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 319
- },
- "digest": "cc5dfc9aa125e3fd03f523fc2c356f63",
- "lang": "console",
- "found": [],
- "source": "POST /_sql/close\n{\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql/close",
- "query": null,
- "body": {
- "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8="
- },
- "params": null,
- "api": "sql.clear_cursor"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 331
- },
- "digest": "56e5e91d300c0102055e478162f304af",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"succeeded\" : true\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 346
- },
- "digest": "683da0a8624bc03c79a3db8ffab43f0b",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"filter\": {\n \"range\": {\n \"page_count\": {\n \"gte\" : 100,\n \"lte\" : 200\n }\n }\n },\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "filter": {
- "range": {
- "page_count": {
- "gte": 100,
- "lte": 200
- }
- }
- },
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 380
- },
- "digest": "acc0bf5e777f8fc833b7928fdd17ea3e",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library\",\n \"filter\": {\n \"terms\": {\n \"_routing\": [\"abc\"]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library",
- "filter": {
- "terms": {
- "_routing": [
- "abc"
- ]
- }
- }
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 404
- },
- "digest": "c11dc94839b861235b4943f046e15997",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=json\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5,\n \"columnar\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "json"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5,
- "columnar": true
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 417
- },
- "digest": "4b810caadb3079f3a9420d4e108722e7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"columns\": [\n {\"name\": \"author\", \"type\": \"text\"},\n {\"name\": \"name\", \"type\": \"text\"},\n {\"name\": \"page_count\", \"type\": \"short\"},\n {\"name\": \"release_date\", \"type\": \"datetime\"}\n ],\n \"values\": [\n [\"Peter F. Hamilton\", \"Vernor Vinge\", \"Frank Herbert\", \"Alastair Reynolds\", \"James S.A. Corey\"],\n [\"Pandora's Star\", \"A Fire Upon the Deep\", \"Dune\", \"Revelation Space\", \"Leviathan Wakes\"],\n [768, 613, 604, 585, 561],\n [\"2004-03-02T00:00:00.000Z\", \"1992-06-01T00:00:00.000Z\", \"1965-06-01T00:00:00.000Z\", \"2000-03-15T00:00:00.000Z\", \"2011-06-02T00:00:00.000Z\"]\n ],\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWWWdrRlVfSS1TbDYtcW9lc1FJNmlYdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl+v///w8=\"\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 440
- },
- "digest": "15089efd5a5a72234fdb91c111adb3c1",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=json\n{\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWWWdrRlVfSS1TbDYtcW9lc1FJNmlYdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl+v///w8=\",\n \"columnar\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "json"
- },
- "body": {
- "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWWWdrRlVfSS1TbDYtcW9lc1FJNmlYdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl+v///w8=",
- "columnar": true
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 453
- },
- "digest": "efe6a7998fffc2a7289335f9b5643bc2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"values\": [\n [\"Dan Simmons\", \"Iain M. Banks\", \"Neal Stephenson\", \"Frank Herbert\", \"Frank Herbert\"],\n [\"Hyperion\", \"Consider Phlebas\", \"Snow Crash\", \"God Emperor of Dune\", \"Children of Dune\"],\n [482, 471, 470, 454, 408],\n [\"1989-05-26T00:00:00.000Z\", \"1987-04-23T00:00:00.000Z\", \"1992-06-01T00:00:00.000Z\", \"1981-05-28T00:00:00.000Z\", \"1976-04-21T00:00:00.000Z\"]\n ],\n \"cursor\": \"46ToAwFzQERYRjFaWEo1UVc1a1JtVjBZMmdCQUFBQUFBQUFBQUVXWjBaNlFXbzNOV0pVY21Wa1NUZDJhV2t3V2xwblp3PT3/////DwQBZgZhdXRob3IBBHRleHQAAAFmBG5hbWUBBHRleHQAAAFmCnBhZ2VfY291bnQBBGxvbmcBAAFmDHJlbGVhc2VfZGF0ZQEIZGF0ZXRpbWUBAAEP\"\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 473
- },
- "digest": "172d150e56a225155a62c7b18bf8da67",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n\t\"query\": \"SELECT YEAR(release_date) AS year FROM library WHERE page_count > 300 AND author = 'Frank Herbert' GROUP BY year HAVING COUNT(*) > 0\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT YEAR(release_date) AS year FROM library WHERE page_count > 300 AND author = 'Frank Herbert' GROUP BY year HAVING COUNT(*) > 0"
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 484
- },
- "digest": "d9e0cba8e150681d861f5fd1545514e2",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n\t\"query\": \"SELECT YEAR(release_date) AS year FROM library WHERE page_count > ? AND author = ? GROUP BY year HAVING COUNT(*) > ?\",\n\t\"params\": [300, \"Frank Herbert\", 0]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT YEAR(release_date) AS year FROM library WHERE page_count > ? AND author = ? GROUP BY year HAVING COUNT(*) > ?",
- "params": [
- 300,
- "Frank Herbert",
- 0
- ]
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/translate.asciidoc",
- "line": 10
- },
- "digest": "8097472be12fcbe8652f03e398e49972",
- "lang": "console",
- "found": [],
- "source": "POST /_sql/translate\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql/translate",
- "query": null,
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 10
- },
- "params": null,
- "api": "sql.translate"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/translate.asciidoc",
- "line": 22
- },
- "digest": "8b1e1a7c16b57df49f15d070d6200a89",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"size\" : 10,\n \"docvalue_fields\" : [\n {\n \"field\": \"release_date\",\n \"format\": \"epoch_millis\"\n }\n ],\n \"_source\": {\n \"includes\": [\n \"author\",\n \"name\",\n \"page_count\"\n ],\n \"excludes\": []\n },\n \"sort\" : [\n {\n \"page_count\" : {\n \"order\" : \"desc\",\n \"missing\" : \"_first\",\n \"unmapped_type\" : \"short\"\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "monitoring/production.asciidoc",
- "line": 50
- },
- "digest": "a941fd568f2e20e13df909ab24506073",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.collection.enabled\": false\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.collection.enabled": false
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/production.asciidoc",
- "line": 88
- },
- "digest": "0b47b0bef81b9b5eecfb3775695bd6ad",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/remote_monitor\n{\n \"password\" : \"changeme\",\n \"roles\" : [ \"remote_monitoring_agent\"],\n \"full_name\" : \"Internal Agent For Remote Monitoring\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/remote_monitor",
- "query": null,
- "body": {
- "password": "changeme",
- "roles": [
- "remote_monitoring_agent"
- ],
- "full_name": "Internal Agent For Remote Monitoring"
- },
- "params": {
- "username": "remote_monitor"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/esms.asciidoc",
- "line": 34
- },
- "digest": "fb2b8d642e16132eebcff4f8b6d592d1",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.collection.enabled\": true\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.collection.enabled": true
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/esms.asciidoc",
- "line": 43
- },
- "digest": "519603821dc5b883fc2cf50e3d164084",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.elasticsearch.collection.enabled\": false\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.elasticsearch.collection.enabled": false
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/collecting-monitoring-data.asciidoc",
- "line": 61
- },
- "digest": "fb2b8d642e16132eebcff4f8b6d592d1",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.collection.enabled\": true\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.collection.enabled": true
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/configuring-metricbeat.asciidoc",
- "line": 29
- },
- "digest": "fb2b8d642e16132eebcff4f8b6d592d1",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.collection.enabled\": true\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.collection.enabled": true
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/configuring-metricbeat.asciidoc",
- "line": 194
- },
- "digest": "519603821dc5b883fc2cf50e3d164084",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.elasticsearch.collection.enabled\": false\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.elasticsearch.collection.enabled": false
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/configuring-filebeat.asciidoc",
- "line": 39
- },
- "digest": "fb2b8d642e16132eebcff4f8b6d592d1",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.collection.enabled\": true\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.collection.enabled": true
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/indices.asciidoc",
- "line": 12
- },
- "digest": "83dfd0852101eca3ba8174c9c38b4e73",
- "lang": "console",
- "found": [],
- "source": "GET /_template/.monitoring-*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/.monitoring-*",
- "query": null,
- "body": null,
- "params": {
- "name": ".monitoring-*"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/indices.asciidoc",
- "line": 29
- },
- "digest": "a63906c63a8681c72d53ee0fcf2ffd35",
- "lang": "console",
- "found": [],
- "source": "PUT /_template/custom_monitoring\n{\n \"index_patterns\": \".monitoring-*\",\n \"order\": 1,\n \"settings\": {\n \"number_of_shards\": 5,\n \"number_of_replicas\": 2\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/custom_monitoring",
- "query": null,
- "body": {
- "index_patterns": ".monitoring-*",
- "order": 1,
- "settings": {
- "number_of_shards": 5,
- "number_of_replicas": 2
- }
- },
- "params": {
- "name": "custom_monitoring"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "frozen-indices.asciidoc",
- "line": 66
- },
- "digest": "f9018c483fb6b810d8a921668addfc71",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_forcemerge?max_num_segments=1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_forcemerge",
- "query": {
- "max_num_segments": "1"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "frozen-indices.asciidoc",
- "line": 83
- },
- "digest": "0652fc9f77639fce67a87dc2e33cef51",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search?q=user:kimchy&ignore_throttled=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "q": "user:kimchy",
- "ignore_throttled": "false"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "frozen-indices.asciidoc",
- "line": 106
- },
- "digest": "9ff10591660890ba9d00eb14168c3b67",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/indices/twitter?v&h=i,sth",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/indices/twitter",
- "query": {
- "v": true,
- "h": "i,sth"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "cat.indices"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 35
- },
- "digest": "3acad8c67832b281b9f15349492b8328",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"60m\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "60m"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 124
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 139
- },
- "digest": "618c9d42284c067891fb57034a4fd834",
- "lang": "console",
- "found": [],
- "source": "POST _rollup/job/sensor/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_rollup/job/sensor/_start",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.start_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 153
- },
- "digest": "4e63a0fd56cc5d59595baa0b0721f971",
- "lang": "console",
- "found": [],
- "source": "GET /sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "max_temperature": {
- "max": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 175
- },
- "digest": "82742a24e16fbaffa950867499a39b97",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 102,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : ... ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"max_temperature\" : {\n \"value\" : 202.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 210
- },
- "digest": "e0f8ecc665f547d5365699ab8773e298",
- "lang": "console",
- "found": [],
- "source": "GET /sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"timeline\": {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"7d\"\n },\n \"aggs\": {\n \"nodes\": {\n \"terms\": {\n \"field\": \"node\"\n },\n \"aggs\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n },\n \"avg_voltage\": {\n \"avg\": {\n \"field\": \"voltage\"\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "timeline": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "7d"
- },
- "aggs": {
- "nodes": {
- "terms": {
- "field": "node"
- },
- "aggs": {
- "max_temperature": {
- "max": {
- "field": "temperature"
- }
- },
- "avg_voltage": {
- "avg": {
- "field": "voltage"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 248
- },
- "digest": "0d4cb421d11583bbf5d139ee669930db",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 93,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : ... ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"timeline\" : {\n \"meta\" : { },\n \"buckets\" : [\n {\n \"key_as_string\" : \"2018-01-18T00:00:00.000Z\",\n \"key\" : 1516233600000,\n \"doc_count\" : 6,\n \"nodes\" : {\n \"doc_count_error_upper_bound\" : 0,\n \"sum_other_doc_count\" : 0,\n \"buckets\" : [\n {\n \"key\" : \"a\",\n \"doc_count\" : 2,\n \"max_temperature\" : {\n \"value\" : 202.0\n },\n \"avg_voltage\" : {\n \"value\" : 5.1499998569488525\n }\n },\n {\n \"key\" : \"b\",\n \"doc_count\" : 2,\n \"max_temperature\" : {\n \"value\" : 201.0\n },\n \"avg_voltage\" : {\n \"value\" : 5.700000047683716\n }\n },\n {\n \"key\" : \"c\",\n \"doc_count\" : 2,\n \"max_temperature\" : {\n \"value\" : 202.0\n },\n \"avg_voltage\" : {\n \"value\" : 4.099999904632568\n }\n }\n ]\n }\n }\n ]\n }\n }\n}\n"
- },
- {
- "source_location": {
- "file": "rollup/rollup-search-limitations.asciidoc",
- "line": 45
- },
- "digest": "3d1cea1ad861d1ee62e5f34b84371943",
- "lang": "console",
- "found": [],
- "source": "GET sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"avg_temperature\": {\n \"avg\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "avg_temperature": {
- "avg": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-search-limitations.asciidoc",
- "line": 64
- },
- "digest": "b010489cc7d519a628dcbc1ce81adb3c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"error\" : {\n \"root_cause\" : [\n {\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"There is not a rollup job that has a [avg] agg with name [avg_temperature] which also satisfies all requirements of query.\",\n \"stack_trace\": ...\n }\n ],\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"There is not a rollup job that has a [avg] agg with name [avg_temperature] which also satisfies all requirements of query.\",\n \"stack_trace\": ...\n },\n \"status\": 400\n}"
- },
- {
- "source_location": {
- "file": "transform/ecommerce-tutorial.asciidoc",
- "line": 88
- },
- "digest": "8345d2615f43a934fe1871a5120eca1d",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"term\": {\"currency\": \"EUR\"}\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"total_quantity.sum\": {\n \"sum\": {\n \"field\": \"total_quantity\"\n }\n },\n \"taxless_total_price.sum\": {\n \"sum\": {\n \"field\": \"taxless_total_price\"\n }\n },\n \"total_quantity.max\": {\n \"max\": {\n \"field\": \"total_quantity\"\n }\n },\n \"order_id.cardinality\": {\n \"cardinality\": {\n \"field\": \"order_id\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce",
- "query": {
- "bool": {
- "filter": {
- "term": {
- "currency": "EUR"
- }
- }
- }
- }
- },
- "pivot": {
- "group_by": {
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "total_quantity.sum": {
- "sum": {
- "field": "total_quantity"
- }
- },
- "taxless_total_price.sum": {
- "sum": {
- "field": "taxless_total_price"
- }
- },
- "total_quantity.max": {
- "max": {
- "field": "total_quantity"
- }
- },
- "order_id.cardinality": {
- "cardinality": {
- "field": "order_id"
- }
- }
- }
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/ecommerce-tutorial.asciidoc",
- "line": 164
- },
- "digest": "c68404749f090ab191c0fd5f651635cf",
- "lang": "console",
- "found": [],
- "source": "PUT _transform/ecommerce-customer-transform\n{\n \"source\": {\n \"index\": [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"term\": {\n \"currency\": \"EUR\"\n }\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"total_quantity.sum\": {\n \"sum\": {\n \"field\": \"total_quantity\"\n }\n },\n \"taxless_total_price.sum\": {\n \"sum\": {\n \"field\": \"taxless_total_price\"\n }\n },\n \"total_quantity.max\": {\n \"max\": {\n \"field\": \"total_quantity\"\n }\n },\n \"order_id.cardinality\": {\n \"cardinality\": {\n \"field\": \"order_id\"\n }\n }\n }\n },\n \"dest\": {\n \"index\": \"ecommerce-customers\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_transform/ecommerce-customer-transform",
- "query": null,
- "body": {
- "source": {
- "index": [
- "kibana_sample_data_ecommerce"
- ],
- "query": {
- "bool": {
- "filter": {
- "term": {
- "currency": "EUR"
- }
- }
- }
- }
- },
- "pivot": {
- "group_by": {
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "total_quantity.sum": {
- "sum": {
- "field": "total_quantity"
- }
- },
- "taxless_total_price.sum": {
- "sum": {
- "field": "taxless_total_price"
- }
- },
- "total_quantity.max": {
- "max": {
- "field": "total_quantity"
- }
- },
- "order_id.cardinality": {
- "cardinality": {
- "field": "order_id"
- }
- }
- }
- },
- "dest": {
- "index": "ecommerce-customers"
- }
- },
- "params": {
- "transform_id": "ecommerce-customer-transform"
- },
- "api": "transform.put_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/ecommerce-tutorial.asciidoc",
- "line": 243
- },
- "digest": "4ded8ad815ac0e83b1c21a6c18fd0763",
- "lang": "console",
- "found": [],
- "source": "POST _transform/ecommerce-customer-transform/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/ecommerce-customer-transform/_start",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce-customer-transform"
- },
- "api": "transform.start_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 29
- },
- "digest": "88341b4eba71ec722f3e38fa1696fe87",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"dest\" : { <1>\n \"index\" : \"sample_ecommerce_orders_by_customer\"\n },\n \"pivot\": {\n \"group_by\": { <2>\n \"user\": { \"terms\": { \"field\": \"user\" }},\n \"customer_id\": { \"terms\": { \"field\": \"customer_id\" }}\n },\n \"aggregations\": {\n \"order_count\": { \"value_count\": { \"field\": \"order_id\" }},\n \"total_order_amt\": { \"sum\": { \"field\": \"taxful_total_price\" }},\n \"avg_amt_per_order\": { \"avg\": { \"field\": \"taxful_total_price\" }},\n \"avg_unique_products_per_order\": { \"avg\": { \"field\": \"total_unique_products\" }},\n \"total_unique_products\": { \"cardinality\": { \"field\": \"products.product_id\" }}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce"
- },
- "dest": {
- "index": "sample_ecommerce_orders_by_customer"
- },
- "pivot": {
- "group_by": {
- "user": {
- "terms": {
- "field": "user"
- }
- },
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "order_count": {
- "value_count": {
- "field": "order_id"
- }
- },
- "total_order_amt": {
- "sum": {
- "field": "taxful_total_price"
- }
- },
- "avg_amt_per_order": {
- "avg": {
- "field": "taxful_total_price"
- }
- },
- "avg_unique_products_per_order": {
- "avg": {
- "field": "total_unique_products"
- }
- },
- "total_unique_products": {
- "cardinality": {
- "field": "products.product_id"
- }
- }
- }
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 115
- },
- "digest": "be9376b1e354ad9c6bdad83f6a0ce5ad",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_flights\",\n \"query\": { <1>\n \"bool\": {\n \"filter\": [\n { \"term\": { \"Cancelled\": false } }\n ]\n }\n }\n },\n \"dest\" : { <2>\n \"index\" : \"sample_flight_delays_by_carrier\"\n },\n \"pivot\": {\n \"group_by\": { <3>\n \"carrier\": { \"terms\": { \"field\": \"Carrier\" }}\n },\n \"aggregations\": {\n \"flights_count\": { \"value_count\": { \"field\": \"FlightNum\" }},\n \"delay_mins_total\": { \"sum\": { \"field\": \"FlightDelayMin\" }},\n \"flight_mins_total\": { \"sum\": { \"field\": \"FlightTimeMin\" }},\n \"delay_time_percentage\": { <4>\n \"bucket_script\": {\n \"buckets_path\": {\n \"delay_time\": \"delay_mins_total.value\",\n \"flight_time\": \"flight_mins_total.value\"\n },\n \"script\": \"(params.delay_time / params.flight_time) * 100\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_flights",
- "query": {
- "bool": {
- "filter": [
- {
- "term": {
- "Cancelled": false
- }
- }
- ]
- }
- }
- },
- "dest": {
- "index": "sample_flight_delays_by_carrier"
- },
- "pivot": {
- "group_by": {
- "carrier": {
- "terms": {
- "field": "Carrier"
- }
- }
- },
- "aggregations": {
- "flights_count": {
- "value_count": {
- "field": "FlightNum"
- }
- },
- "delay_mins_total": {
- "sum": {
- "field": "FlightDelayMin"
- }
- },
- "flight_mins_total": {
- "sum": {
- "field": "FlightTimeMin"
- }
- },
- "delay_time_percentage": {
- "bucket_script": {
- "buckets_path": {
- "delay_time": "delay_mins_total.value",
- "flight_time": "flight_mins_total.value"
- },
- "script": "(params.delay_time / params.flight_time) * 100"
- }
- }
- }
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 207
- },
- "digest": "0bad2211181281b6cc5df8e364bcc111",
- "lang": "console",
- "found": [],
- "source": "PUT _transform/suspicious_client_ips\n{\n \"source\": {\n \"index\": \"kibana_sample_data_logs\"\n },\n \"dest\" : { <1>\n \"index\" : \"sample_weblogs_by_clientip\"\n },\n \"sync\" : { <2>\n \"time\": {\n \"field\": \"timestamp\",\n \"delay\": \"60s\"\n }\n },\n \"pivot\": {\n \"group_by\": { <3>\n \"clientip\": { \"terms\": { \"field\": \"clientip\" } }\n },\n \"aggregations\": {\n \"url_dc\": { \"cardinality\": { \"field\": \"url.keyword\" }},\n \"bytes_sum\": { \"sum\": { \"field\": \"bytes\" }},\n \"geo.src_dc\": { \"cardinality\": { \"field\": \"geo.src\" }},\n \"agent_dc\": { \"cardinality\": { \"field\": \"agent.keyword\" }},\n \"geo.dest_dc\": { \"cardinality\": { \"field\": \"geo.dest\" }},\n \"responses.total\": { \"value_count\": { \"field\": \"timestamp\" }},\n \"responses.counts\": { <4>\n \"scripted_metric\": {\n \"init_script\": \"state.responses = ['error':0L,'success':0L,'other':0L]\",\n \"map_script\": \"\"\"\n def code = doc['response.keyword'].value;\n if (code.startsWith('5') || code.startsWith('4')) {\n state.responses.error += 1 ;\n } else if(code.startsWith('2')) {\n state.responses.success += 1;\n } else {\n state.responses.other += 1;\n }\n \"\"\",\n \"combine_script\": \"state.responses\",\n \"reduce_script\": \"\"\"\n def counts = ['error': 0L, 'success': 0L, 'other': 0L];\n for (responses in states) {\n counts.error += responses['error'];\n counts.success += responses['success'];\n counts.other += responses['other'];\n }\n return counts;\n \"\"\"\n }\n },\n \"timestamp.min\": { \"min\": { \"field\": \"timestamp\" }},\n \"timestamp.max\": { \"max\": { \"field\": \"timestamp\" }},\n \"timestamp.duration_ms\": { <5>\n \"bucket_script\": {\n \"buckets_path\": {\n \"min_time\": \"timestamp.min.value\",\n \"max_time\": \"timestamp.max.value\"\n },\n \"script\": \"(params.max_time - params.min_time)\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_transform/suspicious_client_ips",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_logs"
- },
- "dest": {
- "index": "sample_weblogs_by_clientip"
- },
- "sync": {
- "time": {
- "field": "timestamp",
- "delay": "60s"
- }
- },
- "pivot": {
- "group_by": {
- "clientip": {
- "terms": {
- "field": "clientip"
- }
- }
- },
- "aggregations": {
- "url_dc": {
- "cardinality": {
- "field": "url.keyword"
- }
- },
- "bytes_sum": {
- "sum": {
- "field": "bytes"
- }
- },
- "geo.src_dc": {
- "cardinality": {
- "field": "geo.src"
- }
- },
- "agent_dc": {
- "cardinality": {
- "field": "agent.keyword"
- }
- },
- "geo.dest_dc": {
- "cardinality": {
- "field": "geo.dest"
- }
- },
- "responses.total": {
- "value_count": {
- "field": "timestamp"
- }
- },
- "responses.counts": {
- "scripted_metric": {
- "init_script": "state.responses = ['error':0L,'success':0L,'other':0L]",
- "map_script": "\n def code = doc['response.keyword'].value;\n if (code.startsWith('5') || code.startsWith('4')) {\n state.responses.error += 1 ;\n } else if(code.startsWith('2')) {\n state.responses.success += 1;\n } else {\n state.responses.other += 1;\n }\n ",
- "combine_script": "state.responses",
- "reduce_script": "\n def counts = ['error': 0L, 'success': 0L, 'other': 0L];\n for (responses in states) {\n counts.error += responses['error'];\n counts.success += responses['success'];\n counts.other += responses['other'];\n }\n return counts;\n "
- }
- },
- "timestamp.min": {
- "min": {
- "field": "timestamp"
- }
- },
- "timestamp.max": {
- "max": {
- "field": "timestamp"
- }
- },
- "timestamp.duration_ms": {
- "bucket_script": {
- "buckets_path": {
- "min_time": "timestamp.min.value",
- "max_time": "timestamp.max.value"
- },
- "script": "(params.max_time - params.min_time)"
- }
- }
- }
- }
- },
- "params": {
- "transform_id": "suspicious_client_ips"
- },
- "api": "transform.put_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 288
- },
- "digest": "4bd42e31ac4a5cf237777f1a0e97aba8",
- "lang": "console",
- "found": [],
- "source": "POST _transform/suspicious_client_ips/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/suspicious_client_ips/_start",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "suspicious_client_ips"
- },
- "api": "transform.start_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 297
- },
- "digest": "14f2dab0583c5a9fcc39931d33194872",
- "lang": "console",
- "found": [],
- "source": "GET sample_weblogs_by_clientip/_search",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sample_weblogs_by_clientip/_search",
- "query": null,
- "body": null,
- "params": {
- "index": "sample_weblogs_by_clientip"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-cluster-config.asciidoc",
- "line": 41
- },
- "digest": "ee79edafcbc80dfda496e3a26506dcbc",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings?pretty&flat_settings&filter_path=persistent",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": {
- "pretty": true,
- "flat_settings": true,
- "filter_path": "persistent"
- },
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 79
- },
- "digest": "92b3749a473cf2e7ff4055316662a4fe",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_backup_location"
- }
- },
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 102
- },
- "digest": "43a7b43711eab81ad093e67ecc221327",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/snapshot_user\n{\n \"password\" : \"secret\",\n \"roles\" : [ \"snapshot_user\" ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/snapshot_user",
- "query": null,
- "body": {
- "password": "secret",
- "roles": [
- "snapshot_user"
- ]
- },
- "params": {
- "username": "snapshot_user"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 120
- },
- "digest": "7acf1099282366553cb8b093ed4fcd00",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup/snapshot_1\n{\n \"indices\": \".security\",\n \"include_global_state\": true <1>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": {
- "indices": ".security",
- "include_global_state": true
- },
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 190
- },
- "digest": "ff930e6409b6a923ef1c9e7fc99f24cc",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 196
- },
- "digest": "020c56e520ff6556ebfaf98efaef56aa",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/overview.asciidoc",
- "line": 205
- },
- "digest": "7c5e41a7c0075d87b8f8348a6efa990c",
- "lang": "console",
- "found": [],
- "source": "POST /follower_index/_ccr/pause_follow\n\nPOST /follower_index/_close\n\nPUT /follower_index/_ccr/follow?wait_for_active_shards=1\n{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/follower_index/_ccr/pause_follow",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.pause_follow"
- },
- {
- "method": "POST",
- "url": "/follower_index/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "indices.close"
- },
- {
- "method": "PUT",
- "url": "/follower_index/_ccr/follow",
- "query": {
- "wait_for_active_shards": "1"
- },
- "body": {
- "remote_cluster": "remote_cluster",
- "leader_index": "leader_index"
- },
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 94
- },
- "digest": "9ad38ab4d9c3983e97e8c38fec611f10",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\" : {\n \"cluster\" : {\n \"remote\" : {\n \"leader\" : {\n \"seeds\" : [\n \"127.0.0.1:9300\" <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "leader": {
- "seeds": [
- "127.0.0.1:9300"
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 119
- },
- "digest": "cc0cca5556ec6224c7134c233734beed",
- "lang": "console",
- "found": [],
- "source": "GET /_remote/info",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_remote/info",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.remote_info"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 128
- },
- "digest": "741e6e2a7786f6c5ad12ee6f3ca35160",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"leader\" : {\n \"seeds\" : [\n \"127.0.0.1:9300\"\n ],\n \"connected\" : true, <1>\n \"num_nodes_connected\" : 1, <2>\n \"max_connections_per_cluster\" : 3,\n \"initial_connect_timeout\" : \"30s\",\n \"skip_unavailable\" : false,\n \"mode\" : \"sniff\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 165
- },
- "digest": "74ed3197e0e77750f5255c6df0cc0fe5",
- "lang": "console",
- "found": [],
- "source": "PUT /server-metrics\n{\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : 1,\n \"number_of_replicas\" : 0\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"accept\" : {\n \"type\" : \"long\"\n },\n \"deny\" : {\n \"type\" : \"long\"\n },\n \"host\" : {\n \"type\" : \"keyword\"\n },\n \"response\" : {\n \"type\" : \"float\"\n },\n \"service\" : {\n \"type\" : \"keyword\"\n },\n \"total\" : {\n \"type\" : \"long\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/server-metrics",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "number_of_shards": 1,
- "number_of_replicas": 0
- }
- },
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- },
- "accept": {
- "type": "long"
- },
- "deny": {
- "type": "long"
- },
- "host": {
- "type": "keyword"
- },
- "response": {
- "type": "float"
- },
- "service": {
- "type": "keyword"
- },
- "total": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "server-metrics"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 214
- },
- "digest": "278da0495c9008e6d9f25a5d5f0339b7",
- "lang": "console",
- "found": [],
- "source": "PUT /server-metrics-copy/_ccr/follow?wait_for_active_shards=1\n{\n \"remote_cluster\" : \"leader\",\n \"leader_index\" : \"server-metrics\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/server-metrics-copy/_ccr/follow",
- "query": {
- "wait_for_active_shards": "1"
- },
- "body": {
- "remote_cluster": "leader",
- "leader_index": "server-metrics"
- },
- "params": {
- "index": "server-metrics-copy"
- },
- "api": "ccr.follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 276
- },
- "digest": "6b104a66ab47fc1e1f24a5738f82feb4",
- "lang": "console",
- "found": [],
- "source": "PUT /_ccr/auto_follow/beats\n{\n \"remote_cluster\" : \"leader\",\n \"leader_index_patterns\" :\n [\n \"metricbeat-*\", <1>\n \"packetbeat-*\" <2>\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-copy\" <3>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ccr/auto_follow/beats",
- "query": null,
- "body": {
- "remote_cluster": "leader",
- "leader_index_patterns": [
- "metricbeat-*",
- "packetbeat-*"
- ],
- "follow_index_pattern": "{{leader_index}}-copy"
- },
- "params": {
- "name": "beats"
- },
- "api": "ccr.put_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 24
- },
- "digest": "92b3749a473cf2e7ff4055316662a4fe",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_backup_location"
- }
- },
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 38
- },
- "digest": "ff930e6409b6a923ef1c9e7fc99f24cc",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 45
- },
- "digest": "321f12509469d89609b6d398b8d94e45",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_backup\": {\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 63
- },
- "digest": "b9e4f7a80d21c85f88f578219df8e192",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/repo*,*backup*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/repo*,*backup*",
- "query": null,
- "body": null,
- "params": {
- "repository": "repo*,*backup*"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 71
- },
- "digest": "0d754b0d8d13c6d39ea353978dfe5992",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot",
- "query": null,
- "body": null,
- "params": null,
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 78
- },
- "digest": "37432cda12eb63ce59d186b55233c6e1",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/_all",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/_all",
- "query": null,
- "body": null,
- "params": {
- "repository": "_all"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 111
- },
- "digest": "44b410249d477c640c127bfc7320e365",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_fs_backup\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"/mount/backups/my_fs_backup_location\",\n \"compress\": true\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_fs_backup",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "/mount/backups/my_fs_backup_location",
- "compress": true
- }
- },
- "params": {
- "repository": "my_fs_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 127
- },
- "digest": "8988215f3a4fc4b7a7ef4a9c5be3391e",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_fs_backup\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_fs_backup_location\",\n \"compress\": true\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_fs_backup",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_fs_backup_location",
- "compress": true
- }
- },
- "params": {
- "repository": "my_fs_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 205
- },
- "digest": "98ee9bfa32b64ca22e4338544b36c370",
- "lang": "console",
- "found": [],
- "source": "PUT _snapshot/my_src_only_repository\n{\n \"type\": \"source\",\n \"settings\": {\n \"delegate_type\": \"fs\",\n \"location\": \"my_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_src_only_repository",
- "query": null,
- "body": {
- "type": "source",
- "settings": {
- "delegate_type": "fs",
- "location": "my_backup_location"
- }
- },
- "params": {
- "repository": "my_src_only_repository"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 236
- },
- "digest": "f1a7cf532da3a8f9a52a401a90e3a998",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_unverified_backup?verify=false\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_unverified_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_unverified_backup",
- "query": {
- "verify": "false"
- },
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_unverified_backup_location"
- }
- },
- "params": {
- "repository": "my_unverified_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 250
- },
- "digest": "337cd2c3f9e11665f00786705037f86c",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_unverified_backup/_verify",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_unverified_backup/_verify",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_unverified_backup"
- },
- "api": "snapshot.verify_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 267
- },
- "digest": "6aca241c0361d26f134712821e2d09a9",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_repository/_cleanup",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_repository/_cleanup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.cleanup_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 275
- },
- "digest": "5e309dfb203bf2b89cd8a4c353c4b6f5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"results\": {\n \"deleted_bytes\": 20,\n \"deleted_blobs\": 5\n }\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 27
- },
- "digest": "2ab78817eacb5030a447e7fac6b91591",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup/snapshot_1?wait_for_completion=true",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": {
- "wait_for_completion": "true"
- },
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 40
- },
- "digest": "4a0353692bb14c5fccdc97903af0aa13",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup/snapshot_2?wait_for_completion=true\n{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"kimchy\",\n \"taken_because\": \"backup before upgrading\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup/snapshot_2",
- "query": {
- "wait_for_completion": "true"
- },
- "body": {
- "indices": "index_1,index_2",
- "ignore_unavailable": true,
- "include_global_state": false,
- "metadata": {
- "taken_by": "kimchy",
- "taken_because": "backup before upgrading"
- }
- },
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_2"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 72
- },
- "digest": "7eb0303e39243fbb9bf51a99270cd022",
- "lang": "console",
- "found": [],
- "source": "# PUT /_snapshot/my_backup/\nPUT /_snapshot/my_backup/%3Csnapshot-%7Bnow%2Fd%7D%3E",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup/%3Csnapshot-%7Bnow%2Fd%7D%3E",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "%3Csnapshot-%7Bnow%2Fd%7D%3E"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 102
- },
- "digest": "020c56e520ff6556ebfaf98efaef56aa",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 139
- },
- "digest": "0b77ebfb06c63ccbad857b39bb4ff851",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_*,some_other_snapshot",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_*,some_other_snapshot",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_*,some_other_snapshot"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 147
- },
- "digest": "fb224f0ae2a03567b6d9b165e7dd24b6",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/_all",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/_all",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "_all"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 167
- },
- "digest": "677fdf84ac97bb107207b6966143144b",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/_all\nGET /_snapshot/my_backup,my_fs_backup\nGET /_snapshot/my*/snap*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/_all",
- "query": null,
- "body": null,
- "params": {
- "repository": "_all"
- },
- "api": "snapshot.get_repository"
- },
- {
- "method": "GET",
- "url": "/_snapshot/my_backup,my_fs_backup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup,my_fs_backup"
- },
- "api": "snapshot.get_repository"
- },
- {
- "method": "GET",
- "url": "/_snapshot/my*/snap*",
- "query": null,
- "body": null,
- "params": {
- "repository": "my*",
- "snapshot": "snap*"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 177
- },
- "digest": "155c438e215890cdcb4879eaaadf4046",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/_current",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/_current",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "_current"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 185
- },
- "digest": "0784fbe88299be4f02eaa86368e93203",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_backup/snapshot_2",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_backup/snapshot_2",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_2"
- },
- "api": "snapshot.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 199
- },
- "digest": "2b8d2065be3002b0be26598d6ad803a6",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_backup",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.delete_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 28
- },
- "digest": "853ca73db9b596cc4ddda66b3ec8faa2",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_backup/snapshot_1/_restore",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_backup/snapshot_1/_restore",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.restore"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 45
- },
- "digest": "47dcf95e3d398b9bdcb0a483f705bb4b",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_backup/snapshot_1/_restore\n{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": true,\n \"rename_pattern\": \"index_(.+)\",\n \"rename_replacement\": \"restored_index_$1\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_backup/snapshot_1/_restore",
- "query": null,
- "body": {
- "indices": "index_1,index_2",
- "ignore_unavailable": true,
- "include_global_state": true,
- "rename_pattern": "index_(.+)",
- "rename_replacement": "restored_index_$1"
- },
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.restore"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 83
- },
- "digest": "922df55507c66533fcadc850eecabcff",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_backup/snapshot_1/_restore\n{\n \"indices\": \"index_1\",\n \"ignore_unavailable\": true,\n \"index_settings\": {\n \"index.number_of_replicas\": 0\n },\n \"ignore_index_settings\": [\n \"index.refresh_interval\"\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_backup/snapshot_1/_restore",
- "query": null,
- "body": {
- "indices": "index_1",
- "ignore_unavailable": true,
- "index_settings": {
- "index.number_of_replicas": 0
- },
- "ignore_index_settings": [
- "index.refresh_interval"
- ]
- },
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.restore"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 128
- },
- "digest": "1ae301364751c376b3d26581a36d8975",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/_status",
- "query": null,
- "body": null,
- "params": null,
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 137
- },
- "digest": "db1913b97109b86cfc5efc7cfcd65d93",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/_status",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 146
- },
- "digest": "e566ca0098be82a2847c17069711a822",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1/_status",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 154
- },
- "digest": "fd7dbd4240410907a1d6823eb1ee3b03",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"snapshots\": [\n {\n \"snapshot\": \"snapshot_1\",\n \"repository\": \"my_backup\",\n \"uuid\": \"XuBo4l4ISYiVg0nYUen9zg\",\n \"state\": \"SUCCESS\",\n \"include_global_state\": true,\n \"shards_stats\": {\n \"initializing\": 0,\n \"started\": 0,\n \"finalizing\": 0,\n \"done\": 5,\n \"failed\": 0,\n \"total\": 5\n },\n \"stats\": {\n \"incremental\": {\n \"file_count\": 8,\n \"size_in_bytes\": 4704\n },\n \"processed\": {\n \"file_count\": 7,\n \"size_in_bytes\": 4254\n },\n \"total\": {\n \"file_count\": 8,\n \"size_in_bytes\": 4704\n },\n \"start_time_in_millis\": 1526280280355,\n \"time_in_millis\": 358\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 202
- },
- "digest": "2432f86346177533cabdabbd4eb41b30",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1,snapshot_2/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1,snapshot_2/_status",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1,snapshot_2"
- },
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/monitor-snapshot-restore.asciidoc",
- "line": 32
- },
- "digest": "020c56e520ff6556ebfaf98efaef56aa",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/monitor-snapshot-restore.asciidoc",
- "line": 43
- },
- "digest": "e566ca0098be82a2847c17069711a822",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1/_status",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/monitor-snapshot-restore.asciidoc",
- "line": 72
- },
- "digest": "86c723fc6212d34166661e7dac223491",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_backup/snapshot_1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/index.asciidoc",
- "line": 38
- },
- "digest": "1d7abeea98f6ed64cc8371794c90a921",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/slm-admin\n{\n \"cluster\": [\"manage_slm\", \"cluster:admin/snapshot/*\"],\n \"indices\": [\n {\n \"names\": [\".slm-history-*\"],\n \"privileges\": [\"all\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/slm-admin",
- "query": null,
- "body": {
- "cluster": [
- "manage_slm",
- "cluster:admin/snapshot/*"
- ],
- "indices": [
- {
- "names": [
- ".slm-history-*"
- ],
- "privileges": [
- "all"
- ]
- }
- ]
- },
- "params": {
- "name": "slm-admin"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/index.asciidoc",
- "line": 56
- },
- "digest": "ef76d0e4cdc2881c161a5557a98a3446",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/slm-read-only\n{\n \"cluster\": [\"read_slm\"],\n \"indices\": [\n {\n \"names\": [\".slm-history-*\"],\n \"privileges\": [\"read\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/slm-read-only",
- "query": null,
- "body": {
- "cluster": [
- "read_slm"
- ],
- "indices": [
- {
- "names": [
- ".slm-history-*"
- ],
- "privileges": [
- "read"
- ]
- }
- ]
- },
- "params": {
- "name": "slm-read-only"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 23
- },
- "digest": "89b72dd7f747f6297c2b089e8bc807be",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_repository\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_repository",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_backup_location"
- }
- },
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 48
- },
- "digest": "0da01289c561448254d521504d5122dd",
- "lang": "console",
- "found": [],
- "source": "PUT /_slm/policy/nightly-snapshots\n{\n \"schedule\": \"0 30 2 * * ?\", <1>\n \"name\": \"\", <2>\n \"repository\": \"my_repository\", <3>\n \"config\": { <4>\n \"indices\": [\"*\"] <5>\n },\n \"retention\": { <6>\n \"expire_after\": \"30d\", <7>\n \"min_count\": 5, <8>\n \"max_count\": 50 <9>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_slm/policy/nightly-snapshots",
- "query": null,
- "body": {
- "schedule": "0 30 2 * * ?",
- "name": "",
- "repository": "my_repository",
- "config": {
- "indices": [
- "*"
- ]
- },
- "retention": {
- "expire_after": "30d",
- "min_count": 5,
- "max_count": 50
- }
- },
- "params": {
- "policy_id": "nightly-snapshots"
- },
- "api": "slm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 105
- },
- "digest": "af5ff39759d3af0525d941634a6cdb82",
- "lang": "console",
- "found": [],
- "source": "POST /_slm/policy/nightly-snapshots/_execute",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 117
- },
- "digest": "f1b545d3c3eeedf8ae09c56070c26053",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/policy/nightly-snapshots?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/policy/nightly-snapshots",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "policy_id": "nightly-snapshots"
- },
- "api": "slm.get_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 127
- },
- "digest": "d95c4eab006aa569e554851fd0ac324f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nightly-snapshots\" : {\n \"version\": 1,\n \"modified_date\": \"2019-04-23T01:30:00.000Z\",\n \"modified_date_millis\": 1556048137314,\n \"policy\" : {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"*\"],\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n },\n \"last_success\": { <1>\n \"snapshot_name\": \"nightly-snap-2019.04.24-tmtnyjtrsxkhbrrdcgg18a\", <2>\n \"time_string\": \"2019-04-24T16:43:49.316Z\",\n \"time\": 1556124229316\n } ,\n \"last_failure\": { <3>\n \"snapshot_name\": \"nightly-snap-2019.04.02-lohisb5ith2n8hxacaq3mw\",\n \"time_string\": \"2019-04-02T01:30:00.000Z\",\n \"time\": 1556042030000,\n \"details\": \"{\\\"type\\\":\\\"index_not_found_exception\\\",\\\"reason\\\":\\\"no such index [important]\\\",\\\"resource.type\\\":\\\"index_or_alias\\\",\\\"resource.id\\\":\\\"important\\\",\\\"index_uuid\\\":\\\"_na_\\\",\\\"index\\\":\\\"important\\\",\\\"stack_trace\\\":\\\"[important] IndexNotFoundException[no such index [important]]\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.indexNotFoundException(IndexNameExpressionResolver.java:762)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.innerResolve(IndexNameExpressionResolver.java:714)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.resolve(IndexNameExpressionResolver.java:670)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:163)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndexNames(IndexNameExpressionResolver.java:142)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndexNames(IndexNameExpressionResolver.java:102)\\\\n\\\\tat org.elasticsearch.snapshots.SnapshotsService$1.execute(SnapshotsService.java:280)\\\\n\\\\tat org.elasticsearch.cluster.ClusterStateUpdateTask.execute(ClusterStateUpdateTask.java:47)\\\\n\\\\tat org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:687)\\\\n\\\\tat org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:310)\\\\n\\\\tat org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:210)\\\\n\\\\tat org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:142)\\\\n\\\\tat org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150)\\\\n\\\\tat org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188)\\\\n\\\\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:688)\\\\n\\\\tat org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:252)\\\\n\\\\tat org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:215)\\\\n\\\\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\\\\n\\\\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\\\\n\\\\tat java.base/java.lang.Thread.run(Thread.java:834)\\\\n\\\"}\"\n } ,\n \"next_execution\": \"2019-04-24T01:30:00.000Z\", <4>\n \"next_execution_millis\": 1556048160000\n }\n}"
- },
- {
- "source_location": {
- "file": "slm/slm-retention.asciidoc",
- "line": 31
- },
- "digest": "1527fe79aa1ae25a155a060bac788e7f",
- "lang": "console",
- "found": [],
- "source": "PUT /_slm/policy/daily-snapshots\n{\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"retention\": { <1>\n \"expire_after\": \"30d\", <2>\n \"min_count\": 5, <3>\n \"max_count\": 50 <4>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_slm/policy/daily-snapshots",
- "query": null,
- "body": {
- "schedule": "0 30 1 * * ?",
- "name": "",
- "repository": "my_repository",
- "retention": {
- "expire_after": "30d",
- "min_count": 5,
- "max_count": 50
- }
- },
- "params": {
- "policy_id": "daily-snapshots"
- },
- "api": "slm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/slm-retention.asciidoc",
- "line": 80
- },
- "digest": "55e8ddf643726dec51531ada0bec7143",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.get_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/built-in-users.asciidoc",
- "line": 142
- },
- "digest": "6f0389ac52808df23bb6081a1acd4eed",
- "lang": "console",
- "found": [],
- "source": "PUT _security/user/logstash_system/_enable",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/user/logstash_system/_enable",
- "query": null,
- "body": null,
- "params": {
- "username": "logstash_system"
- },
- "api": "security.enable_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-active-directory-realm.asciidoc",
- "line": 178
- },
- "digest": "21e95d29bc37deb5689a654aa323b4ba",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/admins\n{\n \"roles\" : [ \"monitoring\" , \"user\" ],\n \"rules\" : { \"field\" : {\n \"groups\" : \"cn=admins,dc=example,dc=com\" <1>\n } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/admins",
- "query": null,
- "body": {
- "roles": [
- "monitoring",
- "user"
- ],
- "rules": {
- "field": {
- "groups": "cn=admins,dc=example,dc=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "admins"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-active-directory-realm.asciidoc",
- "line": 192
- },
- "digest": "bd0d30a7683037e1ebadd163514765d4",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/basic_users\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"any\": [\n { \"field\" : {\n \"groups\" : \"cn=users,dc=example,dc=com\" <1>\n } },\n { \"field\" : {\n \"dn\" : \"cn=John Doe,cn=contractors,dc=example,dc=com\" <2>\n } }\n ] },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/basic_users",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "any": [
- {
- "field": {
- "groups": "cn=users,dc=example,dc=com"
- }
- },
- {
- "field": {
- "dn": "cn=John Doe,cn=contractors,dc=example,dc=com"
- }
- }
- ]
- },
- "enabled": true
- },
- "params": {
- "name": "basic_users"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-ldap-realm.asciidoc",
- "line": 138
- },
- "digest": "21e95d29bc37deb5689a654aa323b4ba",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/admins\n{\n \"roles\" : [ \"monitoring\" , \"user\" ],\n \"rules\" : { \"field\" : {\n \"groups\" : \"cn=admins,dc=example,dc=com\" <1>\n } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/admins",
- "query": null,
- "body": {
- "roles": [
- "monitoring",
- "user"
- ],
- "rules": {
- "field": {
- "groups": "cn=admins,dc=example,dc=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "admins"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-ldap-realm.asciidoc",
- "line": 152
- },
- "digest": "38ffa96674b5fd4042589af0ebb0437b",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/basic_users\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"field\" : {\n \"groups\" : \"cn=users,dc=example,dc=com\" <1>\n } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/basic_users",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "field": {
- "groups": "cn=users,dc=example,dc=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "basic_users"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-pki-realm.asciidoc",
- "line": 158
- },
- "digest": "70bbe14bc4d5a5d58e81ab2b02408817",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/users\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"field\" : {\n \"dn\" : \"cn=John Doe,ou=example,o=com\" <1>\n } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/users",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "field": {
- "dn": "cn=John Doe,ou=example,o=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "users"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-pki-realm.asciidoc",
- "line": 251
- },
- "digest": "1f8a6d2cc57ed8997a52354aca371aac",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/direct_pki_only\n{\n \"roles\" : [ \"role_for_pki1_direct\" ],\n \"rules\" : {\n \"all\": [\n {\n \"field\": {\"realm.name\": \"pki1\"}\n },\n {\n \"field\": {\n \"metadata.pki_delegated_by_user\": null <1>\n }\n }\n ]\n },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/direct_pki_only",
- "query": null,
- "body": {
- "roles": [
- "role_for_pki1_direct"
- ],
- "rules": {
- "all": [
- {
- "field": {
- "realm.name": "pki1"
- }
- },
- {
- "field": {
- "metadata.pki_delegated_by_user": null
- }
- }
- ]
- },
- "enabled": true
- },
- "params": {
- "name": "direct_pki_only"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-kerberos-realm.asciidoc",
- "line": 151
- },
- "digest": "9584b042223982e0bfde8d12d42c9705",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/kerbrolemapping\n{\n \"roles\" : [ \"monitoring_user\" ],\n \"enabled\": true,\n \"rules\" : {\n \"field\" : { \"username\" : \"user@REALM\" }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/kerbrolemapping",
- "query": null,
- "body": {
- "roles": [
- "monitoring_user"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "username": "user@REALM"
- }
- }
- },
- "params": {
- "name": "kerbrolemapping"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 646
- },
- "digest": "862907653d1c18d2e80eff7f421200e2",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/saml-example\n{\n \"roles\": [ \"example_role\" ], <1>\n \"enabled\": true,\n \"rules\": {\n \"field\": { \"realm.name\": \"saml1\" }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/saml-example",
- "query": null,
- "body": {
- "roles": [
- "example_role"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "realm.name": "saml1"
- }
- }
- },
- "params": {
- "name": "saml-example"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 685
- },
- "digest": "3806cae804fe77bf38b85561592c745b",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/saml-finance\n{\n \"roles\": [ \"finance_data\" ],\n \"enabled\": true,\n \"rules\": { \"all\": [\n { \"field\": { \"realm.name\": \"saml1\" } },\n { \"field\": { \"groups\": \"finance-team\" } }\n ] }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/saml-finance",
- "query": null,
- "body": {
- "roles": [
- "finance_data"
- ],
- "enabled": true,
- "rules": {
- "all": [
- {
- "field": {
- "realm.name": "saml1"
- }
- },
- {
- "field": {
- "groups": "finance-team"
- }
- }
- ]
- }
- },
- "params": {
- "name": "saml-finance"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 903
- },
- "digest": "49cb3f48a0097bfc597c52fa51c6d379",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/saml-service-role\n{\n \"cluster\" : [\"manage_saml\", \"manage_token\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/saml-service-role",
- "query": null,
- "body": {
- "cluster": [
- "manage_saml",
- "manage_token"
- ]
- },
- "params": {
- "name": "saml-service-role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 911
- },
- "digest": "b2b26f8568c5dba7649e79f09b859272",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/saml-service-user\n{\n \"password\" : \"\",\n \"roles\" : [\"saml-service-role\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/saml-service-user",
- "query": null,
- "body": {
- "password": "",
- "roles": [
- "saml-service-role"
- ]
- },
- "params": {
- "username": "saml-service-user"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 931
- },
- "digest": "a5dfcfd1cfb3558e7912456669c92eee",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/prepare\n{\n \"realm\" : \"saml1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 954
- },
- "digest": "8e208098a0156c4c92afe0a06960b230",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/authenticate\n{\n \"content\" : \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" : [\"4fee3b046395c4e751011e97f8900b5273d56685\"]\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 983
- },
- "digest": "9eda9c39428b0c2c53cbd8ee7ae0f888",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/authenticate\n{\n \"content\" : \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" : []\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 998
- },
- "digest": "553904c175a76d5ba83bc5d46fff7373",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/logout\n{\n \"token\" : \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\": \"mJdXLtmvTUSpoLwMvdBt_w\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 1016
- },
- "digest": "a71154ea11a5214f409ecfd118e9b5e3",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/invalidate\n{\n \"query\" : \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\" : \"saml1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 427
- },
- "digest": "10de9fd4a38755020a07c4ec964d44c9",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/oidc-example\n{\n \"roles\": [ \"example_role\" ], <1>\n \"enabled\": true,\n \"rules\": {\n \"field\": { \"realm.name\": \"oidc1\" }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/oidc-example",
- "query": null,
- "body": {
- "roles": [
- "example_role"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "realm.name": "oidc1"
- }
- }
- },
- "params": {
- "name": "oidc-example"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 466
- },
- "digest": "f3ab820e1f2f54ea718017aeae865742",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/oidc-finance\n{\n \"roles\": [ \"finance_data\" ],\n \"enabled\": true,\n \"rules\": { \"all\": [\n { \"field\": { \"realm.name\": \"oidc1\" } },\n { \"field\": { \"groups\": \"finance-team\" } }\n ] }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/oidc-finance",
- "query": null,
- "body": {
- "roles": [
- "finance_data"
- ],
- "enabled": true,
- "rules": {
- "all": [
- {
- "field": {
- "realm.name": "oidc1"
- }
- },
- {
- "field": {
- "groups": "finance-team"
- }
- }
- ]
- }
- },
- "params": {
- "name": "oidc-finance"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 604
- },
- "digest": "a325f31e94fb1e8739258910593504a8",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/facilitator-role\n{\n \"cluster\" : [\"manage_oidc\", \"manage_token\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/facilitator-role",
- "query": null,
- "body": {
- "cluster": [
- "manage_oidc",
- "manage_token"
- ]
- },
- "params": {
- "name": "facilitator-role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 613
- },
- "digest": "53e4ac5a4009fd21024f4b31e54aa83f",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/facilitator\n{\n \"password\" : \"\",\n \"roles\" : [ \"facilitator-role\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/facilitator",
- "query": null,
- "body": {
- "password": "",
- "roles": [
- "facilitator-role"
- ]
- },
- "params": {
- "username": "facilitator"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 633
- },
- "digest": "e3019fd5f23458ae49ad9854c97d321c",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/prepare\n{\n \"realm\" : \"oidc1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 656
- },
- "digest": "9e5d5a6c9adcba75b906e81c1496bd01",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/authenticate\n{\n \"redirect_uri\" : \"https://oidc-kibana.elastic.co:5603/api/security/v1/oidc?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" : \"oidc1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 674
- },
- "digest": "2a1eece9a59ac1773edcf0a932c26de0",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/logout\n{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/managing-roles.asciidoc",
- "line": 158
- },
- "digest": "d3e5edac5b461020017fd9d8ec7a91fa",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/clicks_admin\n{\n \"run_as\": [ \"clicks_watcher_1\" ],\n \"cluster\": [ \"monitor\" ],\n \"indices\": [\n {\n \"names\": [ \"events-*\" ],\n \"privileges\": [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"category\", \"@timestamp\", \"message\" ]\n },\n \"query\": \"{\\\"match\\\": {\\\"category\\\": \\\"click\\\"}}\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/clicks_admin",
- "query": null,
- "body": {
- "run_as": [
- "clicks_watcher_1"
- ],
- "cluster": [
- "monitor"
- ],
- "indices": [
- {
- "names": [
- "events-*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "category",
- "@timestamp",
- "message"
- ]
- },
- "query": "{\"match\": {\"category\": \"click\"}}"
- }
- ]
- },
- "params": {
- "name": "clicks_admin"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/document-level-security.asciidoc",
- "line": 18
- },
- "digest": "6365312d470426cab1b77e9ffde49170",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/click_role\n{\n \"indices\": [\n {\n \"names\": [ \"events-*\" ],\n \"privileges\": [ \"read\" ],\n \"query\": \"{\\\"match\\\": {\\\"category\\\": \\\"click\\\"}}\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/click_role",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "events-*"
- ],
- "privileges": [
- "read"
- ],
- "query": "{\"match\": {\"category\": \"click\"}}"
- }
- ]
- },
- "params": {
- "name": "click_role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/document-level-security.asciidoc",
- "line": 41
- },
- "digest": "c79e8ee86b332302b25c5c1f5f4f89d7",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/dept_role\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"query\" : {\n \"term\" : { \"department_id\" : 12 }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/dept_role",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "query": {
- "term": {
- "department_id": 12
- }
- }
- }
- ]
- },
- "params": {
- "name": "dept_role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 18
- },
- "digest": "976e5f9baf81bd6ca0e9f80916a0a4f9",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role1\n{\n \"indices\": [\n {\n \"names\": [ \"events-*\" ],\n \"privileges\": [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"category\", \"@timestamp\", \"message\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role1",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "events-*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "category",
- "@timestamp",
- "message"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role1"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 43
- },
- "digest": "7c9076f3e93a8f61189783c736bf6082",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role2\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"event_*\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role2",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "event_*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role2"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 77
- },
- "digest": "d7d92816cac64b7c70d72b0000eeeeea",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role3\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"customer.handle\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role3",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "customer.handle"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role3"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 96
- },
- "digest": "bb28d1f7f3f09f5061d7f4351aee89fc",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role4\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"customer.*\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role4",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "customer.*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role4"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 114
- },
- "digest": "7a987cd13383bdc990155d7bd5fb221e",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role5\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"*\"],\n \"except\": [ \"customer.handle\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role5",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "*"
- ],
- "except": [
- "customer.handle"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role5"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 142
- },
- "digest": "962e6187bbd71c5749376efed04b65ba",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role6\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"except\": [ \"customer.handle\" ],\n \"grant\" : [ \"customer.*\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role6",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "except": [
- "customer.handle"
- ],
- "grant": [
- "customer.*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role6"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 169
- },
- "digest": "a1acf454bd6477183ce27ace872deb46",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role7\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\": [ \"a.*\" ],\n \"except\" : [ \"a.b*\" ]\n }\n }\n ]\n}\n\nPOST /_security/role/test_role8\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\": [ \"a.b*\" ],\n \"except\" : [ \"a.b.c*\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role7",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "a.*"
- ],
- "except": [
- "a.b*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role7"
- },
- "api": "security.put_role"
- },
- {
- "method": "POST",
- "url": "/_security/role/test_role8",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "a.b*"
- ],
- "except": [
- "a.b.c*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role8"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/alias-privileges.asciidoc",
- "line": 30
- },
- "digest": "195fe9fadf952ddd7a69c8aaf98d47a1",
- "lang": "console",
- "found": [],
- "source": "GET /current_year/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/current_year/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "current_year",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/alias-privileges.asciidoc",
- "line": 56
- },
- "digest": "c4d60fd70ef1be46616a0d4e7578d8b9",
- "lang": "console",
- "found": [],
- "source": "PUT /2015\n{\n \"aliases\" : {\n \"current_year\" : {}\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/2015",
- "query": null,
- "body": {
- "aliases": {
- "current_year": {}
- }
- },
- "params": {
- "index": "2015"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/alias-privileges.asciidoc",
- "line": 68
- },
- "digest": "06f6cb6e20d2faf6599cfe1f39c6c56b",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"2015\", \"alias\" : \"current_year\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "2015",
- "alias": "current_year"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/mapping-roles.asciidoc",
- "line": 119
- },
- "digest": "f2359acfb6eaa919125463cc1d3a7cd1",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/admins\n{\n \"roles\" : [ \"monitoring\", \"user\" ],\n \"rules\" : { \"field\" : { \"groups\" : \"cn=admins,dc=example,dc=com\" } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/admins",
- "query": null,
- "body": {
- "roles": [
- "monitoring",
- "user"
- ],
- "rules": {
- "field": {
- "groups": "cn=admins,dc=example,dc=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "admins"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/mapping-roles.asciidoc",
- "line": 129
- },
- "digest": "3ea33023474e77d73ac0540e3a02b0b2",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/basic_users\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"any\" : [\n { \"field\" : { \"dn\" : \"cn=John Doe,cn=contractors,dc=example,dc=com\" } },\n { \"field\" : { \"groups\" : \"cn=users,dc=example,dc=com\" } }\n ] },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/basic_users",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "any": [
- {
- "field": {
- "dn": "cn=John Doe,cn=contractors,dc=example,dc=com"
- }
- },
- {
- "field": {
- "groups": "cn=users,dc=example,dc=com"
- }
- }
- ]
- },
- "enabled": true
- },
- "params": {
- "name": "basic_users"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/mapping-roles.asciidoc",
- "line": 161
- },
- "digest": "81ee2ad368208c4c78098292547b0577",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/admin_user\n{\n \"roles\" : [ \"monitoring\" ],\n \"rules\" : { \"field\" : { \"dn\" : \"cn=Admin,ou=example,o=com\" } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/admin_user",
- "query": null,
- "body": {
- "roles": [
- "monitoring"
- ],
- "rules": {
- "field": {
- "dn": "cn=Admin,ou=example,o=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "admin_user"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/mapping-roles.asciidoc",
- "line": 171
- },
- "digest": "87846c3ddacab1da4af626ae8099e4be",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/basic_user\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"field\" : { \"dn\" : \"cn=John Doe,ou=example,o=com\" } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/basic_user",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "field": {
- "dn": "cn=John Doe,ou=example,o=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "basic_user"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/role-templates.asciidoc",
- "line": 16
- },
- "digest": "fa154ca3d40df55e3f40d6636fe805de",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/example1\n{\n \"indices\" : [\n {\n \"names\" : [ \"my_index\" ],\n \"privileges\" : [ \"read\" ],\n \"query\" : {\n \"template\" : {\n \"source\" : {\n \"term\" : { \"acl.username\" : \"{{_user.username}}\" }\n }\n }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/example1",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "my_index"
- ],
- "privileges": [
- "read"
- ],
- "query": {
- "template": {
- "source": {
- "term": {
- "acl.username": "{{_user.username}}"
- }
- }
- }
- }
- }
- ]
- },
- "params": {
- "name": "example1"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/role-templates.asciidoc",
- "line": 52
- },
- "digest": "91b0ce11b58f1d3d8bdfe11d38b820fa",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/example2\n{\n \"indices\" : [\n {\n \"names\" : [ \"my_index\" ],\n \"privileges\" : [ \"read\" ],\n \"query\" : {\n \"template\" : {\n \"source\" : {\n \"term\" : { \"group.id\" : \"{{_user.metadata.group_id}}\" }\n }\n }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/example2",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "my_index"
- ],
- "privileges": [
- "read"
- ],
- "query": {
- "template": {
- "source": {
- "term": {
- "group.id": "{{_user.metadata.group_id}}"
- }
- }
- }
- }
- }
- ]
- },
- "params": {
- "name": "example2"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/auditing/output-logfile.asciidoc",
- "line": 27
- },
- "digest": "a465177ff9450120097e7f6cf13dbc33",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\": {\n \"logger.org.elasticsearch.xpack.security.audit.logfile.DeprecatedLoggingAuditTrail\": \"off\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "logger.org.elasticsearch.xpack.security.audit.logfile.DeprecatedLoggingAuditTrail": "off"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/using-ip-filtering.asciidoc",
- "line": 118
- },
- "digest": "d453198d420e84e4200f8f4f0ed6b83c",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\" : {\n \"xpack.security.transport.filter.allow\" : \"172.16.0.0/24\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.security.transport.filter.allow": "172.16.0.0/24"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/using-ip-filtering.asciidoc",
- "line": 130
- },
- "digest": "da9ffa564574978ea2b1e2bdb36bfd93",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\" : {\n \"xpack.security.transport.filter.enabled\" : false\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.security.transport.filter.enabled": false
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 54
- },
- "digest": "b13d05599a1c186137f81cad94f3fcc1",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"one\": {\n \"seeds\": [ \"10.0.1.1:9300\" ]\n },\n \"two\": {\n \"seeds\": [ \"10.0.2.1:9300\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "one": {
- "seeds": [
- "10.0.1.1:9300"
- ]
- },
- "two": {
- "seeds": [
- "10.0.2.1:9300"
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 85
- },
- "digest": "b06c2363c9071d9d5027a8562dd1b7ab",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.remote.two.seeds\": [ \"10.0.2.1:9300\" ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.remote.two.seeds": [
- "10.0.2.1:9300"
- ]
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 100
- },
- "digest": "f479f0f364da5ddd096eac93bb4dd207",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/cluster_two_logs\n{\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/cluster_two_logs",
- "query": null,
- "body": {},
- "params": {
- "name": "cluster_two_logs"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 110
- },
- "digest": "743c2583a226963fec7bd6a29e40205f",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/cluster_two_logs\n{\n \"cluster\": [],\n \"indices\": [\n {\n \"names\": [\n \"logs-*\"\n ],\n \"privileges\": [\n \"read\",\n \"read_cross_cluster\"\n ]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/cluster_two_logs",
- "query": null,
- "body": {
- "cluster": [],
- "indices": [
- {
- "names": [
- "logs-*"
- ],
- "privileges": [
- "read",
- "read_cross_cluster"
- ]
- }
- ]
- },
- "params": {
- "name": "cluster_two_logs"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 131
- },
- "digest": "b6f04e699bbf90f233bb0253f6844958",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/alice\n{\n \"password\" : \"somepassword\",\n \"roles\" : [ \"cluster_two_logs\" ],\n \"full_name\" : \"Alice\",\n \"email\" : \"alice@example.com\",\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/alice",
- "query": null,
- "body": {
- "password": "somepassword",
- "roles": [
- "cluster_two_logs"
- ],
- "full_name": "Alice",
- "email": "alice@example.com",
- "enabled": true
- },
- "params": {
- "username": "alice"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 146
- },
- "digest": "efe3cb41fcafd981b8fb51fc7337d1d0",
- "lang": "console",
- "found": [],
- "source": "GET two:logs-2017.04/_search\n{\n \"query\": {\n \"match_all\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/two:logs-2017.04/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- }
- },
- "params": {
- "index": "two:logs-2017.04"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/securing-communications/tutorial-tls-addnodes.asciidoc",
- "line": 156
- },
- "digest": "b02e4907c9936c1adc16ccce9d49900d",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/health",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/securing-communications/tutorial-tls-addnodes.asciidoc",
- "line": 166
- },
- "digest": "9296d687ad779f8c57896edff2791c0d",
- "lang": "console",
- "found": [],
- "source": "GET _cat/nodes?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 32
- },
- "digest": "a45eb0cdd138d9c894ca2de9352549a1",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_error_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" } <1>\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_error_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "id": "log_error_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 66
- },
- "digest": "69d9b8fd364596aa37eae6864d8a6d89",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search?pretty\n{\n \"sort\" : [\n { \"result.execution_time\" : \"desc\" }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "sort": [
- {
- "result.execution_time": "desc"
- }
- ]
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 89
- },
- "digest": "c42ee13e461422d242c94332d3c38f87",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_error_watch\n{\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" }},\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total.value\" : { \"gt\" : 0 }} <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_error_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total.value": {
- "gt": 0
- }
- }
- }
- },
- "params": {
- "id": "log_error_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 119
- },
- "digest": "1414d40bb1e9d7644b72245bbb5ec834",
- "lang": "console",
- "found": [],
- "source": "POST logs/_doc\n{\n \"timestamp\" : \"2015-05-17T18:12:07.613Z\",\n \"request\" : \"GET index.html\",\n \"status_code\" : 404,\n \"message\" : \"Error: File not found\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs/_doc",
- "query": null,
- "body": {
- "timestamp": "2015-05-17T18:12:07.613Z",
- "request": "GET index.html",
- "status_code": 404,
- "message": "Error: File not found"
- },
- "params": {
- "index": "logs"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 136
- },
- "digest": "9aa2327ae315c39f2bce2bd22e0deb1b",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search?pretty\n{\n \"query\" : {\n \"bool\" : {\n \"must\" : [\n { \"match\" : { \"result.condition.met\" : true }},\n { \"range\" : { \"result.execution_time\" : { \"from\" : \"now-10s\" }}}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "result.condition.met": true
- }
- },
- {
- "range": {
- "result.execution_time": {
- "from": "now-10s"
- }
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 166
- },
- "digest": "6a832c7eb7db40b21ab9848d3af19536",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_error_watch\n{\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" }},\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total.value\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total.value}} errors in the logs\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_error_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total.value": {
- "gt": 0
- }
- }
- },
- "actions": {
- "log_error": {
- "logging": {
- "text": "Found {{ctx.payload.hits.total.value}} errors in the logs"
- }
- }
- }
- },
- "params": {
- "id": "log_error_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 207
- },
- "digest": "67a490d749a0c3bb16a266663423893d",
- "lang": "console",
- "found": [],
- "source": "DELETE _watcher/watch/log_error_watch",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_watcher/watch/log_error_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "log_error_watch"
- },
- "api": "watcher.delete_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/how-watcher-works.asciidoc",
- "line": 51
- },
- "digest": "b40ea21b877503cc392b5f17e4730814",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_errors\n{\n \"metadata\" : { <1>\n \"color\" : \"red\"\n },\n \"trigger\" : { <2>\n \"schedule\" : {\n \"interval\" : \"5m\"\n }\n },\n \"input\" : { <3>\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"size\" : 0,\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : { <4>\n \"compare\" : { \"ctx.payload.hits.total.value\" : { \"gt\" : 5 }}\n },\n \"transform\" : { <5>\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"actions\" : { <6>\n \"my_webhook\" : {\n \"webhook\" : {\n \"method\" : \"POST\",\n \"host\" : \"mylisteninghost\",\n \"port\" : 9200,\n \"path\" : \"/{{watch_id}}\",\n \"body\" : \"Encountered {{ctx.payload.hits.total.value}} errors\"\n }\n },\n \"email_administrator\" : {\n \"email\" : {\n \"to\" : \"sys.admino@host.domain\",\n \"subject\" : \"Encountered {{ctx.payload.hits.total.value}} errors\",\n \"body\" : \"Too many error in the system, see attached data\",\n \"attachments\" : {\n \"attached_data\" : {\n \"data\" : {\n \"format\" : \"json\"\n }\n }\n },\n \"priority\" : \"high\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_errors",
- "query": null,
- "body": {
- "metadata": {
- "color": "red"
- },
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "size": 0,
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total.value": {
- "gt": 5
- }
- }
- },
- "transform": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "actions": {
- "my_webhook": {
- "webhook": {
- "method": "POST",
- "host": "mylisteninghost",
- "port": 9200,
- "path": "/{{watch_id}}",
- "body": "Encountered {{ctx.payload.hits.total.value}} errors"
- }
- },
- "email_administrator": {
- "email": {
- "to": "sys.admino@host.domain",
- "subject": "Encountered {{ctx.payload.hits.total.value}} errors",
- "body": "Too many error in the system, see attached data",
- "attachments": {
- "attached_data": {
- "data": {
- "format": "json"
- }
- }
- },
- "priority": "high"
- }
- }
- }
- },
- "params": {
- "id": "log_errors"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/how-watcher-works.asciidoc",
- "line": 157
- },
- "digest": "1d918e206ad8dab916e59183da24d9ec",
- "lang": "console",
- "found": [],
- "source": "PUT .watches/_settings\n{\n \"index.routing.allocation.include.role\": \"watcher\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/.watches/_settings",
- "query": null,
- "body": {
- "index.routing.allocation.include.role": "watcher"
- },
- "params": {
- "index": ".watches"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 49
- },
- "digest": "85d2e33791f1a74a69dfb04a60e69306",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/error_logs_alert\n{\n \"metadata\" : {\n \"color\" : \"red\"\n },\n \"trigger\" : {\n \"schedule\" : {\n \"interval\" : \"5m\"\n }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"size\" : 0,\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 5 }}\n },\n \"actions\" : {\n \"email_administrator\" : {\n \"throttle_period\": \"15m\", <1>\n \"email\" : { <2>\n \"to\" : \"sys.admino@host.domain\",\n \"subject\" : \"Encountered {{ctx.payload.hits.total}} errors\",\n \"body\" : \"Too many error in the system, see attached data\",\n \"attachments\" : {\n \"attached_data\" : {\n \"data\" : {\n \"format\" : \"json\"\n }\n }\n },\n \"priority\" : \"high\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/error_logs_alert",
- "query": null,
- "body": {
- "metadata": {
- "color": "red"
- },
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "size": 0,
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 5
- }
- }
- },
- "actions": {
- "email_administrator": {
- "throttle_period": "15m",
- "email": {
- "to": "sys.admino@host.domain",
- "subject": "Encountered {{ctx.payload.hits.total}} errors",
- "body": "Too many error in the system, see attached data",
- "attachments": {
- "attached_data": {
- "data": {
- "format": "json"
- }
- }
- },
- "priority": "high"
- }
- }
- }
- },
- "params": {
- "id": "error_logs_alert"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 104
- },
- "digest": "406a0f1c1aac947bcee58f86b6d036c1",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_event_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"5m\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"size\" : 0,\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 5 }}\n },\n \"throttle_period\" : \"15m\", <1>\n \"actions\" : {\n \"email_administrator\" : {\n \"email\" : {\n \"to\" : \"sys.admino@host.domain\",\n \"subject\" : \"Encountered {{ctx.payload.hits.total}} errors\",\n \"body\" : \"Too many error in the system, see attached data\",\n \"attachments\" : {\n \"attached_data\" : {\n \"data\" : {\n \"format\" : \"json\"\n }\n }\n },\n \"priority\" : \"high\"\n }\n },\n \"notify_pager\" : {\n \"webhook\" : {\n \"method\" : \"POST\",\n \"host\" : \"pager.service.domain\",\n \"port\" : 1234,\n \"path\" : \"/{{watch_id}}\",\n \"body\" : \"Encountered {{ctx.payload.hits.total}} errors\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_event_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "size": 0,
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 5
- }
- }
- },
- "throttle_period": "15m",
- "actions": {
- "email_administrator": {
- "email": {
- "to": "sys.admino@host.domain",
- "subject": "Encountered {{ctx.payload.hits.total}} errors",
- "body": "Too many error in the system, see attached data",
- "attachments": {
- "attached_data": {
- "data": {
- "format": "json"
- }
- }
- },
- "priority": "high"
- }
- },
- "notify_pager": {
- "webhook": {
- "method": "POST",
- "host": "pager.service.domain",
- "port": 1234,
- "path": "/{{watch_id}}",
- "body": "Encountered {{ctx.payload.hits.total}} errors"
- }
- }
- }
- },
- "params": {
- "id": "log_event_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 178
- },
- "digest": "3d48d1ba49f680aac32177d653944623",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch//_ack/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 205
- },
- "digest": "9eef31d85ebaf6c27054d7375715dbe0",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_event_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"5m\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 } }\n },\n \"actions\" : {\n \"log_hits\" : {\n \"foreach\" : \"ctx.payload.hits.hits\", <1>\n \"max_iterations\" : 500,\n \"logging\" : {\n \"text\" : \"Found id {{ctx.payload._id}} with field {{ctx.payload._source.my_field}}\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_event_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "log_hits": {
- "foreach": "ctx.payload.hits.hits",
- "max_iterations": 500,
- "logging": {
- "text": "Found id {{ctx.payload._id}} with field {{ctx.payload._source.my_field}}"
- }
- }
- }
- },
- "params": {
- "id": "log_event_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 250
- },
- "digest": "f67d8aab9106ad24b1d2c771d3840ed1",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_event_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"5m\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"size\" : 0,\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 } }\n },\n \"actions\" : {\n \"email_administrator\" : {\n \"email\" : {\n \"to\" : \"sys.admino@host.domain\",\n \"subject\" : \"Encountered {{ctx.payload.hits.total}} errors\",\n \"body\" : \"Too many error in the system, see attached data\",\n \"attachments\" : {\n \"attached_data\" : {\n \"data\" : {\n \"format\" : \"json\"\n }\n }\n },\n \"priority\" : \"high\"\n }\n },\n \"notify_pager\" : {\n \"condition\": { <1>\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 5 } }\n },\n \"webhook\" : {\n \"method\" : \"POST\",\n \"host\" : \"pager.service.domain\",\n \"port\" : 1234,\n \"path\" : \"/{{watch_id}}\",\n \"body\" : \"Encountered {{ctx.payload.hits.total}} errors\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_event_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "size": 0,
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "email_administrator": {
- "email": {
- "to": "sys.admino@host.domain",
- "subject": "Encountered {{ctx.payload.hits.total}} errors",
- "body": "Too many error in the system, see attached data",
- "attachments": {
- "attached_data": {
- "data": {
- "format": "json"
- }
- }
- },
- "priority": "high"
- }
- },
- "notify_pager": {
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 5
- }
- }
- },
- "webhook": {
- "method": "POST",
- "host": "pager.service.domain",
- "port": 1234,
- "path": "/{{watch_id}}",
- "body": "Encountered {{ctx.payload.hits.total}} errors"
- }
- }
- }
- },
- "params": {
- "id": "log_event_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/managing-watches.asciidoc",
- "line": 30
- },
- "digest": "92a03184d36ce0367676952f8310771c",
- "lang": "console",
- "found": [],
- "source": "GET .watches/_search\n{\n \"size\" : 100\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watches/_search",
- "query": null,
- "body": {
- "size": 100
- },
- "params": {
- "index": ".watches"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 27
- },
- "digest": "dd0b196a099e1cca08c5ce4dd74e935a",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" } <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 45
- },
- "digest": "1e9cab0b2727624e22e8cf4e7ca498ac",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/health?pretty",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": {
- "pretty": true
- },
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 54
- },
- "digest": "221e9b14567f950008459af77757750e",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" }\n },\n \"input\" : {\n \"http\" : {\n \"request\" : {\n \"host\" : \"localhost\",\n \"port\" : 9200,\n \"path\" : \"/_cluster/health\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "http": {
- "request": {
- "host": "localhost",
- "port": 9200,
- "path": "/_cluster/health"
- }
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 76
- },
- "digest": "239f615e0009c5cb1dc4e82ec4c0dab5",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" }\n },\n \"input\" : {\n \"http\" : {\n \"request\" : {\n \"host\" : \"localhost\",\n \"port\" : 9200,\n \"path\" : \"/_cluster/health\",\n \"auth\": {\n \"basic\": {\n \"username\": \"elastic\",\n \"password\": \"x-pack-test-password\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "http": {
- "request": {
- "host": "localhost",
- "port": 9200,
- "path": "/_cluster/health",
- "auth": {
- "basic": {
- "username": "elastic",
- "password": "x-pack-test-password"
- }
- }
- }
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 115
- },
- "digest": "dfb20907cfc5ac520ea3b1dba5f00811",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search\n{\n \"sort\" : [\n { \"result.execution_time\" : \"desc\" }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "result.execution_time": "desc"
- }
- ]
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 137
- },
- "digest": "90f1f5304922fb6d097846dd1444c075",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" } <1>\n },\n \"input\" : {\n \"http\" : {\n \"request\" : {\n \"host\" : \"localhost\",\n \"port\" : 9200,\n \"path\" : \"/_cluster/health\"\n }\n }\n },\n \"condition\" : {\n \"compare\" : {\n \"ctx.payload.status\" : { \"eq\" : \"red\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "http": {
- "request": {
- "host": "localhost",
- "port": 9200,
- "path": "/_cluster/health"
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.status": {
- "eq": "red"
- }
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 169
- },
- "digest": "95c03bdef4faf6bef039c986f4cb3aba",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search?pretty\n{\n \"query\" : {\n \"match\" : { \"result.condition.met\" : true }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "match": {
- "result.condition.met": true
- }
- }
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 193
- },
- "digest": "007179b5e241da650562a5f0a5007823",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" }\n },\n \"input\" : {\n \"http\" : {\n \"request\" : {\n \"host\" : \"localhost\",\n \"port\" : 9200,\n \"path\" : \"/_cluster/health\"\n }\n }\n },\n \"condition\" : {\n \"compare\" : {\n \"ctx.payload.status\" : { \"eq\" : \"red\" }\n }\n },\n \"actions\" : {\n \"send_email\" : {\n \"email\" : {\n \"to\" : \"username@example.org\",\n \"subject\" : \"Cluster Status Warning\",\n \"body\" : \"Cluster status is RED\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "http": {
- "request": {
- "host": "localhost",
- "port": 9200,
- "path": "/_cluster/health"
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.status": {
- "eq": "red"
- }
- }
- },
- "actions": {
- "send_email": {
- "email": {
- "to": "username@example.org",
- "subject": "Cluster Status Warning",
- "body": "Cluster status is RED"
- }
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 259
- },
- "digest": "95c03bdef4faf6bef039c986f4cb3aba",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search?pretty\n{\n \"query\" : {\n \"match\" : { \"result.condition.met\" : true }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "match": {
- "result.condition.met": true
- }
- }
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 280
- },
- "digest": "60b0fc1b6ae418621ff1b31591fa1fce",
- "lang": "console",
- "found": [],
- "source": "DELETE _watcher/watch/cluster_health_watch",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.delete_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-meetupdata.asciidoc",
- "line": 198
- },
- "digest": "4912f2140d10dbf15596c60319835e36",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/meetup\n{\n \"trigger\": {\n \"schedule\": {\n \"interval\": \"1h\"\n }\n },\n \"input\": {\n \"search\": {\n \"request\": {\n \"indices\": [\n \"\",\n \"\"\n ],\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-3h\"\n }\n }\n },\n {\n \"match\": {\n \"group.group_topics.topic_name\": \"Open Source\"\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"group_by_city\": {\n \"terms\": {\n \"field\": \"group.group_city.raw\",\n \"size\": 5\n },\n \"aggs\": {\n \"group_by_event\": {\n \"terms\": {\n \"field\": \"event.event_url.raw\",\n \"size\": 5\n },\n \"aggs\": {\n \"get_latest\": {\n \"terms\": {\n \"field\": \"@timestamp\",\n \"size\": 1,\n \"order\": {\n \"_key\": \"desc\"\n }\n },\n \"aggs\": {\n \"group_by_event_name\": {\n \"terms\": {\n \"field\": \"event.event_name.raw\"\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\": {\n \"compare\": {\n \"ctx.payload.hits.total.value\": {\n \"gt\": 0\n }\n }\n },\n \"actions\": { <1>\n \"email_me\": {\n \"throttle_period\": \"10m\",\n \"email\": {\n \"from\": \"username@example.org\", <2>\n \"to\": \"recipient@example.org\", <3>\n \"subject\": \"Open Source events\",\n \"body\": {\n \"html\": \"Found events matching Open Source: {{#ctx.payload.aggregations.group_by_city.buckets}}- {{key}} ({{doc_count}})
{{/ctx.payload.aggregations.group_by_city.buckets}}
\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/meetup",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "1h"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "",
- ""
- ],
- "body": {
- "size": 0,
- "query": {
- "bool": {
- "filter": [
- {
- "range": {
- "@timestamp": {
- "gte": "now-3h"
- }
- }
- },
- {
- "match": {
- "group.group_topics.topic_name": "Open Source"
- }
- }
- ]
- }
- },
- "aggs": {
- "group_by_city": {
- "terms": {
- "field": "group.group_city.raw",
- "size": 5
- },
- "aggs": {
- "group_by_event": {
- "terms": {
- "field": "event.event_url.raw",
- "size": 5
- },
- "aggs": {
- "get_latest": {
- "terms": {
- "field": "@timestamp",
- "size": 1,
- "order": {
- "_key": "desc"
- }
- },
- "aggs": {
- "group_by_event_name": {
- "terms": {
- "field": "event.event_name.raw"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total.value": {
- "gt": 0
- }
- }
- },
- "actions": {
- "email_me": {
- "throttle_period": "10m",
- "email": {
- "from": "username@example.org",
- "to": "recipient@example.org",
- "subject": "Open Source events",
- "body": {
- "html": "Found events matching Open Source: {{#ctx.payload.aggregations.group_by_city.buckets}}- {{key}} ({{doc_count}})
{{/ctx.payload.aggregations.group_by_city.buckets}}
"
- }
- }
- }
- }
- },
- "params": {
- "id": "meetup"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-meetupdata.asciidoc",
- "line": 303
- },
- "digest": "4be6ee22c2cddc72c21a76cda23705ed",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/meetup/_execute",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/meetup/_execute",
- "query": null,
- "body": null,
- "params": {
- "id": "meetup"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/troubleshooting.asciidoc",
- "line": 18
- },
- "digest": "2856a5ceff1861aa9a78099f1c517fe7",
- "lang": "console",
- "found": [],
- "source": "GET .watches/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watches/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": ".watches"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/troubleshooting.asciidoc",
- "line": 33
- },
- "digest": "e905543b281e9c41395304da76ed2ea3",
- "lang": "console",
- "found": [],
- "source": "DELETE .watches",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/.watches",
- "query": null,
- "body": null,
- "params": {
- "index": ".watches"
- },
- "api": "indices.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 11
- },
- "digest": "397bdb40d0146102f1f4c6a35675e16a",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"english_exact\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\"\n ]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"body\": {\n \"type\": \"text\",\n \"analyzer\": \"english\",\n \"fields\": {\n \"exact\": {\n \"type\": \"text\",\n \"analyzer\": \"english_exact\"\n }\n }\n }\n }\n }\n}\n\nPUT index/_doc/1\n{\n \"body\": \"Ski resort\"\n}\n\nPUT index/_doc/2\n{\n \"body\": \"A pair of skis\"\n}\n\nPOST index/_refresh",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "english_exact": {
- "tokenizer": "standard",
- "filter": [
- "lowercase"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "body": {
- "type": "text",
- "analyzer": "english",
- "fields": {
- "exact": {
- "type": "text",
- "analyzer": "english_exact"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "body": "Ski resort"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/2",
- "query": null,
- "body": {
- "body": "A pair of skis"
- },
- "params": {
- "index": "index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 58
- },
- "digest": "bf2e6ea2bae621b9b2fee7003e891f86",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"simple_query_string\": {\n \"fields\": [ \"body\" ],\n \"query\": \"ski\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "fields": [
- "body"
- ],
- "query": "ski"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 72
- },
- "digest": "bb388254a1591e1f5be7982af19c3729",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 2,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 2,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.18232156,\n \"hits\": [\n {\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 0.18232156,\n \"_source\": {\n \"body\": \"Ski resort\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"2\",\n \"_score\": 0.18232156,\n \"_source\": {\n \"body\": \"A pair of skis\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 116
- },
- "digest": "3f94ed945ae6416a0eb372c2db14d7e0",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"simple_query_string\": {\n \"fields\": [ \"body.exact\" ],\n \"query\": \"ski\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "fields": [
- "body.exact"
- ],
- "query": "ski"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 130
- },
- "digest": "9fa3ddfa07814f82845343e677bd441b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 1,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.8025915,\n \"hits\": [\n {\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 0.8025915,\n \"_source\": {\n \"body\": \"Ski resort\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 173
- },
- "digest": "26abfc49c238c2b5d259983ac38dbcee",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"simple_query_string\": {\n \"fields\": [ \"body\" ],\n \"quote_field_suffix\": \".exact\",\n \"query\": \"\\\"ski\\\"\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "fields": [
- "body"
- ],
- "quote_field_suffix": ".exact",
- "query": "\"ski\""
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 188
- },
- "digest": "192ff39ffdc681f9b2359563c3c6c113",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 2,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.8025915,\n \"hits\": [\n {\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 0.8025915,\n \"_source\": {\n \"body\": \"Ski resort\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "how-to/recipes/scoring.asciidoc",
- "line": 123
- },
- "digest": "a0f15dd7fcb07bc8543fe04c2907d4b9",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\" : {\n \"script_score\" : {\n \"query\" : {\n \"match\": { \"body\": \"elasticsearch\" }\n },\n \"script\" : {\n \"source\" : \"_score * saturation(doc['pagerank'].value, 10)\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "match": {
- "body": "elasticsearch"
- }
- },
- "script": {
- "source": "_score * saturation(doc['pagerank'].value, 10)"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/scoring.asciidoc",
- "line": 168
- },
- "digest": "0dfa66a019712e413652c5eddd057ba8",
- "lang": "console",
- "found": [],
- "source": "GET _search\n{\n \"query\" : {\n \"bool\" : {\n \"must\": {\n \"match\": { \"body\": \"elasticsearch\" }\n },\n \"should\": {\n \"rank_feature\": {\n \"field\": \"pagerank\", <1>\n \"saturation\": {\n \"pivot\": 10\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "body": "elasticsearch"
- }
- },
- "should": {
- "rank_feature": {
- "field": "pagerank",
- "saturation": {
- "pivot": 10
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 52
- },
- "digest": "12facf3617a41551ce2f0c4d005cb1c7",
- "lang": "console",
- "found": [],
- "source": "PUT movies\n{\n \"mappings\": {\n \"properties\": {\n \"name_and_plot\": {\n \"type\": \"text\"\n },\n \"name\": {\n \"type\": \"text\",\n \"copy_to\": \"name_and_plot\"\n },\n \"plot\": {\n \"type\": \"text\",\n \"copy_to\": \"name_and_plot\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/movies",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name_and_plot": {
- "type": "text"
- },
- "name": {
- "type": "text",
- "copy_to": "name_and_plot"
- },
- "plot": {
- "type": "text",
- "copy_to": "name_and_plot"
- }
- }
- }
- },
- "params": {
- "index": "movies"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 86
- },
- "digest": "a008f42379930edc354b4074e0a33344",
- "lang": "console",
- "found": [],
- "source": "PUT index/_doc/1\n{\n \"designation\": \"spoon\",\n \"price\": 13\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "designation": "spoon",
- "price": 13
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 97
- },
- "digest": "a0a7557bb7e2aff7918557cd648f41af",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"aggs\": {\n \"price_ranges\": {\n \"range\": {\n \"field\": \"price\",\n \"ranges\": [\n { \"to\": 10 },\n { \"from\": 10, \"to\": 100 },\n { \"from\": 100 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "ranges": [
- {
- "to": 10
- },
- {
- "from": 10,
- "to": 100
- },
- {
- "from": 100
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 120
- },
- "digest": "a4bae4d956bc0a663f42cfec36bf8e0b",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"price_range\": {\n \"type\": \"keyword\"\n }\n }\n }\n}\n\nPUT index/_doc/1\n{\n \"designation\": \"spoon\",\n \"price\": 13,\n \"price_range\": \"10-100\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "price_range": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "designation": "spoon",
- "price": 13,
- "price_range": "10-100"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 144
- },
- "digest": "7dedb148ff74912de81b8f8275f0d7f3",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"aggs\": {\n \"price_ranges\": {\n \"terms\": {\n \"field\": \"price_range\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "terms": {
- "field": "price_range"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 181
- },
- "digest": "102c7de25d13c87cf28839ada9f63c95",
- "lang": "console",
- "found": [],
- "source": "PUT index/_doc/1\n{\n \"my_date\": \"2016-05-11T16:30:55.328Z\"\n}\n\nGET index/_search\n{\n \"query\": {\n \"constant_score\": {\n \"filter\": {\n \"range\": {\n \"my_date\": {\n \"gte\": \"now-1h\",\n \"lte\": \"now\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "my_date": "2016-05-11T16:30:55.328Z"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "range": {
- "my_date": {
- "gte": "now-1h",
- "lte": "now"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 207
- },
- "digest": "17dd67a66c49f7eb618dd17430e48dfa",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"constant_score\": {\n \"filter\": {\n \"range\": {\n \"my_date\": {\n \"gte\": \"now-1h/m\",\n \"lte\": \"now/m\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "range": {
- "my_date": {
- "gte": "now-1h/m",
- "lte": "now/m"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 240
- },
- "digest": "abc7a670a47516b58b6b07d7497b140c",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"constant_score\": {\n \"filter\": {\n \"bool\": {\n \"should\": [\n {\n \"range\": {\n \"my_date\": {\n \"gte\": \"now-1h\",\n \"lte\": \"now-1h/m\"\n }\n }\n },\n {\n \"range\": {\n \"my_date\": {\n \"gt\": \"now-1h/m\",\n \"lt\": \"now/m\"\n }\n }\n },\n {\n \"range\": {\n \"my_date\": {\n \"gte\": \"now/m\",\n \"lte\": \"now\"\n }\n }\n }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "bool": {
- "should": [
- {
- "range": {
- "my_date": {
- "gte": "now-1h",
- "lte": "now-1h/m"
- }
- }
- },
- {
- "range": {
- "my_date": {
- "gt": "now-1h/m",
- "lt": "now/m"
- }
- }
- },
- {
- "range": {
- "my_date": {
- "gte": "now/m",
- "lte": "now"
- }
- }
- }
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 312
- },
- "digest": "971c7a36ee79f2b3aa82c64ea338de70",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\",\n \"eager_global_ordinals\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "keyword",
- "eager_global_ordinals": true
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 14
- },
- "digest": "e273060a675c959fd5f3cde27c8aff07",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"integer\",\n \"index\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "integer",
- "index": false
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 34
- },
- "digest": "c8568f4f02f75db9afd669880db98a16",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"text\",\n \"norms\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "text",
- "norms": false
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 54
- },
- "digest": "1a5cd30017368fe4888454a13c6e8561",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"text\",\n \"index_options\": \"freqs\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "text",
- "index_options": "freqs"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 74
- },
- "digest": "ae3ae58724c413734b67a90a6ddb319f",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"text\",\n \"norms\": false,\n \"index_options\": \"freqs\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "text",
- "norms": false,
- "index_options": "freqs"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 106
- },
- "digest": "597d456edfcb3d410954a3e9b5babf9a",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"strings\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"keyword\"\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "strings": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "keyword"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 74
- },
- "digest": "978088f989d45dd09339582e9cbc60e0",
- "lang": "console",
- "found": [],
- "source": "# GET //_search\nGET /%3Clogstash-%7Bnow%2Fd%7D%3E/_search\n{\n \"query\" : {\n \"match\": {\n \"test\": \"data\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/%3Clogstash-%7Bnow%2Fd%7D%3E/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "params": {
- "index": "%3Clogstash-%7Bnow%2Fd%7D%3E"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 128
- },
- "digest": "a34d70d7022eb4ba48909d440c80390f",
- "lang": "console",
- "found": [],
- "source": "# GET /,,/_search\nGET /%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogstash-%7Bnow%2Fd%7D%3E/_search\n{\n \"query\" : {\n \"match\": {\n \"test\": \"data\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogstash-%7Bnow%2Fd%7D%3E/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "params": {
- "index": "%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogstash-%7Bnow%2Fd%7D%3E"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 215
- },
- "digest": "09dbd90c5e22ea4a17b4cf9aa72e08ae",
- "lang": "console",
- "found": [],
- "source": "GET /_search?q=elasticsearch&filter_path=took,hits.hits._id,hits.hits._score",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "q": "elasticsearch",
- "filter_path": "took,hits.hits._id,hits.hits._score"
- },
- "body": null,
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 223
- },
- "digest": "0936e4cc7952b267b16a3b764d4e25ee",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 3,\n \"hits\" : {\n \"hits\" : [\n {\n \"_id\" : \"0\",\n \"_score\" : 1.6375021\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 243
- },
- "digest": "1dbb8cf17fbc45c87c7d2f75f15f9778",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state?filter_path=metadata.indices.*.stat*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "metadata.indices.*.stat*"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 251
- },
- "digest": "b1447d563c8b8d3e653cf62eaf11612c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"metadata\" : {\n \"indices\" : {\n \"twitter\": {\"state\": \"open\"}\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 266
- },
- "digest": "1252fa45847edba5ec2b2f33da70ec5b",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state?filter_path=routing_table.indices.**.state",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "routing_table.indices.**.state"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 274
- },
- "digest": "5ed13422ab669b54b3238a57b57d94e2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"routing_table\": {\n \"indices\": {\n \"twitter\": {\n \"shards\": {\n \"0\": [{\"state\": \"STARTED\"}, {\"state\": \"UNASSIGNED\"}]\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 291
- },
- "digest": "621665fdbd7fc103c09bfeed28b67b1a",
- "lang": "console",
- "found": [],
- "source": "GET /_count?filter_path=-_shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_count",
- "query": {
- "filter_path": "-_shards"
- },
- "body": null,
- "params": null,
- "api": "count"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 299
- },
- "digest": "09108f6f3c42ee4bbe387d3c28713174",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 5\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 310
- },
- "digest": "1e18a67caf8f06ff2710ec4a8b30f625",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state?filter_path=metadata.indices.*.state,-metadata.indices.logstash-*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "metadata.indices.*.state,-metadata.indices.logstash-*"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 318
- },
- "digest": "c0aafcb374103c000f5c61010ef9d160",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"metadata\" : {\n \"indices\" : {\n \"index-1\" : {\"state\" : \"open\"},\n \"index-2\" : {\"state\" : \"open\"},\n \"index-3\" : {\"state\" : \"open\"}\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 337
- },
- "digest": "6464124d1677f4552ddddd95a340ca3a",
- "lang": "console",
- "found": [],
- "source": "POST /library/_doc?refresh\n{\"title\": \"Book #1\", \"rating\": 200.1}\nPOST /library/_doc?refresh\n{\"title\": \"Book #2\", \"rating\": 1.7}\nPOST /library/_doc?refresh\n{\"title\": \"Book #3\", \"rating\": 0.1}\nGET /_search?filter_path=hits.hits._source&_source=title&sort=rating:desc",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/library/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Book #1",
- "rating": 200.1
- },
- "params": {
- "index": "library"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/library/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Book #2",
- "rating": 1.7
- },
- "params": {
- "index": "library"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/library/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Book #3",
- "rating": 0.1
- },
- "params": {
- "index": "library"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "filter_path": "hits.hits._source",
- "_source": "title",
- "sort": "rating:desc"
- },
- "body": null,
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 348
- },
- "digest": "ca0212c413612a028f3405cc29e4ff8a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\" : {\n \"hits\" : [ {\n \"_source\":{\"title\":\"Book #1\"}\n }, {\n \"_source\":{\"title\":\"Book #2\"}\n }, {\n \"_source\":{\"title\":\"Book #3\"}\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 370
- },
- "digest": "b9a153725b28fdd0a5aabd7f17a8c2d7",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_settings?flat_settings=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_settings",
- "query": {
- "flat_settings": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 378
- },
- "digest": "eef497b2139cfd6c73f8d1dc3cf4daa4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"twitter\" : {\n \"settings\": {\n \"index.number_of_replicas\": \"1\",\n \"index.number_of_shards\": \"1\",\n \"index.creation_date\": \"1474389951325\",\n \"index.uuid\": \"n6gzFZTgS664GUfx0Xrpjw\",\n \"index.version.created\": ...,\n \"index.provided_name\" : \"twitter\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 400
- },
- "digest": "5925c23a173a63bdb30b458248d1df76",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_settings?flat_settings=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_settings",
- "query": {
- "flat_settings": "false"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 408
- },
- "digest": "a5cc24f6d552e19c56f88840561750b3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"twitter\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_replicas\": \"1\",\n \"number_of_shards\": \"1\",\n \"creation_date\": \"1474389951325\",\n \"uuid\": \"n6gzFZTgS664GUfx0Xrpjw\",\n \"version\": {\n \"created\": ...\n },\n \"provided_name\" : \"twitter\"\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 564
- },
- "digest": "a6f8636b03cc5f677b7d89e750328612",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=surprise_me",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "surprise_me"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 573
- },
- "digest": "be8a94d6faacfb7ca0d36d222e0ae4c9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"error\" : {\n \"root_cause\" : [\n {\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"Failed to parse int parameter [size] with value [surprise_me]\"\n }\n ],\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"Failed to parse int parameter [size] with value [surprise_me]\",\n \"caused_by\" : {\n \"type\" : \"number_format_exception\",\n \"reason\" : \"For input string: \\\"surprise_me\\\"\"\n }\n },\n \"status\" : 400\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 596
- },
- "digest": "6d1e75312a28a5ba23837abf768f2510",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=surprise_me&error_trace=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "surprise_me",
- "error_trace": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 604
- },
- "digest": "ddad5df34c874dfe814a44e1e0d57148",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"error\": {\n \"root_cause\": [\n {\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"Failed to parse int parameter [size] with value [surprise_me]\",\n \"stack_trace\": \"Failed to parse int parameter [size] with value [surprise_me]]; nested: IllegalArgumentException...\"\n }\n ],\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"Failed to parse int parameter [size] with value [surprise_me]\",\n \"stack_trace\": \"java.lang.IllegalArgumentException: Failed to parse int parameter [size] with value [surprise_me]\\n at org.elasticsearch.rest.RestRequest.paramAsInt(RestRequest.java:175)...\",\n \"caused_by\": {\n \"type\": \"number_format_exception\",\n \"reason\": \"For input string: \\\"surprise_me\\\"\",\n \"stack_trace\": \"java.lang.NumberFormatException: For input string: \\\"surprise_me\\\"\\n at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)...\"\n }\n },\n \"status\": 400\n}"
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-decision.asciidoc",
- "line": 15
- },
- "digest": "0d142c34961983f6aab5f12965407bab",
- "lang": "console",
- "found": [],
- "source": "GET /_autoscaling/decision/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_autoscaling/decision/",
- "query": null,
- "body": null,
- "params": null,
- "api": "autoscaling.get_autoscaling_decision"
- }
- ]
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-decision.asciidoc",
- "line": 40
- },
- "digest": "f1335bacda32b273ecc9603498eff65c",
- "lang": "console",
- "found": [],
- "source": "GET /_autoscaling/decision",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_autoscaling/decision",
- "query": null,
- "body": null,
- "params": null,
- "api": "autoscaling.get_autoscaling_decision"
- }
- ]
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-decision.asciidoc",
- "line": 48
- },
- "digest": "ecde3c2fa2f4b771baec679a4cdf348f",
- "lang": "console-result",
- "found": [],
- "source": "{\n\n}"
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 36
- },
- "digest": "45bde49f35ffae3f3dabc77a592241b4",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/master?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/master",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.master"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 57
- },
- "digest": "179dabbc531ede7a1813d1a11ce5b5fd",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/master?help",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/master",
- "query": {
- "help": true
- },
- "body": null,
- "params": null,
- "api": "cat.master"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 85
- },
- "digest": "d940059e16675a40e3d278073331eeed",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodes?h=ip,port,heapPercent,name",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "h": "ip,port,heapPercent,name"
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 121
- },
- "digest": "53b027c2d3ac80e93d398762c55894eb",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/indices?bytes=b&s=store.size:desc&v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/indices",
- "query": {
- "bytes": "b",
- "s": "store.size:desc",
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.indices"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 211
- },
- "digest": "794fa23d07c42900b5e97fb9bf323941",
- "lang": "console",
- "found": [],
- "source": "GET _cat/templates?v&s=order:desc,index_patterns",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/templates",
- "query": {
- "v": true,
- "s": "order:desc,index_patterns"
- },
- "body": null,
- "params": null,
- "api": "cat.templates"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/alias.asciidoc",
- "line": 73
- },
- "digest": "a003467caeafcb2a935522efb83080cb",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/aliases?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/aliases",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/allocation.asciidoc",
- "line": 47
- },
- "digest": "5c7ece1f30267adabdb832424871900a",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/allocation?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/allocation",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.allocation"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/count.asciidoc",
- "line": 52
- },
- "digest": "e7553d4bb4fd82d8f80a4d7af2624afb",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/count/twitter?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/count/twitter",
- "query": {
- "v": true
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "cat.count"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/count.asciidoc",
- "line": 74
- },
- "digest": "0a1f8ad54b1d8c9feeaceaeed16c8490",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/count?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/count",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.count"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/dataframeanalytics.asciidoc",
- "line": 151
- },
- "digest": "7c6f205c98da14c68d3d936639462dd3",
- "lang": "console",
- "found": [],
- "source": "GET _cat/ml/data_frame/analytics?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/ml/data_frame/analytics",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.ml_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/dataframeanalytics.asciidoc",
- "line": 157
- },
- "digest": "821d07ed9a229f9d5cc34651124da6e8",
- "lang": "console-result",
- "found": [],
- "source": "id create_time type state\nclassifier_job_1 2020-02-12T11:49:09.594Z classification stopped\nclassifier_job_2 2020-02-12T11:49:14.479Z classification stopped\nclassifier_job_3 2020-02-12T11:49:16.928Z classification stopped\nclassifier_job_4 2020-02-12T11:49:19.127Z classification stopped\nclassifier_job_5 2020-02-12T11:49:21.349Z classification stopped"
- },
- {
- "source_location": {
- "file": "cat/fielddata.asciidoc",
- "line": 90
- },
- "digest": "973f2d7fbff9f310b21108b31d7ad413",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/fielddata?v&fields=body",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/fielddata",
- "query": {
- "v": true,
- "fields": "body"
- },
- "body": null,
- "params": null,
- "api": "cat.fielddata"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/fielddata.asciidoc",
- "line": 114
- },
- "digest": "62daf8e41b9e984d18d6cc51f247c7ad",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/fielddata/body,soul?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/fielddata/body,soul",
- "query": {
- "v": true
- },
- "body": null,
- "params": {
- "fields": "body,soul"
- },
- "api": "cat.fielddata"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/fielddata.asciidoc",
- "line": 140
- },
- "digest": "b26ff669b3c88fb0872fa0a923972f54",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/fielddata?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/fielddata",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.fielddata"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/health.asciidoc",
- "line": 69
- },
- "digest": "f8cc4b331a19ff4df8e4a490f906ee69",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cat/health?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/health.asciidoc",
- "line": 89
- },
- "digest": "ccd9e2cf7181de67cf9ab0df1a02c575",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/health?v&ts=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true,
- "ts": "false"
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/indices.asciidoc",
- "line": 92
- },
- "digest": "073539a7e38be3cdf13008330b6a536a",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/indices/twi*?v&s=index",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/indices/twi*",
- "query": {
- "v": true,
- "s": "index"
- },
- "body": null,
- "params": {
- "index": "twi*"
- },
- "api": "cat.indices"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/master.asciidoc",
- "line": 39
- },
- "digest": "45bde49f35ffae3f3dabc77a592241b4",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/master?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/master",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.master"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/nodeattrs.asciidoc",
- "line": 69
- },
- "digest": "e20e2e6f949ac660a77840a9263fadef",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodeattrs?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodeattrs",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.nodeattrs"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/nodeattrs.asciidoc",
- "line": 100
- },
- "digest": "0c69c638073cc8518187b678dd33443c",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodeattrs?v&h=name,pid,attr,value",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodeattrs",
- "query": {
- "v": true,
- "h": "name,pid,attr,value"
- },
- "body": null,
- "params": null,
- "api": "cat.nodeattrs"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/nodes.asciidoc",
- "line": 304
- },
- "digest": "db20adb70a8e8d0709d15ba0daf18d23",
- "lang": "console",
- "found": [
- "python"
- ],
- "source": "GET /_cat/nodes?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/nodes.asciidoc",
- "line": 332
- },
- "digest": "21d3e98d911642ab3bda2657f7a06f80",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodes?v&h=id,ip,port,v,m",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "v": true,
- "h": "id,ip,port,v,m"
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/pending_tasks.asciidoc",
- "line": 39
- },
- "digest": "dc2e9e499c7037eb9327cc84a942c5e9",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/pending_tasks?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/pending_tasks",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.pending_tasks"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/plugins.asciidoc",
- "line": 38
- },
- "digest": "3796d69e8339bab58e70fdde9f9c09ad",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/plugins?v&s=component&h=name,component,version,description",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/plugins",
- "query": {
- "v": true,
- "s": "component",
- "h": "name,component,version,description"
- },
- "body": null,
- "params": null,
- "api": "cat.plugins"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/recovery.asciidoc",
- "line": 67
- },
- "digest": "0497361415e63295f2151b34818ad1ab",
- "lang": "console",
- "found": [],
- "source": "GET _cat/recovery?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/recovery.asciidoc",
- "line": 96
- },
- "digest": "be9390dd19d724364b72bf081b3593d7",
- "lang": "console",
- "found": [],
- "source": "GET _cat/recovery?v&h=i,s,t,ty,st,shost,thost,f,fp,b,bp",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": {
- "v": true,
- "h": "i,s,t,ty,st,shost,thost,f,fp,b,bp"
- },
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/recovery.asciidoc",
- "line": 126
- },
- "digest": "a213728fa704ca23c5983809332d3fb3",
- "lang": "console",
- "found": [],
- "source": "GET _cat/recovery?v&h=i,s,t,ty,st,rep,snap,f,fp,b,bp",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": {
- "v": true,
- "h": "i,s,t,ty,st,rep,snap,f,fp,b,bp"
- },
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/repositories.asciidoc",
- "line": 38
- },
- "digest": "6fa570aac5033e3b25d3071a6c9ea3dc",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/repositories?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/repositories",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.repositories"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/tasks.asciidoc",
- "line": 67
- },
- "digest": "f3422381d36398fcb2612692b11b1e96",
- "lang": "console",
- "found": [],
- "source": "GET _cat/tasks?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/tasks",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.tasks"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/tasks.asciidoc",
- "line": 75
- },
- "digest": "c2613cffe0ea615550bb2a0ef9c76697",
- "lang": "console-result",
- "found": [],
- "source": "action task_id parent_task_id type start_time timestamp running_time ip node\ncluster:monitor/tasks/lists[n] oTUltX4IQMOUUVeiohTt8A:124 oTUltX4IQMOUUVeiohTt8A:123 direct 1458585884904 01:48:24 44.1micros 127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A\ncluster:monitor/tasks/lists oTUltX4IQMOUUVeiohTt8A:123 - transport 1458585884904 01:48:24 186.2micros 127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A"
- },
- {
- "source_location": {
- "file": "cat/thread_pool.asciidoc",
- "line": 125
- },
- "digest": "ad88e46bb06739991498dee248850223",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/thread_pool",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/thread_pool",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.thread_pool"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/thread_pool.asciidoc",
- "line": 161
- },
- "digest": "ab5e724a4baa0cc44df33f7d62583e7f",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/thread_pool/generic?v&h=id,name,active,rejected,completed",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/thread_pool/generic",
- "query": {
- "v": true,
- "h": "id,name,active,rejected,completed"
- },
- "body": null,
- "params": {
- "thread_pool_patterns": "generic"
- },
- "api": "cat.thread_pool"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 286
- },
- "digest": "7e126e2751311db60cfcbb22c9c41caa",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 312
- },
- "digest": "e42e92050dd1c20262ce9e38f4b42ba0",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards/twitt*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards/twitt*",
- "query": null,
- "body": null,
- "params": {
- "index": "twitt*"
- },
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 333
- },
- "digest": "7e126e2751311db60cfcbb22c9c41caa",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 356
- },
- "digest": "7e126e2751311db60cfcbb22c9c41caa",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 377
- },
- "digest": "25c0e66a433a0cd596e0641b752ff6d7",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards?h=index,shard,prirep,state,unassigned.reason",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards",
- "query": {
- "h": "index,shard,prirep,state,unassigned.reason"
- },
- "body": null,
- "params": null,
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/segments.asciidoc",
- "line": 108
- },
- "digest": "6f507269ad5b31d2bb0885c1b18aac1a",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/segments?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/segments",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/snapshots.asciidoc",
- "line": 115
- },
- "digest": "706fc4b9e4df1f6ee3fe34194492c20e",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/snapshots/repo1?v&s=id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/snapshots/repo1",
- "query": {
- "v": true,
- "s": "id"
- },
- "body": null,
- "params": {
- "repository": "repo1"
- },
- "api": "cat.snapshots"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/templates.asciidoc",
- "line": 50
- },
- "digest": "289e6033c96f931844770114113cad6a",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/templates?v&s=name",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/templates",
- "query": {
- "v": true,
- "s": "name"
- },
- "body": null,
- "params": null,
- "api": "cat.templates"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster.asciidoc",
- "line": 56
- },
- "digest": "2c602b4ee8f22cda2cdf19bad31da0af",
- "lang": "console",
- "found": [],
- "source": "# If no filters are given, the default is to select all nodes\nGET /_nodes\n# Explicitly select all nodes\nGET /_nodes/_all\n# Select just the local node\nGET /_nodes/_local\n# Select the elected master node\nGET /_nodes/_master\n# Select nodes by name, which can include wildcards\nGET /_nodes/node_name_goes_here\nGET /_nodes/node_name_goes_*\n# Select nodes by address, which can include wildcards\nGET /_nodes/10.0.0.3,10.0.0.4\nGET /_nodes/10.0.0.*\n# Select nodes by role\nGET /_nodes/_all,master:false\nGET /_nodes/data:true,ingest:true\nGET /_nodes/coordinating_only:true\nGET /_nodes/master:true,voting_only:false\n# Select nodes by custom attribute (e.g. with something like `node.attr.rack: 2` in the configuration file)\nGET /_nodes/rack:2\nGET /_nodes/ra*:2\nGET /_nodes/ra*:2*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_all",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_all"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_local",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_local"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_master",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_master"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/node_name_goes_here",
- "query": null,
- "body": null,
- "params": {
- "node_id": "node_name_goes_here"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/node_name_goes_*",
- "query": null,
- "body": null,
- "params": {
- "node_id": "node_name_goes_*"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/10.0.0.3,10.0.0.4",
- "query": null,
- "body": null,
- "params": {
- "node_id": "10.0.0.3,10.0.0.4"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/10.0.0.*",
- "query": null,
- "body": null,
- "params": {
- "node_id": "10.0.0.*"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_all,master:false",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_all,master:false"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/data:true,ingest:true",
- "query": null,
- "body": null,
- "params": {
- "node_id": "data:true,ingest:true"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/coordinating_only:true",
- "query": null,
- "body": null,
- "params": {
- "node_id": "coordinating_only:true"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/master:true,voting_only:false",
- "query": null,
- "body": null,
- "params": {
- "node_id": "master:true,voting_only:false"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/rack:2",
- "query": null,
- "body": null,
- "params": {
- "node_id": "rack:2"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/ra*:2",
- "query": null,
- "body": null,
- "params": {
- "node_id": "ra*:2"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/ra*:2*",
- "query": null,
- "body": null,
- "params": {
- "node_id": "ra*:2*"
- },
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/allocation-explain.asciidoc",
- "line": 77
- },
- "digest": "2663038cfc46b106edaef607d553c99c",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/allocation/explain\n{\n \"index\": \"myindex\",\n \"shard\": 0,\n \"primary\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/allocation/explain",
- "query": null,
- "body": {
- "index": "myindex",
- "shard": 0,
- "primary": true
- },
- "params": null,
- "api": "cluster.allocation_explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/allocation-explain.asciidoc",
- "line": 90
- },
- "digest": "75fb2de2b47c564833ab14049c295384",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/allocation/explain\n{\n \"index\": \"myindex\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"nodeA\" <1>\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/allocation/explain",
- "query": null,
- "body": {
- "index": "myindex",
- "shard": 0,
- "primary": false,
- "current_node": "nodeA"
- },
- "params": null,
- "api": "cluster.allocation_explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/allocation-explain.asciidoc",
- "line": 114
- },
- "digest": "9db57741b46cc9f088cebd6a34ba147d",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index?master_timeout=1s&timeout=1s\n{\"settings\": {\"index.routing.allocation.include._name\": \"non_existent_node\"} }\n\nGET /_cluster/allocation/explain\n{\n \"index\": \"my_index\",\n \"shard\": 0,\n \"primary\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": {
- "master_timeout": "1s",
- "timeout": "1s"
- },
- "body": {
- "settings": {
- "index.routing.allocation.include._name": "non_existent_node"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "GET",
- "url": "/_cluster/allocation/explain",
- "query": null,
- "body": {
- "index": "my_index",
- "shard": 0,
- "primary": true
- },
- "params": null,
- "api": "cluster.allocation_explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/allocation-explain.asciidoc",
- "line": 130
- },
- "digest": "5baf4aac3e1293fc528d56b91699e781",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"index\" : \"my_index\",\n \"shard\" : 0,\n \"primary\" : true,\n \"current_state\" : \"unassigned\", <1>\n \"unassigned_info\" : {\n \"reason\" : \"INDEX_CREATED\", <2>\n \"at\" : \"2017-01-04T18:08:16.600Z\",\n \"last_allocation_status\" : \"no\"\n },\n \"can_allocate\" : \"no\", <3>\n \"allocate_explanation\" : \"cannot allocate because allocation is not permitted to any of the nodes\",\n \"node_allocation_decisions\" : [\n {\n \"node_id\" : \"8qt2rY-pT6KNZB3-hGfLnw\",\n \"node_name\" : \"node-0\",\n \"transport_address\" : \"127.0.0.1:9401\",\n \"node_attributes\" : {},\n \"node_decision\" : \"no\", <4>\n \"weight_ranking\" : 1,\n \"deciders\" : [\n {\n \"decider\" : \"filter\", <5>\n \"decision\" : \"NO\",\n \"explanation\" : \"node does not match index setting [index.routing.allocation.include] filters [_name:\\\"non_existent_node\\\"]\" <6>\n }\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "cluster/health.asciidoc",
- "line": 35
- },
- "digest": "04f5dd677c777bcb15d7d5fa63275fc8",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/health?wait_for_status=yellow&timeout=50s",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": {
- "wait_for_status": "yellow",
- "timeout": "50s"
- },
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/health.asciidoc",
- "line": 143
- },
- "digest": "b02e4907c9936c1adc16ccce9d49900d",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/health",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/health.asciidoc",
- "line": 152
- },
- "digest": "a6936420cb762a0f7f53a5ec54e52f36",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"cluster_name\" : \"testcluster\",\n \"status\" : \"yellow\",\n \"timed_out\" : false,\n \"number_of_nodes\" : 1,\n \"number_of_data_nodes\" : 1,\n \"active_primary_shards\" : 1,\n \"active_shards\" : 1,\n \"relocating_shards\" : 0,\n \"initializing_shards\" : 0,\n \"unassigned_shards\" : 1,\n \"delayed_unassigned_shards\": 0,\n \"number_of_pending_tasks\" : 0,\n \"number_of_in_flight_fetch\": 0,\n \"task_max_waiting_in_queue_millis\": 0,\n \"active_shards_percent_as_number\": 50.0\n}"
- },
- {
- "source_location": {
- "file": "cluster/health.asciidoc",
- "line": 179
- },
- "digest": "c48264ec5d9b9679fddd72e5c44425b9",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/health/twitter?level=shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health/twitter",
- "query": {
- "level": "shards"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/reroute.asciidoc",
- "line": 180
- },
- "digest": "c5488b3888749d3d5b9808ab28d384eb",
- "lang": "console",
- "found": [],
- "source": "POST /_cluster/reroute\n{\n \"commands\" : [\n {\n \"move\" : {\n \"index\" : \"test\", \"shard\" : 0,\n \"from_node\" : \"node1\", \"to_node\" : \"node2\"\n }\n },\n {\n \"allocate_replica\" : {\n \"index\" : \"test\", \"shard\" : 1,\n \"node\" : \"node3\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_cluster/reroute",
- "query": null,
- "body": {
- "commands": [
- {
- "move": {
- "index": "test",
- "shard": 0,
- "from_node": "node1",
- "to_node": "node2"
- }
- },
- {
- "allocate_replica": {
- "index": "test",
- "shard": 1,
- "node": "node3"
- }
- }
- ]
- },
- "params": null,
- "api": "cluster.reroute"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/state.asciidoc",
- "line": 133
- },
- "digest": "b66be1daf6c220eb66d94e708b2fae39",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state/metadata,routing_table/foo,bar",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state/metadata,routing_table/foo,bar",
- "query": null,
- "body": null,
- "params": {
- "metric": "metadata,routing_table",
- "index": "foo,bar"
- },
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/state.asciidoc",
- "line": 140
- },
- "digest": "0fa220ee3fb267020382f74aa70eb1e9",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state/_all/foo,bar",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state/_all/foo,bar",
- "query": null,
- "body": null,
- "params": {
- "metric": "_all",
- "index": "foo,bar"
- },
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/state.asciidoc",
- "line": 147
- },
- "digest": "a3cfd350c73a104b99a998c6be931408",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state/blocks",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state/blocks",
- "query": null,
- "body": null,
- "params": {
- "metric": "blocks"
- },
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/stats.asciidoc",
- "line": 347
- },
- "digest": "861f5f61409dc87f3671293b87839ff7",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/stats?human&pretty",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/stats",
- "query": {
- "human": true,
- "pretty": true
- },
- "body": null,
- "params": null,
- "api": "cluster.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/stats.asciidoc",
- "line": 591
- },
- "digest": "71c629c44bf3c542a0daacbfc253c4b0",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/stats/nodes/node1,node*,master:false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/stats/nodes/node1,node*,master:false",
- "query": null,
- "body": null,
- "params": {
- "node_id": "node1,node*,master:false"
- },
- "api": "cluster.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 65
- },
- "digest": "37f4bd6dd220db648998fc340b3dfa69",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"50mb\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "indices.recovery.max_bytes_per_sec": "50mb"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 78
- },
- "digest": "8c05281b724106e703c05df661188c4f",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings?flat_settings=true\n{\n \"transient\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"20mb\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": {
- "flat_settings": "true"
- },
- "body": {
- "transient": {
- "indices.recovery.max_bytes_per_sec": "20mb"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 92
- },
- "digest": "dc16ba440e7be92b884ab4e06cba00c2",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"persistent\" : { },\n \"transient\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"20mb\"\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 107
- },
- "digest": "1f25c9ef11f574f1ba0ad974bf653cd4",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"transient\" : {\n \"indices.recovery.max_bytes_per_sec\" : null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.recovery.max_bytes_per_sec": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 120
- },
- "digest": "5146a52d0e9cb82665c29ad890df6ead",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"persistent\" : {},\n \"transient\" : {}\n}"
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 134
- },
- "digest": "32496570a397852bece96f4da5d17a7e",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"transient\" : {\n \"indices.recovery.*\" : null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.recovery.*": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-usage.asciidoc",
- "line": 61
- },
- "digest": "3d6a56dd3d93ece0e3da3fb66b4696d3",
- "lang": "console",
- "found": [],
- "source": "GET _nodes/usage",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/usage",
- "query": null,
- "body": null,
- "params": null,
- "api": "nodes.usage"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-usage.asciidoc",
- "line": 69
- },
- "digest": "35d13927cdb2785fd79e88c8c04007e7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_nodes\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"cluster_name\": \"my_cluster\",\n \"nodes\": {\n \"pQHNt5rXTTWNvUgOrdynKg\": {\n \"timestamp\": 1492553961812, <1>\n \"since\": 1492553906606, <2>\n \"rest_actions\": {\n \"org.elasticsearch.rest.action.admin.cluster.RestNodesUsageAction\": 1,\n \"org.elasticsearch.rest.action.admin.indices.RestCreateIndexAction\": 1,\n \"org.elasticsearch.rest.action.document.RestGetAction\": 1,\n \"org.elasticsearch.rest.action.search.RestSearchAction\": 19, <3>\n \"org.elasticsearch.rest.action.admin.cluster.RestNodesInfoAction\": 36\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/nodes-hot-threads.asciidoc",
- "line": 64
- },
- "digest": "77c099c97ea6911e2dd6e996da7dcca0",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/hot_threads\nGET /_nodes/nodeId1,nodeId2/hot_threads",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/hot_threads",
- "query": null,
- "body": null,
- "params": null,
- "api": "nodes.hot_threads"
- },
- {
- "method": "GET",
- "url": "/_nodes/nodeId1,nodeId2/hot_threads",
- "query": null,
- "body": null,
- "params": {
- "node_id": "nodeId1,nodeId2"
- },
- "api": "nodes.hot_threads"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 165
- },
- "digest": "3c4d7ef8422d2db423a8f23effcddaa1",
- "lang": "console",
- "found": [],
- "source": "# return just process\nGET /_nodes/process\n\n# same as above\nGET /_nodes/_all/process\n\n# return just jvm and process of only nodeId1 and nodeId2\nGET /_nodes/nodeId1,nodeId2/jvm,process\n\n# same as above\nGET /_nodes/nodeId1,nodeId2/info/jvm,process\n\n# return all the information of only nodeId1 and nodeId2\nGET /_nodes/nodeId1,nodeId2/_all",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/process",
- "query": null,
- "body": null,
- "params": {
- "node_id": "process"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_all/process",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_all",
- "metric": "process"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/nodeId1,nodeId2/jvm,process",
- "query": null,
- "body": null,
- "params": {
- "node_id": "nodeId1,nodeId2",
- "metric": "jvm,process"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/nodeId1,nodeId2/_all",
- "query": null,
- "body": null,
- "params": {
- "node_id": "nodeId1,nodeId2",
- "metric": "_all"
- },
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 192
- },
- "digest": "68b64313bf89ec3f2c645da61999dbb4",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/plugins",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/plugins",
- "query": null,
- "body": null,
- "params": {
- "node_id": "plugins"
- },
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 200
- },
- "digest": "482734cbb2bea52b69e21cc779b00dcd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_nodes\": ...\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"build_flavor\": \"{build_flavor}\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [\n \"master\",\n \"data\",\n \"ingest\"\n ],\n \"attributes\": {},\n \"plugins\": [\n {\n \"name\": \"analysis-icu\",\n \"version\": \"{version}\",\n \"description\": \"The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.\",\n \"classname\": \"org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin\",\n \"has_native_controller\": false\n }\n ],\n \"modules\": [\n {\n \"name\": \"lang-painless\",\n \"version\": \"{version}\",\n \"description\": \"An easy, safe and fast scripting language for Elasticsearch\",\n \"classname\": \"org.elasticsearch.painless.PainlessPlugin\",\n \"has_native_controller\": false\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 263
- },
- "digest": "0c464965126cc09e6812716a145991d4",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/ingest",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/ingest",
- "query": null,
- "body": null,
- "params": {
- "node_id": "ingest"
- },
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 271
- },
- "digest": "e5909bdf16ebbcdb6e4e7da443ad367a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_nodes\": ...\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"build_flavor\": \"{build_flavor}\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [],\n \"attributes\": {},\n \"ingest\": {\n \"processors\": [\n {\n \"type\": \"date\"\n },\n {\n \"type\": \"uppercase\"\n },\n {\n \"type\": \"set\"\n },\n {\n \"type\": \"lowercase\"\n },\n {\n \"type\": \"gsub\"\n },\n {\n \"type\": \"convert\"\n },\n {\n \"type\": \"remove\"\n },\n {\n \"type\": \"fail\"\n },\n {\n \"type\": \"foreach\"\n },\n {\n \"type\": \"split\"\n },\n {\n \"type\": \"trim\"\n },\n {\n \"type\": \"rename\"\n },\n {\n \"type\": \"join\"\n },\n {\n \"type\": \"append\"\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/nodes-reload-secure-settings.asciidoc",
- "line": 54
- },
- "digest": "72f20e645e118715b6197c2087b4db86",
- "lang": "console",
- "found": [],
- "source": "POST _nodes/reload_secure_settings\nPOST _nodes/nodeId1,nodeId2/reload_secure_settings",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_nodes/reload_secure_settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "nodes.reload_secure_settings"
- },
- {
- "method": "POST",
- "url": "/_nodes/nodeId1,nodeId2/reload_secure_settings",
- "query": null,
- "body": null,
- "params": {
- "node_id": "nodeId1,nodeId2"
- },
- "api": "nodes.reload_secure_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-reload-secure-settings.asciidoc",
- "line": 67
- },
- "digest": "f141b94c4b48dc62c67cffc121320a8d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_nodes\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"cluster_name\": \"my_cluster\",\n \"nodes\": {\n \"pQHNt5rXTTWNvUgOrdynKg\": {\n \"name\": \"node-0\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 1363
- },
- "digest": "5457c94f0039c6b95c7f9f305d0c6b58",
- "lang": "console",
- "found": [],
- "source": "# return just indices\nGET /_nodes/stats/indices\n\n# return just os and process\nGET /_nodes/stats/os,process\n\n# return just process for node with IP address 10.0.0.1\nGET /_nodes/10.0.0.1/stats/process",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/indices",
- "query": null,
- "body": null,
- "params": {
- "metric": "indices"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/os,process",
- "query": null,
- "body": null,
- "params": {
- "metric": "os,process"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/10.0.0.1/stats/process",
- "query": null,
- "body": null,
- "params": {
- "node_id": "10.0.0.1",
- "metric": "process"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 1381
- },
- "digest": "150b5fee5678bf8cdf0932da73eada80",
- "lang": "console",
- "found": [],
- "source": "# Fielddata summarized by node\nGET /_nodes/stats/indices/fielddata?fields=field1,field2\n\n# Fielddata summarized by node and index\nGET /_nodes/stats/indices/fielddata?level=indices&fields=field1,field2\n\n# Fielddata summarized by node, index, and shard\nGET /_nodes/stats/indices/fielddata?level=shards&fields=field1,field2\n\n# You can use wildcards for field names\nGET /_nodes/stats/indices/fielddata?fields=field*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "fields": "field1,field2"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "level": "indices",
- "fields": "field1,field2"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "level": "shards",
- "fields": "field1,field2"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "fields": "field*"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 1399
- },
- "digest": "bd68666ca2e0be12f7624016317a62bc",
- "lang": "console",
- "found": [],
- "source": "# All groups with all stats\nGET /_nodes/stats?groups=_all\n\n# Some groups from just the indices stats\nGET /_nodes/stats/indices?groups=foo,bar",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats",
- "query": {
- "groups": "_all"
- },
- "body": null,
- "params": null,
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices",
- "query": {
- "groups": "foo,bar"
- },
- "body": null,
- "params": {
- "metric": "indices"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 1415
- },
- "digest": "09769561f082b50558fb7d8707719963",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/stats/ingest?filter_path=nodes.*.ingest",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/ingest",
- "query": {
- "filter_path": "nodes.*.ingest"
- },
- "body": null,
- "params": {
- "metric": "ingest"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 1423
- },
- "digest": "ef9c29759459904fef162acd223462c4",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/stats?metric=ingest&filter_path=nodes.*.ingest",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats",
- "query": {
- "metric": "ingest",
- "filter_path": "nodes.*.ingest"
- },
- "body": null,
- "params": null,
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 1431
- },
- "digest": "f160561efab38e40c2feebf5a2542ab5",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/stats?metric=ingest&filter_path=nodes.*.ingest.pipelines",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats",
- "query": {
- "metric": "ingest",
- "filter_path": "nodes.*.ingest.pipelines"
- },
- "body": null,
- "params": null,
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 64
- },
- "digest": "166bcfc6d5d39defec7ad6aa44d0914b",
- "lang": "console",
- "found": [],
- "source": "GET _tasks <1>\nGET _tasks?nodes=nodeId1,nodeId2 <2>\nGET _tasks?nodes=nodeId1,nodeId2&actions=cluster:* <3>",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": null,
- "body": null,
- "params": null,
- "api": "tasks.list"
- },
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "nodes": "nodeId1,nodeId2"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- },
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "nodes": "nodeId1,nodeId2",
- "actions": "cluster:*"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 78
- },
- "digest": "7c407f3a8d5cb690829b8fa58bb8fd42",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\" : {\n \"oTUltX4IQMOUUVeiohTt8A\" : {\n \"name\" : \"H5dfFeA\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"tasks\" : {\n \"oTUltX4IQMOUUVeiohTt8A:124\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 124,\n \"type\" : \"direct\",\n \"action\" : \"cluster:monitor/tasks/lists[n]\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 47402,\n \"cancellable\" : false,\n \"parent_task_id\" : \"oTUltX4IQMOUUVeiohTt8A:123\"\n },\n \"oTUltX4IQMOUUVeiohTt8A:123\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 123,\n \"type\" : \"transport\",\n \"action\" : \"cluster:monitor/tasks/lists\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 236042,\n \"cancellable\" : false\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 118
- },
- "digest": "33610800d9de3c3e6d6b3c611ace7330",
- "lang": "console",
- "found": [],
- "source": "GET _tasks/oTUltX4IQMOUUVeiohTt8A:124",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks/oTUltX4IQMOUUVeiohTt8A:124",
- "query": null,
- "body": null,
- "params": {
- "task_id": "oTUltX4IQMOUUVeiohTt8A:124"
- },
- "api": "tasks.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 128
- },
- "digest": "29824032d7d64512d17458fdd687b1f6",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?parent_task_id=oTUltX4IQMOUUVeiohTt8A:123",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "parent_task_id": "oTUltX4IQMOUUVeiohTt8A:123"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 143
- },
- "digest": "8f4a7f68f2ca3698abdf20026a2d8c5f",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?actions=*search&detailed",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "actions": "*search",
- "detailed": true
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 151
- },
- "digest": "0a733828e712d5dc3c1f9591ebbb843e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\" : {\n \"oTUltX4IQMOUUVeiohTt8A\" : {\n \"name\" : \"H5dfFeA\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"tasks\" : {\n \"oTUltX4IQMOUUVeiohTt8A:464\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 464,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/read/search\",\n \"description\" : \"indices[test], types[test], search_type[QUERY_THEN_FETCH], source[{\\\"query\\\":...}]\",\n \"start_time_in_millis\" : 1483478610008,\n \"running_time_in_nanos\" : 13991383,\n \"cancellable\" : true\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 206
- },
- "digest": "93fb59d3204f37af952198b331fb6bb7",
- "lang": "console",
- "found": [],
- "source": "GET _tasks/oTUltX4IQMOUUVeiohTt8A:12345?wait_for_completion=true&timeout=10s",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks/oTUltX4IQMOUUVeiohTt8A:12345",
- "query": {
- "wait_for_completion": "true",
- "timeout": "10s"
- },
- "body": null,
- "params": {
- "task_id": "oTUltX4IQMOUUVeiohTt8A:12345"
- },
- "api": "tasks.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 215
- },
- "digest": "77447e2966708e92f5e219d43ac3f00d",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?actions=*reindex&wait_for_completion=true&timeout=10s",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "actions": "*reindex",
- "wait_for_completion": "true",
- "timeout": "10s"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 226
- },
- "digest": "d89d36741d906a71eca6c144e8d83889",
- "lang": "console",
- "found": [],
- "source": "POST _tasks/oTUltX4IQMOUUVeiohTt8A:12345/_cancel",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_tasks/oTUltX4IQMOUUVeiohTt8A:12345/_cancel",
- "query": null,
- "body": null,
- "params": {
- "task_id": "oTUltX4IQMOUUVeiohTt8A:12345"
- },
- "api": "tasks.cancel"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 236
- },
- "digest": "612c2e975f833de9815651135735eae5",
- "lang": "console",
- "found": [],
- "source": "POST _tasks/_cancel?nodes=nodeId1,nodeId2&actions=*reindex",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_tasks/_cancel",
- "query": {
- "nodes": "nodeId1,nodeId2",
- "actions": "*reindex"
- },
- "body": null,
- "params": null,
- "api": "tasks.cancel"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 247
- },
- "digest": "bd3d710ec50a151453e141691163af72",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?group_by=parents",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "group_by": "parents"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 254
- },
- "digest": "a3ce0cfe2176f3d8a36959a5916995f0",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?group_by=none",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "group_by": "none"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/voting-exclusions.asciidoc",
- "line": 73
- },
- "digest": "59681840e544bb5b3bd858c194972f23",
- "lang": "console",
- "found": [],
- "source": "POST /_cluster/voting_config_exclusions/nodeId1",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "cluster/voting-exclusions.asciidoc",
- "line": 82
- },
- "digest": "25cb9e1da00dfd971065ce182467434d",
- "lang": "console",
- "found": [],
- "source": "DELETE /_cluster/voting_config_exclusions",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/get-ccr-stats.asciidoc",
- "line": 37
- },
- "digest": "9b30a69fec54cf01f7af1b04a6e15239",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ccr/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "ccr.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/get-ccr-stats.asciidoc",
- "line": 94
- },
- "digest": "9b30a69fec54cf01f7af1b04a6e15239",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ccr/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "ccr.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/get-ccr-stats.asciidoc",
- "line": 101
- },
- "digest": "fb4b67c046594eb08c912e9fbc63753a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"auto_follow_stats\" : {\n \"number_of_failed_follow_indices\" : 0,\n \"number_of_failed_remote_cluster_state_requests\" : 0,\n \"number_of_successful_follow_indices\" : 1,\n \"recent_auto_follow_errors\" : [],\n \"auto_followed_clusters\" : []\n },\n \"follow_stats\" : {\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/put-follow.asciidoc",
- "line": 25
- },
- "digest": "73646c12ad33a813ab2280f1dc83500e",
- "lang": "console",
- "found": [],
- "source": "PUT //_ccr/follow?wait_for_active_shards=1\n{\n \"remote_cluster\" : \"\",\n \"leader_index\" : \"\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow-request-body.asciidoc",
- "line": 80
- },
- "digest": "bb5221ac311cc0e719ab75895be81959",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follower_indices\" : [\n {\n \"parameters\" : {\n \"max_read_request_operation_count\" : 5120,\n \"max_read_request_size\" : \"32mb\",\n \"max_outstanding_read_requests\" : 12,\n \"max_write_request_operation_count\" : 5120,\n \"max_write_request_size\" : \"9223372036854775807b\",\n \"max_outstanding_write_requests\" : 9,\n \"max_write_buffer_count\" : 2147483647,\n \"max_write_buffer_size\" : \"512mb\",\n \"max_retry_delay\" : \"500ms\",\n \"read_poll_timeout\" : \"1m\"\n }\n }\n ]\n}\n"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/put-follow.asciidoc",
- "line": 88
- },
- "digest": "c1f565c68d7bfce4a4251c7919444977",
- "lang": "console",
- "found": [],
- "source": "PUT /follower_index/_ccr/follow?wait_for_active_shards=1\n{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/follower_index/_ccr/follow",
- "query": {
- "wait_for_active_shards": "1"
- },
- "body": {
- "remote_cluster": "remote_cluster",
- "leader_index": "leader_index",
- "max_read_request_operation_count": 1024,
- "max_outstanding_read_requests": 16,
- "max_read_request_size": "1024k",
- "max_write_request_operation_count": 32768,
- "max_write_request_size": "16k",
- "max_outstanding_write_requests": 8,
- "max_write_buffer_count": 512,
- "max_write_buffer_size": "512k",
- "max_retry_delay": "10s",
- "read_poll_timeout": "30s"
- },
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/put-follow.asciidoc",
- "line": 110
- },
- "digest": "cd06634b8187698efa6a7990d3713297",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follow_index_created\" : true,\n \"follow_index_shards_acked\" : true,\n \"index_following_started\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-pause-follow.asciidoc",
- "line": 30
- },
- "digest": "483d669ec0768bc4e275a568c6164704",
- "lang": "console",
- "found": [],
- "source": "POST //_ccr/pause_follow",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-pause-follow.asciidoc",
- "line": 63
- },
- "digest": "d3263afc69b6f969b9bbd8738cd07b97",
- "lang": "console",
- "found": [],
- "source": "POST /follower_index/_ccr/pause_follow",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/follower_index/_ccr/pause_follow",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.pause_follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-pause-follow.asciidoc",
- "line": 71
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-resume-follow.asciidoc",
- "line": 38
- },
- "digest": "109db8ff7b715aca98de8ef1ab7e44ab",
- "lang": "console",
- "found": [],
- "source": "POST //_ccr/resume_follow\n{\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow-request-body.asciidoc",
- "line": 80
- },
- "digest": "bb5221ac311cc0e719ab75895be81959",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follower_indices\" : [\n {\n \"parameters\" : {\n \"max_read_request_operation_count\" : 5120,\n \"max_read_request_size\" : \"32mb\",\n \"max_outstanding_read_requests\" : 12,\n \"max_write_request_operation_count\" : 5120,\n \"max_write_request_size\" : \"9223372036854775807b\",\n \"max_outstanding_write_requests\" : 9,\n \"max_write_buffer_count\" : 2147483647,\n \"max_write_buffer_size\" : \"512mb\",\n \"max_retry_delay\" : \"500ms\",\n \"read_poll_timeout\" : \"1m\"\n }\n }\n ]\n}\n"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-resume-follow.asciidoc",
- "line": 80
- },
- "digest": "824fded1f9db28906ae7e85ae8de9bd0",
- "lang": "console",
- "found": [],
- "source": "POST /follower_index/_ccr/resume_follow\n{\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/follower_index/_ccr/resume_follow",
- "query": null,
- "body": {
- "max_read_request_operation_count": 1024,
- "max_outstanding_read_requests": 16,
- "max_read_request_size": "1024k",
- "max_write_request_operation_count": 32768,
- "max_write_request_size": "16k",
- "max_outstanding_write_requests": 8,
- "max_write_buffer_count": 512,
- "max_write_buffer_size": "512k",
- "max_retry_delay": "10s",
- "read_poll_timeout": "30s"
- },
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.resume_follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-resume-follow.asciidoc",
- "line": 99
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-unfollow.asciidoc",
- "line": 34
- },
- "digest": "f6d493650b4344f17297b568016fb445",
- "lang": "console",
- "found": [],
- "source": "POST //_ccr/unfollow",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-unfollow.asciidoc",
- "line": 70
- },
- "digest": "6a350a17701e8c8158407191f2718b66",
- "lang": "console",
- "found": [],
- "source": "POST /follower_index/_ccr/unfollow",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/follower_index/_ccr/unfollow",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.unfollow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-unfollow.asciidoc",
- "line": 78
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-forget-follower.asciidoc",
- "line": 36
- },
- "digest": "f4fdfe52ecba65eec6beb30d8deb8bbf",
- "lang": "console",
- "found": [],
- "source": "POST //_ccr/forget_follower\n{\n \"follower_cluster\" : \"\",\n \"follower_index\" : \"\",\n \"follower_index_uuid\" : \"\",\n \"leader_remote_cluster\" : \"\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-forget-follower.asciidoc",
- "line": 53
- },
- "digest": "8e4318a6e2029efb28ad4cf97bbb5b95",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0,\n \"failures\" : [ ]\n }\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-forget-follower.asciidoc",
- "line": 128
- },
- "digest": "07c07f6d497b1a3012aa4320f830e09e",
- "lang": "console",
- "found": [],
- "source": "POST /leader_index/_ccr/forget_follower\n{\n \"follower_cluster\" : \"follower_cluster\",\n \"follower_index\" : \"follower_index\",\n \"follower_index_uuid\" : \"vYpnaWPRQB6mNspmoCeYyA\",\n \"leader_remote_cluster\" : \"leader_cluster\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/leader_index/_ccr/forget_follower",
- "query": null,
- "body": {
- "follower_cluster": "follower_cluster",
- "follower_index": "follower_index",
- "follower_index_uuid": "vYpnaWPRQB6mNspmoCeYyA",
- "leader_remote_cluster": "leader_cluster"
- },
- "params": {
- "index": "leader_index"
- },
- "api": "ccr.forget_follower"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-forget-follower.asciidoc",
- "line": 142
- },
- "digest": "8e4318a6e2029efb28ad4cf97bbb5b95",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0,\n \"failures\" : [ ]\n }\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-stats.asciidoc",
- "line": 36
- },
- "digest": "020c95db88ef356093f03be84893ddf9",
- "lang": "console",
- "found": [],
- "source": "GET //_ccr/stats",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-stats.asciidoc",
- "line": 206
- },
- "digest": "8e43bb5b7946143e69d397bb81d87df0",
- "lang": "console",
- "found": [],
- "source": "GET /follower_index/_ccr/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/follower_index/_ccr/stats",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.follow_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-stats.asciidoc",
- "line": 213
- },
- "digest": "929930456e2cdaafd5d24e98a6d2aab8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-info.asciidoc",
- "line": 36
- },
- "digest": "b2440b492149b705ef107137fdccb0c2",
- "lang": "console",
- "found": [],
- "source": "GET //_ccr/info",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-info.asciidoc",
- "line": 138
- },
- "digest": "a520168c1c8b454a8f102d6a13027c73",
- "lang": "console",
- "found": [],
- "source": "GET /follower_index/_ccr/info",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/follower_index/_ccr/info",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.follow_info"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-info.asciidoc",
- "line": 145
- },
- "digest": "2dd7951c1ced23534433c91f48d87fda",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follower_indices\" : [\n {\n \"follower_index\" : \"follower_index\",\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"status\" : \"active\",\n \"parameters\" : {\n \"max_read_request_operation_count\" : 5120,\n \"max_read_request_size\" : \"32mb\",\n \"max_outstanding_read_requests\" : 12,\n \"max_write_request_operation_count\" : 5120,\n \"max_write_request_size\" : \"9223372036854775807b\",\n \"max_outstanding_write_requests\" : 9,\n \"max_write_buffer_count\" : 2147483647,\n \"max_write_buffer_size\" : \"512mb\",\n \"max_retry_delay\" : \"500ms\",\n \"read_poll_timeout\" : \"1m\"\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc",
- "line": 15
- },
- "digest": "6323012afc5d0421840d67cb8a0c4cb9",
- "lang": "console",
- "found": [],
- "source": "PUT /_ccr/auto_follow/\n{\n \"remote_cluster\" : \"\",\n \"leader_index_patterns\" :\n [\n \"\"\n ],\n \"follow_index_pattern\" : \"\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow-request-body.asciidoc",
- "line": 80
- },
- "digest": "bb5221ac311cc0e719ab75895be81959",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follower_indices\" : [\n {\n \"parameters\" : {\n \"max_read_request_operation_count\" : 5120,\n \"max_read_request_size\" : \"32mb\",\n \"max_outstanding_read_requests\" : 12,\n \"max_write_request_operation_count\" : 5120,\n \"max_write_request_size\" : \"9223372036854775807b\",\n \"max_outstanding_write_requests\" : 9,\n \"max_write_buffer_count\" : 2147483647,\n \"max_write_buffer_size\" : \"512mb\",\n \"max_retry_delay\" : \"500ms\",\n \"read_poll_timeout\" : \"1m\"\n }\n }\n ]\n}\n"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc",
- "line": 88
- },
- "digest": "754a082212929e02a9f71d5404d3301d",
- "lang": "console",
- "found": [],
- "source": "PUT /_ccr/auto_follow/my_auto_follow_pattern\n{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern",
- "query": null,
- "body": {
- "remote_cluster": "remote_cluster",
- "leader_index_patterns": [
- "leader_index*"
- ],
- "follow_index_pattern": "{{leader_index}}-follower",
- "max_read_request_operation_count": 1024,
- "max_outstanding_read_requests": 16,
- "max_read_request_size": "1024k",
- "max_write_request_operation_count": 32768,
- "max_write_request_size": "16k",
- "max_outstanding_write_requests": 8,
- "max_write_buffer_count": 512,
- "max_write_buffer_size": "512k",
- "max_retry_delay": "10s",
- "read_poll_timeout": "30s"
- },
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.put_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc",
- "line": 114
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc",
- "line": 34
- },
- "digest": "2f2580ea420e1836d922fe48fa8ada97",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ccr/auto_follow/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc",
- "line": 66
- },
- "digest": "d4ef6ac034c4d42cb75d830ec69146e6",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ccr/auto_follow/my_auto_follow_pattern",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern",
- "query": null,
- "body": null,
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.delete_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc",
- "line": 74
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc",
- "line": 41
- },
- "digest": "5e124875d97c27362ae858160ae1c6d5",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/auto_follow/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ccr/auto_follow/",
- "query": null,
- "body": null,
- "params": null,
- "api": "ccr.get_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc",
- "line": 46
- },
- "digest": "d56a9d89282df56adbbc34b91390ac17",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/auto_follow/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc",
- "line": 79
- },
- "digest": "79f33e05b203eb46eef7958fbc95ef77",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/auto_follow/my_auto_follow_pattern",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern",
- "query": null,
- "body": null,
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.get_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc",
- "line": 87
- },
- "digest": "e1bbe4bf5745d01075cde98e03781daa",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"patterns\": [\n {\n \"name\": \"my_auto_follow_pattern\",\n \"pattern\": {\n \"active\": true,\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\"\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/pause-auto-follow-pattern.asciidoc",
- "line": 76
- },
- "digest": "b25256ed615cd837461b0bfa590526b7",
- "lang": "console",
- "found": [],
- "source": "POST /_ccr/auto_follow/my_auto_follow_pattern/pause",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern/pause",
- "query": null,
- "body": null,
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.pause_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/pause-auto-follow-pattern.asciidoc",
- "line": 84
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/resume-auto-follow-pattern.asciidoc",
- "line": 77
- },
- "digest": "f2e854b6c99659ccc1824e86c096e433",
- "lang": "console",
- "found": [],
- "source": "POST /_ccr/auto_follow/my_auto_follow_pattern/resume",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern/resume",
- "query": null,
- "body": null,
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.resume_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/resume-auto-follow-pattern.asciidoc",
- "line": 85
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 146
- },
- "digest": "804a97ff4d0613e6568e4efb19c52021",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"action.auto_create_index\": \"twitter,index10,-index1*,+ind*\" <1>\n }\n}\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"action.auto_create_index\": \"false\" <2>\n }\n}\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"action.auto_create_index\": \"true\" <3>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "action.auto_create_index": "twitter,index10,-index1*,+ind*"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "action.auto_create_index": "false"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "action.auto_create_index": "true"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 195
- },
- "digest": "36818c6d9f434d387819c30bd9addb14",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_doc/\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_doc/",
- "query": null,
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 207
- },
- "digest": "cf4bd4b0685ba57d9d3bd992ae242729",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"failed\" : 0,\n \"successful\" : 2\n },\n \"_index\" : \"twitter\",\n \"_id\" : \"W0tpsmIBdwcYyG50zbta\",\n \"_version\" : 1,\n \"_seq_no\" : 0,\n \"_primary_term\" : 1,\n \"result\": \"created\"\n}"
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 244
- },
- "digest": "625dc94df1f9affb49a082fd99d41620",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_doc?routing=kimchy\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_doc",
- "query": {
- "routing": "kimchy"
- },
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 366
- },
- "digest": "b918d6b798da673a33e49b94f61dcdc0",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/1?timeout=5m\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": {
- "timeout": "5m"
- },
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 395
- },
- "digest": "1f336ecc62480c1d56351cc2f82d0d08",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/1?version=2&version_type=external\n{\n \"message\" : \"elasticsearch now has versioning support, double cool!\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": {
- "version": "2",
- "version_type": "external"
- },
- "body": {
- "message": "elasticsearch now has versioning support, double cool!"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 453
- },
- "digest": "bb143628fd04070683eeeadc9406d9cc",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/1\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": null,
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 465
- },
- "digest": "b4e59c6b501e37f61c4af444d93c4625",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"failed\" : 0,\n \"successful\" : 2\n },\n \"_index\" : \"twitter\",\n \"_id\" : \"1\",\n \"_version\" : 1,\n \"_seq_no\" : 0,\n \"_primary_term\" : 1,\n \"result\" : \"created\"\n}"
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 486
- },
- "digest": "048d8abd42d094bbdcf4452a58ccb35b",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_create/1\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_create/1",
- "query": null,
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "create"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 499
- },
- "digest": "d718b63cf1b6591a1d59a0cf4fd995eb",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/1?op_type=create\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": {
- "op_type": "create"
- },
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 10
- },
- "digest": "fbcf5078a6a9e09790553804054c36b3",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_doc/0",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 53
- },
- "digest": "138ccd89f72aa7502dd9578403dcc589",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_doc/0?_source=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": {
- "_source": "false"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 65
- },
- "digest": "8fdf2344c4fb3de6902ad7c5735270df",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_doc/0?_source_includes=*.id&_source_excludes=entities",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": {
- "_source_includes": "*.id",
- "_source_excludes": "entities"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 73
- },
- "digest": "745f9b8cdb8e91073f6e520e1d9f8c05",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_doc/0?_source=*.id,retweeted",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": {
- "_source": "*.id,retweeted"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 86
- },
- "digest": "1d65cb6d055c46a1bde809687d835b71",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_doc/2?routing=user1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/2",
- "query": {
- "routing": "user1"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "2"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 221
- },
- "digest": "fbcf5078a6a9e09790553804054c36b3",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_doc/0",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 229
- },
- "digest": "5f6e080e8c400de205ea04bd19d215a3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"twitter\",\n \"_id\" : \"0\",\n \"_version\" : 1,\n \"_seq_no\" : 10,\n \"_primary_term\" : 1,\n \"found\": true,\n \"_source\" : {\n \"user\" : \"kimchy\",\n \"date\" : \"2009-11-15T14:12:12\",\n \"likes\": 0,\n \"message\" : \"trying out Elasticsearch\"\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 250
- },
- "digest": "98234499cfec70487cec5d013e976a84",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "HEAD twitter/_doc/0",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/twitter/_doc/0",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "exists"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 266
- },
- "digest": "89a8ac1509936acc272fc2d72907bc45",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_source/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_source/1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "get_source"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 275
- },
- "digest": "d222c6a6ec7a3beca6c97011b0874512",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_source/1/?_source_includes=*.id&_source_excludes=entities",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_source/1/",
- "query": {
- "_source_includes": "*.id",
- "_source_excludes": "entities"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "get_source"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 285
- },
- "digest": "2468ab381257d759d8a88af1141f6f9c",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "js"
- ],
- "source": "HEAD twitter/_source/1",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/twitter/_source/1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "exists_source"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 299
- },
- "digest": "913770050ebbf3b9b549a899bc11060a",
- "lang": "console",
- "found": [
- "csharp",
- "ruby",
- "js"
- ],
- "source": "PUT twitter\n{\n \"mappings\": {\n \"properties\": {\n \"counter\": {\n \"type\": \"integer\",\n \"store\": false\n },\n \"tags\": {\n \"type\": \"keyword\",\n \"store\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "counter": {
- "type": "integer",
- "store": false
- },
- "tags": {
- "type": "keyword",
- "store": true
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 320
- },
- "digest": "5eabcdbf61bfcb484dc694f25c2bba36",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "js"
- ],
- "source": "PUT twitter/_doc/1\n{\n \"counter\" : 1,\n \"tags\" : [\"red\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": null,
- "body": {
- "counter": 1,
- "tags": [
- "red"
- ]
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 332
- },
- "digest": "710c7871f20f176d51209b1574b0d61b",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_doc/1?stored_fields=tags,counter",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/1",
- "query": {
- "stored_fields": "tags,counter"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 340
- },
- "digest": "a515ae4a8553041c4f686412038e5978",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"twitter\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\" : 22,\n \"_primary_term\" : 1,\n \"found\": true,\n \"fields\": {\n \"tags\": [\n \"red\"\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 363
- },
- "digest": "0ba0b2db24852abccb7c0fc1098d566e",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "PUT twitter/_doc/2?routing=user1\n{\n \"counter\" : 1,\n \"tags\" : [\"white\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/2",
- "query": {
- "routing": "user1"
- },
- "body": {
- "counter": 1,
- "tags": [
- "white"
- ]
- },
- "params": {
- "index": "twitter",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 373
- },
- "digest": "69a7be47f85138b10437113ab2f0d72d",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "GET twitter/_doc/2?routing=user1&stored_fields=tags,counter",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/2",
- "query": {
- "routing": "user1",
- "stored_fields": "tags,counter"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "2"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 381
- },
- "digest": "80e8af862b4eeb6eb3f0afd38f6bc60a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"twitter\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"_seq_no\" : 13,\n \"_primary_term\" : 1,\n \"_routing\": \"user1\",\n \"found\": true,\n \"fields\": {\n \"tags\": [\n \"white\"\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/delete.asciidoc",
- "line": 71
- },
- "digest": "47b5ff897f26e9c943cee5c06034181d",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "DELETE /twitter/_doc/1?routing=kimchy",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter/_doc/1",
- "query": {
- "routing": "kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete.asciidoc",
- "line": 127
- },
- "digest": "d90a84a24a407731dfc1929ac8327746",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "DELETE /twitter/_doc/1?timeout=5m",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter/_doc/1",
- "query": {
- "timeout": "5m"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete.asciidoc",
- "line": 168
- },
- "digest": "c5e5873783246c7b1c01d8464fed72c4",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "js"
- ],
- "source": "DELETE /twitter/_doc/1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete.asciidoc",
- "line": 176
- },
- "digest": "9f752f60ae8a1a4239e90abb2a268c83",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"failed\" : 0,\n \"successful\" : 2\n },\n \"_index\" : \"twitter\",\n \"_id\" : \"1\",\n \"_version\" : 2,\n \"_primary_term\": 1,\n \"_seq_no\": 5,\n \"result\": \"deleted\"\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 10
- },
- "digest": "ebb6b59fbc9325c17e45f524602d6be2",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST /twitter/_delete_by_query\n{\n \"query\": {\n \"match\": {\n \"message\": \"some message\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "some message"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 262
- },
- "digest": "a24b5dac82c15039ba563caf3db32ce3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 147,\n \"timed_out\": false,\n \"total\": 119,\n \"deleted\": 119,\n \"batches\": 1,\n \"version_conflicts\": 0,\n \"noops\": 0,\n \"retries\": {\n \"bulk\": 0,\n \"search\": 0\n },\n \"throttled_millis\": 0,\n \"requests_per_second\": -1.0,\n \"throttled_until_millis\": 0,\n \"failures\" : [ ]\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 349
- },
- "digest": "e21e1c26dc8687e7bf7bd2bf019a6698",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_delete_by_query?conflicts=proceed\n{\n \"query\": {\n \"match_all\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": {
- "conflicts": "proceed"
- },
- "body": {
- "query": {
- "match_all": {}
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 362
- },
- "digest": "c22b72c4a52ee098331b3f252c22860d",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST /twitter,blog/_delete_by_query\n{\n \"query\": {\n \"match_all\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter,blog/_delete_by_query",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- }
- },
- "params": {
- "index": "twitter,blog"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 376
- },
- "digest": "c32a3f8071d87f0a3f5a78e07fe7a669",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_delete_by_query?routing=1\n{\n \"query\": {\n \"range\" : {\n \"age\" : {\n \"gte\" : 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": {
- "routing": "1"
- },
- "body": {
- "query": {
- "range": {
- "age": {
- "gte": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 394
- },
- "digest": "dfb1fe96d806a644214d06f9b4b87878",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_delete_by_query?scroll_size=5000\n{\n \"query\": {\n \"term\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": {
- "scroll_size": "5000"
- },
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 414
- },
- "digest": "1e49eba5b9042c1900a608fe5105ba43",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_delete_by_query\n{\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}\nPOST twitter/_delete_by_query\n{\n \"slice\": {\n \"id\": 1,\n \"max\": 2\n },\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": null,
- "body": {
- "slice": {
- "id": 0,
- "max": 2
- },
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- },
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": null,
- "body": {
- "slice": {
- "id": 1,
- "max": 2
- },
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 449
- },
- "digest": "3e573bfabe00f8bfb8bb69aa5820768e",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET _refresh\nPOST twitter/_search?size=0&filter_path=hits.total\n{\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_refresh",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0",
- "filter_path": "hits.total"
- },
- "body": {
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 467
- },
- "digest": "8521cf9682eb1df34207da8ab5de12ad",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 487
- },
- "digest": "a5a7050fb9dcb9574e081957ade28617",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_delete_by_query?refresh&slices=5\n{\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": {
- "refresh": true,
- "slices": "5"
- },
- "body": {
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 504
- },
- "digest": "14701dcc0cca9665fce2aace0cb62af7",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_search?size=0&filter_path=hits.total\n{\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0",
- "filter_path": "hits.total"
- },
- "body": {
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 521
- },
- "digest": "8521cf9682eb1df34207da8ab5de12ad",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 572
- },
- "digest": "52c7e4172a446c394210a07c464c57d2",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST _delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle",
- "query": {
- "requests_per_second": "-1"
- },
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "delete_by_query_rethrottle"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 586
- },
- "digest": "216848930c2d344fe0bed0daa70c35b9",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET _tasks?detailed=true&actions=*/delete/byquery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "detailed": "true",
- "actions": "*/delete/byquery"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 594
- },
- "digest": "5c29776e201b54f7442ddb0438479741",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\" : {\n \"r1A2WoRbTwKZ516z6NEs5A\" : {\n \"name\" : \"r1A2WoR\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"attributes\" : {\n \"testattr\" : \"test\",\n \"portsfile\" : \"true\"\n },\n \"tasks\" : {\n \"r1A2WoRbTwKZ516z6NEs5A:36619\" : {\n \"node\" : \"r1A2WoRbTwKZ516z6NEs5A\",\n \"id\" : 36619,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/write/delete/byquery\",\n \"status\" : { <1>\n \"total\" : 6154,\n \"updated\" : 0,\n \"created\" : 0,\n \"deleted\" : 3500,\n \"batches\" : 36,\n \"version_conflicts\" : 0,\n \"noops\" : 0,\n \"retries\": 0,\n \"throttled_millis\": 0\n },\n \"description\" : \"\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 640
- },
- "digest": "be3a6431d01846950dc1a39a7a6a1faa",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_tasks/r1A2WoRbTwKZ516z6NEs5A:36619",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks/r1A2WoRbTwKZ516z6NEs5A:36619",
- "query": null,
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "tasks.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 660
- },
- "digest": "18ddb7e7a4bcafd449df956e828ed7a8",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel",
- "query": null,
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "tasks.cancel"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 84
- },
- "digest": "381fced1882ca8337143e6bb180a5715",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT test/_doc/1\n{\n \"counter\" : 1,\n \"tags\" : [\"red\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": null,
- "body": {
- "counter": 1,
- "tags": [
- "red"
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 96
- },
- "digest": "96de5703ba0bd43fd4ac239ec5408542",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\" : {\n \"count\" : 4\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "ctx._source.counter += params.count",
- "lang": "painless",
- "params": {
- "count": 4
- }
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 114
- },
- "digest": "4cd246e5c4c035a2cd4081ae9a3d54e5",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"ctx._source.tags.add(params.tag)\",\n \"lang\": \"painless\",\n \"params\" : {\n \"tag\" : \"blue\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "ctx._source.tags.add(params.tag)",
- "lang": "painless",
- "params": {
- "tag": "blue"
- }
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 135
- },
- "digest": "ac544eb247a29ca42aab13826ca88561",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\",\n \"lang\": \"painless\",\n \"params\" : {\n \"tag\" : \"blue\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }",
- "lang": "painless",
- "params": {
- "tag": "blue"
- }
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 153
- },
- "digest": "eb30ba547e4a7b8f54f33ab259aca523",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : \"ctx._source.new_field = 'value_of_new_field'\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": "ctx._source.new_field = 'value_of_new_field'"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 164
- },
- "digest": "58df61acbfb15b8ef0aaa18b81ae98a6",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : \"ctx._source.remove('new_field')\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": "ctx._source.remove('new_field')"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 177
- },
- "digest": "98aeb275f829b5f7b8eb2147701565ff",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'none' }\",\n \"lang\": \"painless\",\n \"params\" : {\n \"tag\" : \"green\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'none' }",
- "lang": "painless",
- "params": {
- "tag": "green"
- }
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 198
- },
- "digest": "38c1d0f6668e9563c0827f839f9fa505",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"doc\" : {\n \"name\" : \"new_name\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "doc": {
- "name": "new_name"
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 218
- },
- "digest": "38c1d0f6668e9563c0827f839f9fa505",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"doc\" : {\n \"name\" : \"new_name\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "doc": {
- "name": "new_name"
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 232
- },
- "digest": "eded401dacfb0f3954ac7e65edcde530",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": {\n \"total\": 0,\n \"successful\": 0,\n \"failed\": 0\n },\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 7,\n \"_primary_term\": 1,\n \"_seq_no\": 6,\n \"result\": \"noop\"\n}"
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 251
- },
- "digest": "015294a400986295039e52ebc62033be",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"doc\" : {\n \"name\" : \"new_name\"\n },\n \"detect_noop\": false\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "doc": {
- "name": "new_name"
- },
- "detect_noop": false
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 271
- },
- "digest": "0a958e486ede3f519d48431ab689eded",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\" : {\n \"count\" : 4\n }\n },\n \"upsert\" : {\n \"counter\" : 1\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "ctx._source.counter += params.count",
- "lang": "painless",
- "params": {
- "count": 4
- }
- },
- "upsert": {
- "counter": 1
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 296
- },
- "digest": "f9636d7ef1a45be4f36418c875cf6bef",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST sessions/_update/dh3sgudg8gsrgl\n{\n \"scripted_upsert\":true,\n \"script\" : {\n \"id\": \"my_web_session_summariser\",\n \"params\" : {\n \"pageViewEvent\" : {\n \"url\":\"foo.com/bar\",\n \"response\":404,\n \"time\":\"2014-01-01 12:32\"\n }\n }\n },\n \"upsert\" : {}\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sessions/_update/dh3sgudg8gsrgl",
- "query": null,
- "body": {
- "scripted_upsert": true,
- "script": {
- "id": "my_web_session_summariser",
- "params": {
- "pageViewEvent": {
- "url": "foo.com/bar",
- "response": 404,
- "time": "2014-01-01 12:32"
- }
- }
- },
- "upsert": {}
- },
- "params": {
- "index": "sessions",
- "id": "dh3sgudg8gsrgl"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 325
- },
- "digest": "7cac05cb589f1614fd5b8589153bef06",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST test/_update/1\n{\n \"doc\" : {\n \"name\" : \"new_name\"\n },\n \"doc_as_upsert\" : true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "doc": {
- "name": "new_name"
- },
- "doc_as_upsert": true
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 12
- },
- "digest": "a4a396cd07657b3977713fb3a742c41b",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_update_by_query?conflicts=proceed",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "conflicts": "proceed"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 300
- },
- "digest": "52a87b81e4e0b6b11e23e85db1602a63",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_update_by_query?conflicts=proceed\n{\n \"query\": { <1>\n \"term\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "conflicts": "proceed"
- },
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 319
- },
- "digest": "cde4dddae5c06e7f1d38c9d933dbc7ac",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter,blog/_update_by_query",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter,blog/_update_by_query",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter,blog"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 327
- },
- "digest": "d8b115341da772a628a024e7d1644e73",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_update_by_query?routing=1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "routing": "1"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 336
- },
- "digest": "54a770f053f3225ea0d1e34334232411",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_update_by_query?scroll_size=100",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "scroll_size": "100"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 348
- },
- "digest": "2fd69fb0538e4f36ac69a8b8f8bf5ae8",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_update_by_query\n{\n \"script\": {\n \"source\": \"ctx._source.likes++\",\n \"lang\": \"painless\"\n },\n \"query\": {\n \"term\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": null,
- "body": {
- "script": {
- "source": "ctx._source.likes++",
- "lang": "painless"
- },
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 389
- },
- "digest": "c4b278ba293abd0d02a0b5ad1a99f84a",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT _ingest/pipeline/set-foo\n{\n \"description\" : \"sets foo\",\n \"processors\" : [ {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"bar\"\n }\n } ]\n}\nPOST twitter/_update_by_query?pipeline=set-foo",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/set-foo",
- "query": null,
- "body": {
- "description": "sets foo",
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "bar"
- }
- }
- ]
- },
- "params": {
- "id": "set-foo"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "pipeline": "set-foo"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 413
- },
- "digest": "7df191cc7f814e410a4ac7261065e6ef",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET _tasks?detailed=true&actions=*byquery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "detailed": "true",
- "actions": "*byquery"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 421
- },
- "digest": "f1296279330128c256ce88082d1de1e0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\" : {\n \"r1A2WoRbTwKZ516z6NEs5A\" : {\n \"name\" : \"r1A2WoR\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"attributes\" : {\n \"testattr\" : \"test\",\n \"portsfile\" : \"true\"\n },\n \"tasks\" : {\n \"r1A2WoRbTwKZ516z6NEs5A:36619\" : {\n \"node\" : \"r1A2WoRbTwKZ516z6NEs5A\",\n \"id\" : 36619,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/write/update/byquery\",\n \"status\" : { <1>\n \"total\" : 6154,\n \"updated\" : 3500,\n \"created\" : 0,\n \"deleted\" : 0,\n \"batches\" : 4,\n \"version_conflicts\" : 0,\n \"noops\" : 0,\n \"retries\": {\n \"bulk\": 0,\n \"search\": 0\n },\n \"throttled_millis\": 0\n },\n \"description\" : \"\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 471
- },
- "digest": "be3a6431d01846950dc1a39a7a6a1faa",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_tasks/r1A2WoRbTwKZ516z6NEs5A:36619",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks/r1A2WoRbTwKZ516z6NEs5A:36619",
- "query": null,
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "tasks.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 491
- },
- "digest": "18ddb7e7a4bcafd449df956e828ed7a8",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel",
- "query": null,
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "tasks.cancel"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 510
- },
- "digest": "bdb30dd52d32f50994008f4f9c0da5f0",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST _update_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_update_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle",
- "query": {
- "requests_per_second": "-1"
- },
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "update_by_query_rethrottle"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 530
- },
- "digest": "0d664883151008b1051ef2c9ab2d0373",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST twitter/_update_by_query\n{\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}\nPOST twitter/_update_by_query\n{\n \"slice\": {\n \"id\": 1,\n \"max\": 2\n },\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": null,
- "body": {
- "slice": {
- "id": 0,
- "max": 2
- },
- "script": {
- "source": "ctx._source['extra'] = 'test'"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- },
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": null,
- "body": {
- "slice": {
- "id": 1,
- "max": 2
- },
- "script": {
- "source": "ctx._source['extra'] = 'test'"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 557
- },
- "digest": "4acf902c2598b2558f34f20c1744c433",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET _refresh\nPOST twitter/_search?size=0&q=extra:test&filter_path=hits.total",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_refresh",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0",
- "q": "extra:test",
- "filter_path": "hits.total"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 566
- },
- "digest": "7792734b746340ee3771a7931f0ef7bd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\": {\n \"value\": 120,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 586
- },
- "digest": "ea02de2dbe05091fcb0dac72c8ba5f83",
- "lang": "console",
- "found": [],
- "source": "POST twitter/_update_by_query?refresh&slices=5\n{\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "refresh": true,
- "slices": "5"
- },
- "body": {
- "script": {
- "source": "ctx._source['extra'] = 'test'"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 599
- },
- "digest": "025b54db0edc50c24ea48a2bd94366ad",
- "lang": "console",
- "found": [],
- "source": "POST twitter/_search?size=0&q=extra:test&filter_path=hits.total",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0",
- "q": "extra:test",
- "filter_path": "hits.total"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 607
- },
- "digest": "7792734b746340ee3771a7931f0ef7bd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\": {\n \"value\": 120,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 655
- },
- "digest": "2fe28d9a91b3081a9ec4601af8fb7b1c",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"mappings\": {\n \"dynamic\": false, <1>\n \"properties\": {\n \"text\": {\"type\": \"text\"}\n }\n }\n}\n\nPOST test/_doc?refresh\n{\n \"text\": \"words words\",\n \"flag\": \"bar\"\n}\nPOST test/_doc?refresh\n{\n \"text\": \"words words\",\n \"flag\": \"foo\"\n}\nPUT test/_mapping <2>\n{\n \"properties\": {\n \"text\": {\"type\": \"text\"},\n \"flag\": {\"type\": \"text\", \"analyzer\": \"keyword\"}\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "dynamic": false,
- "properties": {
- "text": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/test/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "words words",
- "flag": "bar"
- },
- "params": {
- "index": "test"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "words words",
- "flag": "foo"
- },
- "params": {
- "index": "test"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_mapping",
- "query": null,
- "body": {
- "properties": {
- "text": {
- "type": "text"
- },
- "flag": {
- "type": "text",
- "analyzer": "keyword"
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 693
- },
- "digest": "abd4fc3ce7784413a56fe2dcfe2809b5",
- "lang": "console",
- "found": [],
- "source": "POST test/_search?filter_path=hits.total\n{\n \"query\": {\n \"match\": {\n \"flag\": \"foo\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": {
- "filter_path": "hits.total"
- },
- "body": {
- "query": {
- "match": {
- "flag": "foo"
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 706
- },
- "digest": "9c462a848a35c5bc6f82c3b55a80d56f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\" : {\n \"total\": {\n \"value\": 0,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 720
- },
- "digest": "97babc8d19ef0866774576716eb6d19e",
- "lang": "console",
- "found": [],
- "source": "POST test/_update_by_query?refresh&conflicts=proceed\nPOST test/_search?filter_path=hits.total\n{\n \"query\": {\n \"match\": {\n \"flag\": \"foo\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update_by_query",
- "query": {
- "refresh": true,
- "conflicts": "proceed"
- },
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "update_by_query"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": {
- "filter_path": "hits.total"
- },
- "body": {
- "query": {
- "match": {
- "flag": "foo"
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 734
- },
- "digest": "fd2e9d72fadf8ef650d0ab51ede61525",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\" : {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 10
- },
- "digest": "ccfaeef928ba7dd4b5de0c518151fd7c",
- "lang": "console",
- "found": [],
- "source": "GET /_mget\n{\n \"docs\" : [\n {\n \"_index\" : \"twitter\",\n \"_id\" : \"1\"\n },\n {\n \"_index\" : \"twitter\",\n \"_id\" : \"2\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_mget",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "twitter",
- "_id": "1"
- },
- {
- "_index": "twitter",
- "_id": "2"
- }
- ]
- },
- "params": null,
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 128
- },
- "digest": "53cf7d3731f50620b3277b80e2fbfd56",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_mget\n{\n \"docs\" : [\n {\n \"_id\" : \"1\"\n },\n {\n \"_id\" : \"2\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_mget",
- "query": null,
- "body": {
- "docs": [
- {
- "_id": "1"
- },
- {
- "_id": "2"
- }
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 146
- },
- "digest": "81095ba46e4d8c5da3623f5ea8c54a34",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_mget\n{\n \"ids\" : [\"1\", \"2\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_mget",
- "query": null,
- "body": {
- "ids": [
- "1",
- "2"
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 168
- },
- "digest": "6b1ab3f273c6e425067cd5889b0c258f",
- "lang": "console",
- "found": [],
- "source": "GET /_mget\n{\n \"docs\" : [\n {\n \"_index\" : \"test\",\n \"_id\" : \"1\",\n \"_source\" : false\n },\n {\n \"_index\" : \"test\",\n \"_id\" : \"2\",\n \"_source\" : [\"field3\", \"field4\"]\n },\n {\n \"_index\" : \"test\",\n \"_id\" : \"3\",\n \"_source\" : {\n \"include\": [\"user\"],\n \"exclude\": [\"user.location\"]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_mget",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "test",
- "_id": "1",
- "_source": false
- },
- {
- "_index": "test",
- "_id": "2",
- "_source": [
- "field3",
- "field4"
- ]
- },
- {
- "_index": "test",
- "_id": "3",
- "_source": {
- "include": [
- "user"
- ],
- "exclude": [
- "user.location"
- ]
- }
- }
- ]
- },
- "params": null,
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 206
- },
- "digest": "c4272ba35b81125a805fb1a7292f3d25",
- "lang": "console",
- "found": [],
- "source": "GET /_mget\n{\n \"docs\" : [\n {\n \"_index\" : \"test\",\n \"_id\" : \"1\",\n \"stored_fields\" : [\"field1\", \"field2\"]\n },\n {\n \"_index\" : \"test\",\n \"_id\" : \"2\",\n \"stored_fields\" : [\"field3\", \"field4\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_mget",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "test",
- "_id": "1",
- "stored_fields": [
- "field1",
- "field2"
- ]
- },
- {
- "_index": "test",
- "_id": "2",
- "stored_fields": [
- "field3",
- "field4"
- ]
- }
- ]
- },
- "params": null,
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 229
- },
- "digest": "27fac828d28ab065524dd1ce148840c0",
- "lang": "console",
- "found": [],
- "source": "GET /test/_mget?stored_fields=field1,field2\n{\n \"docs\" : [\n {\n \"_id\" : \"1\"\n },\n {\n \"_id\" : \"2\",\n \"stored_fields\" : [\"field3\", \"field4\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_mget",
- "query": {
- "stored_fields": "field1,field2"
- },
- "body": {
- "docs": [
- {
- "_id": "1"
- },
- {
- "_id": "2",
- "stored_fields": [
- "field3",
- "field4"
- ]
- }
- ]
- },
- "params": {
- "index": "test"
- },
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 252
- },
- "digest": "1b37488d0a79d3c950029851b7cd623e",
- "lang": "console",
- "found": [],
- "source": "GET /_mget?routing=key1\n{\n \"docs\" : [\n {\n \"_index\" : \"test\",\n \"_id\" : \"1\",\n \"routing\" : \"key2\"\n },\n {\n \"_index\" : \"test\",\n \"_id\" : \"2\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_mget",
- "query": {
- "routing": "key1"
- },
- "body": {
- "docs": [
- {
- "_index": "test",
- "_id": "1",
- "routing": "key2"
- },
- {
- "_index": "test",
- "_id": "2"
- }
- ]
- },
- "params": null,
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 11
- },
- "digest": "ae9ccfaa146731ab9176df90670db1c2",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "POST _bulk\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_bulk",
- "query": null,
- "body": [
- {
- "index": {
- "_index": "test",
- "_id": "1"
- }
- },
- {
- "field1": "value1"
- },
- {
- "delete": {
- "_index": "test",
- "_id": "2"
- }
- },
- {
- "create": {
- "_index": "test",
- "_id": "3"
- }
- },
- {
- "field1": "value3"
- },
- {
- "update": {
- "_id": "1",
- "_index": "test"
- }
- },
- {
- "doc": {
- "field2": "value2"
- }
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 294
- },
- "digest": "ae9ccfaa146731ab9176df90670db1c2",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "POST _bulk\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_bulk",
- "query": null,
- "body": [
- {
- "index": {
- "_index": "test",
- "_id": "1"
- }
- },
- {
- "field1": "value1"
- },
- {
- "delete": {
- "_index": "test",
- "_id": "2"
- }
- },
- {
- "create": {
- "_index": "test",
- "_id": "3"
- }
- },
- {
- "field1": "value3"
- },
- {
- "update": {
- "_id": "1",
- "_index": "test"
- }
- },
- {
- "doc": {
- "field2": "value2"
- }
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 308
- },
- "digest": "6e8127305ead40f2b6dd2ef3b99a9eca",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 30,\n \"errors\": false,\n \"items\": [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 0,\n \"_primary_term\": 1\n }\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"result\": \"not_found\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 404,\n \"_seq_no\" : 1,\n \"_primary_term\" : 2\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 2,\n \"_primary_term\" : 3\n }\n },\n {\n \"update\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"result\": \"updated\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 200,\n \"_seq_no\" : 3,\n \"_primary_term\" : 4\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 405
- },
- "digest": "8cd00a3aba7c3c158277bc032aac2830",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "POST _bulk\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : { \"_id\" : \"0\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"script\" : { \"source\": \"ctx._source.counter += params.param1\", \"lang\" : \"painless\", \"params\" : {\"param1\" : 1}}, \"upsert\" : {\"counter\" : 1}}\n{ \"update\" : {\"_id\" : \"2\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"}, \"doc_as_upsert\" : true }\n{ \"update\" : {\"_id\" : \"3\", \"_index\" : \"index1\", \"_source\" : true} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : {\"_id\" : \"4\", \"_index\" : \"index1\"} }\n{ \"doc\" : {\"field\" : \"value\"}, \"_source\": true}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_bulk",
- "query": null,
- "body": [
- {
- "update": {
- "_id": "1",
- "_index": "index1",
- "retry_on_conflict": 3
- }
- },
- {
- "doc": {
- "field": "value"
- }
- },
- {
- "update": {
- "_id": "0",
- "_index": "index1",
- "retry_on_conflict": 3
- }
- },
- {
- "script": {
- "source": "ctx._source.counter += params.param1",
- "lang": "painless",
- "params": {
- "param1": 1
- }
- },
- "upsert": {
- "counter": 1
- }
- },
- {
- "update": {
- "_id": "2",
- "_index": "index1",
- "retry_on_conflict": 3
- }
- },
- {
- "doc": {
- "field": "value"
- },
- "doc_as_upsert": true
- },
- {
- "update": {
- "_id": "3",
- "_index": "index1",
- "_source": true
- }
- },
- {
- "doc": {
- "field": "value"
- }
- },
- {
- "update": {
- "_id": "4",
- "_index": "index1"
- }
- },
- {
- "doc": {
- "field": "value"
- },
- "_source": true
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 20
- },
- "digest": "0cc991e3f7f8511a34730e154b3c5edc",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\"\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter"
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 161
- },
- "digest": "68738b4fd0dda177022be45be95b4c84",
- "lang": "console",
- "found": [],
- "source": "POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle",
- "query": {
- "requests_per_second": "-1"
- },
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "reindex_rethrottle"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 191
- },
- "digest": "1b8655e6ba99fe39933c6eafe78728b7",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}\nPOST _reindex\n{\n \"source\": {\n \"index\": \"twitter\",\n \"slice\": {\n \"id\": 1,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter",
- "slice": {
- "id": 0,
- "max": 2
- }
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- },
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter",
- "slice": {
- "id": 1,
- "max": 2
- }
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 224
- },
- "digest": "3ae03ba3b56e5e287953094050766738",
- "lang": "console",
- "found": [],
- "source": "GET _refresh\nPOST new_twitter/_search?size=0&filter_path=hits.total",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_refresh",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/new_twitter/_search",
- "query": {
- "size": "0",
- "filter_path": "hits.total"
- },
- "body": null,
- "params": {
- "index": "new_twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 233
- },
- "digest": "7e3ab9b4b60726e0dbe92612d2c4cd9d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\" : {\n \"value\": 120,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 251
- },
- "digest": "cb01106bf524df5e0501d4c655c1aa7b",
- "lang": "console",
- "found": [],
- "source": "POST _reindex?slices=5&refresh\n{\n \"source\": {\n \"index\": \"twitter\"\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": {
- "slices": "5",
- "refresh": true
- },
- "body": {
- "source": {
- "index": "twitter"
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 267
- },
- "digest": "e567e6dbf86300142573c73789c8fce4",
- "lang": "console",
- "found": [],
- "source": "POST new_twitter/_search?size=0&filter_path=hits.total",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/new_twitter/_search",
- "query": {
- "size": "0",
- "filter_path": "hits.total"
- },
- "body": null,
- "params": {
- "index": "new_twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 275
- },
- "digest": "7e3ab9b4b60726e0dbe92612d2c4cd9d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\" : {\n \"value\": 120,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 359
- },
- "digest": "78c96113ae4ed0054e581b17542528a7",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "source",
- "query": {
- "match": {
- "company": "cat"
- }
- }
- },
- "dest": {
- "index": "dest",
- "routing": "=cat"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 384
- },
- "digest": "400e89eb46ead8e9c9e40f123fd5e590",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"source\",\n \"size\": 100\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "source",
- "size": 100
- },
- "dest": {
- "index": "dest",
- "routing": "=cat"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 403
- },
- "digest": "b1efa1c51a34dd5ab5511b71a399f5b1",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"source\"\n },\n \"dest\": {\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "source"
- },
- "dest": {
- "index": "dest",
- "pipeline": "some_ingest_pipeline"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 592
- },
- "digest": "764f9884b370cbdc82a1c5c42ed40ff3",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\",\n \"query\": {\n \"term\": {\n \"user\": \"kimchy\"\n }\n }\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter",
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 618
- },
- "digest": "52b2bfbdd78f8283b6f4891c48013237",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"max_docs\": 1,\n \"source\": {\n \"index\": \"twitter\"\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "max_docs": 1,
- "source": {
- "index": "twitter"
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 640
- },
- "digest": "6f097c298a7abf4c032c4314920c49c8",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": [\"twitter\", \"blog\"]\n },\n \"dest\": {\n \"index\": \"all_together\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": [
- "twitter",
- "blog"
- ]
- },
- "dest": {
- "index": "all_together"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 666
- },
- "digest": "e9c2e15b36372d5281c879d336322b6c",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\",\n \"_source\": [\"user\", \"_doc\"]\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter",
- "_source": [
- "user",
- "_doc"
- ]
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 687
- },
- "digest": "1577e6e806b3283c9e99f1596d310754",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/1?refresh\n{\n \"text\": \"words words\",\n \"flag\": \"foo\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "words words",
- "flag": "foo"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 699
- },
- "digest": "1216f8f7367df3aa823012cef310c08a",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"test\"\n },\n \"dest\": {\n \"index\": \"test2\"\n },\n \"script\": {\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "test"
- },
- "dest": {
- "index": "test2"
- },
- "script": {
- "source": "ctx._source.tag = ctx._source.remove(\"flag\")"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 718
- },
- "digest": "cfc37446bd892d1ac42a3c8e8b204e6c",
- "lang": "console",
- "found": [],
- "source": "GET test2/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test2/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "test2",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 726
- },
- "digest": "e0871039b4f1625c6af6df7a88a2a7c9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"1\",\n \"_index\": \"test2\",\n \"_version\": 1,\n \"_seq_no\": 44,\n \"_primary_term\": 1,\n \"_source\": {\n \"text\": \"words words\",\n \"tag\": \"foo\"\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 751
- },
- "digest": "9a4d5e41c52c20635d1fd9c6e13f6c7a",
- "lang": "console",
- "found": [],
- "source": "PUT metricbeat-2016.05.30/_doc/1?refresh\n{\"system.cpu.idle.pct\": 0.908}\nPUT metricbeat-2016.05.31/_doc/1?refresh\n{\"system.cpu.idle.pct\": 0.105}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/metricbeat-2016.05.30/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "system.cpu.idle.pct": 0.908
- },
- "params": {
- "index": "metricbeat-2016.05.30",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/metricbeat-2016.05.31/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "system.cpu.idle.pct": 0.105
- },
- "params": {
- "index": "metricbeat-2016.05.31",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 767
- },
- "digest": "973a3ff47fc4ce036ecd9bd363fef9f7",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"metricbeat-*\"\n },\n \"dest\": {\n \"index\": \"metricbeat\"\n },\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "metricbeat-*"
- },
- "dest": {
- "index": "metricbeat"
- },
- "script": {
- "lang": "painless",
- "source": "ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 787
- },
- "digest": "3b04cc894e6a47d57983484010feac0c",
- "lang": "console",
- "found": [],
- "source": "GET metricbeat-2016.05.30-1/_doc/1\nGET metricbeat-2016.05.31-1/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/metricbeat-2016.05.30-1/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "metricbeat-2016.05.30-1",
- "id": "1"
- },
- "api": "get"
- },
- {
- "method": "GET",
- "url": "/metricbeat-2016.05.31-1/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "metricbeat-2016.05.31-1",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 802
- },
- "digest": "1bc731a4df952228af6dfa6b48627332",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"max_docs\": 10,\n \"source\": {\n \"index\": \"twitter\",\n \"query\": {\n \"function_score\" : {\n \"random_score\" : {},\n \"min_score\" : 0.9 <1>\n }\n }\n },\n \"dest\": {\n \"index\": \"random_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "max_docs": 10,
- "source": {
- "index": "twitter",
- "query": {
- "function_score": {
- "random_score": {},
- "min_score": 0.9
- }
- }
- },
- "dest": {
- "index": "random_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 833
- },
- "digest": "8871b8fcb6de4f0c7dff22798fb10fb7",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\"\n },\n \"dest\": {\n \"index\": \"new_twitter\",\n \"version_type\": \"external\"\n },\n \"script\": {\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter"
- },
- "dest": {
- "index": "new_twitter",
- "version_type": "external"
- },
- "script": {
- "source": "if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}",
- "lang": "painless"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 888
- },
- "digest": "36b2778f23d0955255f52c075c4d213d",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "remote": {
- "host": "http://otherhost:9200",
- "username": "user",
- "password": "pass"
- },
- "index": "source",
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "dest": {
- "index": "dest"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 955
- },
- "digest": "64b9baa6d7556b960b29698f3383aa31",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\"\n },\n \"index\": \"source\",\n \"size\": 10,\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "remote": {
- "host": "http://otherhost:9200"
- },
- "index": "source",
- "size": 10,
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "dest": {
- "index": "dest"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 986
- },
- "digest": "7f697eb436dfa3c30dfe610d8c32d132",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"socket_timeout\": \"1m\",\n \"connect_timeout\": \"10s\"\n },\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "remote": {
- "host": "http://otherhost:9200",
- "socket_timeout": "1m",
- "connect_timeout": "10s"
- },
- "index": "source",
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "dest": {
- "index": "dest"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 10
- },
- "digest": "4c9b1db368186091c1a660bcd52890b8",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors/1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 30
- },
- "digest": "a15ca7faa8ba282679396de3c7b90485",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors/1?fields=message",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors/1",
- "query": {
- "fields": "message"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 171
- },
- "digest": "587dd0c1aebbc1d93190bf117959cb73",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter\n{ \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"term_vector\": \"with_positions_offsets_payloads\",\n \"store\" : true,\n \"analyzer\" : \"fulltext_analyzer\"\n },\n \"fullname\": {\n \"type\": \"text\",\n \"term_vector\": \"with_positions_offsets_payloads\",\n \"analyzer\" : \"fulltext_analyzer\"\n }\n }\n },\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : 1,\n \"number_of_replicas\" : 0\n },\n \"analysis\": {\n \"analyzer\": {\n \"fulltext_analyzer\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n \"type_as_payload\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "term_vector": "with_positions_offsets_payloads",
- "store": true,
- "analyzer": "fulltext_analyzer"
- },
- "fullname": {
- "type": "text",
- "term_vector": "with_positions_offsets_payloads",
- "analyzer": "fulltext_analyzer"
- }
- }
- },
- "settings": {
- "index": {
- "number_of_shards": 1,
- "number_of_replicas": 0
- },
- "analysis": {
- "analyzer": {
- "fulltext_analyzer": {
- "type": "custom",
- "tokenizer": "whitespace",
- "filter": [
- "lowercase",
- "type_as_payload"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 212
- },
- "digest": "3dbccd70f0a20ff7a8a2a4ee7ec406ed",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_doc/1\n{\n \"fullname\" : \"John Doe\",\n \"text\" : \"twitter test test test \"\n}\n\nPUT /twitter/_doc/2\n{\n \"fullname\" : \"Jane Doe\",\n \"text\" : \"Another twitter test ...\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": null,
- "body": {
- "fullname": "John Doe",
- "text": "twitter test test test "
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/twitter/_doc/2",
- "query": null,
- "body": {
- "fullname": "Jane Doe",
- "text": "Another twitter test ..."
- },
- "params": {
- "index": "twitter",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 231
- },
- "digest": "8dfecbb38a81fb5b42f63d6fe9bf9278",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors/1\n{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors/1",
- "query": null,
- "body": {
- "fields": [
- "text"
- ],
- "offsets": true,
- "payloads": true,
- "positions": true,
- "term_statistics": true,
- "field_statistics": true
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 247
- },
- "digest": "3639075426ee76c307487d67d22a08dc",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_id\": \"1\",\n \"_index\": \"twitter\",\n \"_version\": 1,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"text\": {\n \"field_statistics\": {\n \"doc_count\": 2,\n \"sum_doc_freq\": 6,\n \"sum_ttf\": 8\n },\n \"terms\": {\n \"test\": {\n \"doc_freq\": 2,\n \"term_freq\": 3,\n \"tokens\": [\n {\n \"end_offset\": 12,\n \"payload\": \"d29yZA==\",\n \"position\": 1,\n \"start_offset\": 8\n },\n {\n \"end_offset\": 17,\n \"payload\": \"d29yZA==\",\n \"position\": 2,\n \"start_offset\": 13\n },\n {\n \"end_offset\": 22,\n \"payload\": \"d29yZA==\",\n \"position\": 3,\n \"start_offset\": 18\n }\n ],\n \"ttf\": 4\n },\n \"twitter\": {\n \"doc_freq\": 2,\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"end_offset\": 7,\n \"payload\": \"d29yZA==\",\n \"position\": 0,\n \"start_offset\": 0\n }\n ],\n \"ttf\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 317
- },
- "digest": "487d12bb3e3036c4493dcbe43191b6f0",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors/1\n{\n \"fields\" : [\"text\", \"some_field_without_term_vectors\"],\n \"offsets\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors/1",
- "query": null,
- "body": {
- "fields": [
- "text",
- "some_field_without_term_vectors"
- ],
- "offsets": true,
- "positions": true,
- "term_statistics": true,
- "field_statistics": true
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 340
- },
- "digest": "1f580df38ae517800d0c62d9648ebcb9",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors\n{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"twitter test test test\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors",
- "query": null,
- "body": {
- "doc": {
- "fullname": "John Doe",
- "text": "twitter test test test"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 361
- },
- "digest": "8304a9c1ae8d0329b66ba57fb8263485",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors\n{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"twitter test test test\"\n },\n \"fields\": [\"fullname\"],\n \"per_field_analyzer\" : {\n \"fullname\": \"keyword\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors",
- "query": null,
- "body": {
- "doc": {
- "fullname": "John Doe",
- "text": "twitter test test test"
- },
- "fields": [
- "fullname"
- ],
- "per_field_analyzer": {
- "fullname": "keyword"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 379
- },
- "digest": "2079609f3e3ed939f7c717eccb061037",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"twitter\",\n \"_version\": 0,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"fullname\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 2,\n \"doc_count\": 4,\n \"sum_ttf\": 4\n },\n \"terms\": {\n \"John Doe\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 8\n }\n ]\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 425
- },
- "digest": "ef3b210782fe58df252d0e805b8ef644",
- "lang": "console",
- "found": [],
- "source": "GET /imdb/_termvectors\n{\n \"doc\": {\n \"plot\": \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"\n },\n \"term_statistics\" : true,\n \"field_statistics\" : true,\n \"positions\": false,\n \"offsets\": false,\n \"filter\" : {\n \"max_num_terms\" : 3,\n \"min_term_freq\" : 1,\n \"min_doc_freq\" : 1\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/imdb/_termvectors",
- "query": null,
- "body": {
- "doc": {
- "plot": "When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil."
- },
- "term_statistics": true,
- "field_statistics": true,
- "positions": false,
- "offsets": false,
- "filter": {
- "max_num_terms": 3,
- "min_term_freq": 1,
- "min_doc_freq": 1
- }
- },
- "params": {
- "index": "imdb"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 447
- },
- "digest": "9582cab412650ffe53fd17791199cbf8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"imdb\",\n \"_version\": 0,\n \"found\": true,\n \"term_vectors\": {\n \"plot\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 3384269,\n \"doc_count\": 176214,\n \"sum_ttf\": 3753460\n },\n \"terms\": {\n \"armored\": {\n \"doc_freq\": 27,\n \"ttf\": 27,\n \"term_freq\": 1,\n \"score\": 9.74725\n },\n \"industrialist\": {\n \"doc_freq\": 88,\n \"ttf\": 88,\n \"term_freq\": 1,\n \"score\": 8.590818\n },\n \"stark\": {\n \"doc_freq\": 44,\n \"ttf\": 47,\n \"term_freq\": 1,\n \"score\": 9.272792\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/multi-termvectors.asciidoc",
- "line": 10
- },
- "digest": "c6d18f08822463356b297f238c6650d9",
- "lang": "console",
- "found": [],
- "source": "POST /_mtermvectors\n{\n \"docs\": [\n {\n \"_index\": \"twitter\",\n \"_id\": \"2\",\n \"term_statistics\": true\n },\n {\n \"_index\": \"twitter\",\n \"_id\": \"1\",\n \"fields\": [\n \"message\"\n ]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_mtermvectors",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "twitter",
- "_id": "2",
- "term_statistics": true
- },
- {
- "_index": "twitter",
- "_id": "1",
- "fields": [
- "message"
- ]
- }
- ]
- },
- "params": null,
- "api": "mtermvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-termvectors.asciidoc",
- "line": 91
- },
- "digest": "2c8638acc208bd0a47403c1f054fde21",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_mtermvectors\n{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_mtermvectors",
- "query": null,
- "body": {
- "docs": [
- {
- "_id": "2",
- "fields": [
- "message"
- ],
- "term_statistics": true
- },
- {
- "_id": "1"
- }
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "mtermvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-termvectors.asciidoc",
- "line": 114
- },
- "digest": "f31eea58baf0dbd39823ff9100c9ce28",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_mtermvectors\n{\n \"ids\" : [\"1\", \"2\"],\n \"parameters\": {\n \t\"fields\": [\n \t\"message\"\n \t],\n \t\"term_statistics\": true\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_mtermvectors",
- "query": null,
- "body": {
- "ids": [
- "1",
- "2"
- ],
- "parameters": {
- "fields": [
- "message"
- ],
- "term_statistics": true
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "mtermvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-termvectors.asciidoc",
- "line": 135
- },
- "digest": "29840a67fdc13cd329ca2c69a2303e83",
- "lang": "console",
- "found": [],
- "source": "POST /_mtermvectors\n{\n \"docs\": [\n {\n \"_index\": \"twitter\",\n \"doc\" : {\n \"user\" : \"John Doe\",\n \"message\" : \"twitter test test test\"\n }\n },\n {\n \"_index\": \"twitter\",\n \"doc\" : {\n \"user\" : \"Jane Doe\",\n \"message\" : \"Another twitter test ...\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_mtermvectors",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "twitter",
- "doc": {
- "user": "John Doe",
- "message": "twitter test test test"
- }
- },
- {
- "_index": "twitter",
- "doc": {
- "user": "Jane Doe",
- "message": "Another twitter test ..."
- }
- }
- ]
- },
- "params": null,
- "api": "mtermvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/refresh.asciidoc",
- "line": 87
- },
- "digest": "92d343eb755971c44a939d0660bf5ac2",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/1?refresh\n{\"test\": \"test\"}\nPUT /test/_doc/2?refresh=true\n{\"test\": \"test\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/2",
- "query": {
- "refresh": "true"
- },
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/refresh.asciidoc",
- "line": 98
- },
- "digest": "1070e59ba144cdf309fd9b2591612b95",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/3\n{\"test\": \"test\"}\nPUT /test/_doc/4?refresh=false\n{\"test\": \"test\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/3",
- "query": null,
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/4",
- "query": {
- "refresh": "false"
- },
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "4"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/refresh.asciidoc",
- "line": 108
- },
- "digest": "e4b2b5e0aaedf3cbbcde3d61eb1f13fc",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/4?refresh=wait_for\n{\"test\": \"test\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/4",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "4"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 24
- },
- "digest": "cffc8b207f354beb6d76c8d334cab677",
- "lang": "console",
- "found": [],
- "source": "PUT products/_doc/1567\n{\n \"product\" : \"r2d2\",\n \"details\" : \"A resourceful astromech droid\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/products/_doc/1567",
- "query": null,
- "body": {
- "product": "r2d2",
- "details": "A resourceful astromech droid"
- },
- "params": {
- "index": "products",
- "id": "1567"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 36
- },
- "digest": "e5e8f96d80239e4f815bbaef781fe621",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"failed\" : 0,\n \"successful\" : 1\n },\n \"_index\" : \"products\",\n \"_id\" : \"1567\",\n \"_version\" : 1,\n \"_seq_no\" : 362,\n \"_primary_term\" : 2,\n \"result\" : \"created\"\n}"
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 60
- },
- "digest": "278d5bfa1a01f91d5c84679ef1bca390",
- "lang": "console",
- "found": [],
- "source": "GET products/_doc/1567",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/products/_doc/1567",
- "query": null,
- "body": null,
- "params": {
- "index": "products",
- "id": "1567"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 68
- },
- "digest": "79dc2fd91caf6b96f0441a8b40a81304",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"products\",\n \"_id\" : \"1567\",\n \"_version\" : 1,\n \"_seq_no\" : 362,\n \"_primary_term\" : 2,\n \"found\": true,\n \"_source\" : {\n \"product\" : \"r2d2\",\n \"details\" : \"A resourceful astromech droid\"\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 99
- },
- "digest": "ac24941027452bdafe82b4bd7edf9000",
- "lang": "console",
- "found": [],
- "source": "PUT products/_doc/1567?if_seq_no=362&if_primary_term=2\n{\n \"product\" : \"r2d2\",\n \"details\" : \"A resourceful astromech droid\",\n \"tags\": [\"droid\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/products/_doc/1567",
- "query": {
- "if_seq_no": "362",
- "if_primary_term": "2"
- },
- "body": {
- "product": "r2d2",
- "details": "A resourceful astromech droid",
- "tags": [
- "droid"
- ]
- },
- "params": {
- "index": "products",
- "id": "1567"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/put-enrich-policy.asciidoc",
- "line": 26
- },
- "digest": "e15a5bb869d24668207b9b4629744be4",
- "lang": "console",
- "found": [],
- "source": "PUT /_enrich/policy/my-policy\n{\n \"match\": {\n \"indices\": \"users\",\n \"match_field\": \"email\",\n \"enrich_fields\": [\"first_name\", \"last_name\", \"city\", \"zip\", \"state\"]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_enrich/policy/my-policy",
- "query": null,
- "body": {
- "match": {
- "indices": "users",
- "match_field": "email",
- "enrich_fields": [
- "first_name",
- "last_name",
- "city",
- "zip",
- "state"
- ]
- }
- },
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.put_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/delete-enrich-policy.asciidoc",
- "line": 37
- },
- "digest": "cdd29b01e730b3996de68a2788050021",
- "lang": "console",
- "found": [],
- "source": "DELETE /_enrich/policy/my-policy",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_enrich/policy/my-policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.delete_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 44
- },
- "digest": "af18f5c5fb2364ae23c6a14431820aba",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/policy/my-policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/policy/my-policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.get_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 87
- },
- "digest": "af18f5c5fb2364ae23c6a14431820aba",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/policy/my-policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/policy/my-policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.get_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 95
- },
- "digest": "b11d9c9bd14d764f81cd15b547fe6d58",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"policies\": [\n {\n \"config\": {\n \"match\": {\n \"name\" : \"my-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 123
- },
- "digest": "8684589e31d96ab229e8c4feb4d704bb",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/policy/my-policy,other-policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/policy/my-policy,other-policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy,other-policy"
- },
- "api": "enrich.get_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 131
- },
- "digest": "8f4565d05f90952c8cfb69f30347c73d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"policies\": [\n {\n \"config\": {\n \"match\": {\n \"name\" : \"my-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n },\n {\n \"config\": {\n \"match\": {\n \"name\" : \"other-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 175
- },
- "digest": "c97fd95ebdcf56cc973582e37f732ed2",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/policy",
- "query": null,
- "body": null,
- "params": null,
- "api": "enrich.get_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 183
- },
- "digest": "8f4565d05f90952c8cfb69f30347c73d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"policies\": [\n {\n \"config\": {\n \"match\": {\n \"name\" : \"my-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n },\n {\n \"config\": {\n \"match\": {\n \"name\" : \"other-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/execute-enrich-policy.asciidoc",
- "line": 40
- },
- "digest": "66c64bffe3a15cf260baa0c0118aa4ea",
- "lang": "console",
- "found": [],
- "source": "PUT /_enrich/policy/my-policy/_execute",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_enrich/policy/my-policy/_execute",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.execute_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/enrich-stats.asciidoc",
- "line": 14
- },
- "digest": "84e2cf7417c9e0c9e6f3c23031001440",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/_stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "enrich.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/enrich-stats.asciidoc",
- "line": 94
- },
- "digest": "84e2cf7417c9e0c9e6f3c23031001440",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/_stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "enrich.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/enrich-stats.asciidoc",
- "line": 102
- },
- "digest": "112d678d90cb37dc475f53ebac76d1b7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"executing_policies\": [\n {\n \"name\": \"my-policy\",\n \"task\": {\n \"id\" : 124,\n \"type\" : \"direct\",\n \"action\" : \"cluster:admin/xpack/enrich/execute\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 47402,\n \"cancellable\" : false,\n \"parent_task_id\" : \"oTUltX4IQMOUUVeiohTt8A:123\",\n \"headers\" : {\n \"X-Opaque-Id\" : \"123456\"\n }\n }\n }\n ],\n \"coordinator_stats\": [\n {\n \"node_id\": \"1sFM8cmSROZYhPxVsiWew\",\n \"queue_size\": 0,\n \"remote_requests_current\": 0,\n \"remote_requests_total\": 0,\n \"executed_searches_total\": 0\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "graph/explore.asciidoc",
- "line": 185
- },
- "digest": "8bf5ac11eb42e652023a685af4a45ae2",
- "lang": "console",
- "found": [],
- "source": "POST clicklogs/_graph/explore\n{\n \"query\": { <1>\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [ <2>\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": { <3>\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/clicklogs/_graph/explore",
- "query": null,
- "body": {
- "query": {
- "match": {
- "query.raw": "midi"
- }
- },
- "vertices": [
- {
- "field": "product"
- }
- ],
- "connections": {
- "vertices": [
- {
- "field": "query.raw"
- }
- ]
- }
- },
- "params": {
- "index": "clicklogs"
- },
- "api": "graph.explore"
- }
- ]
- },
- {
- "source_location": {
- "file": "graph/explore.asciidoc",
- "line": 290
- },
- "digest": "6a1a238984d74771420d150dec47fd91",
- "lang": "console",
- "found": [],
- "source": "POST clicklogs/_graph/explore\n{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"controls\": {\n \"use_significance\": false,<1>\n \"sample_size\": 2000,<2>\n \"timeout\": 2000,<3>\n \"sample_diversity\": {<4>\n \"field\": \"category.raw\",\n \"max_docs_per_value\": 500\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\",\n \"size\": 5,<5>\n \"min_doc_count\": 10,<6>\n \"shard_min_doc_count\": 3<7>\n }\n ],\n \"connections\": {\n \"query\": {<8>\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"query_time\": {\n \"gte\": \"2015-10-01 00:00:00\"\n }\n }\n }\n ]\n }\n },\n \"vertices\": [\n {\n \"field\": \"query.raw\",\n \"size\": 5,\n \"min_doc_count\": 10,\n \"shard_min_doc_count\": 3\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/clicklogs/_graph/explore",
- "query": null,
- "body": {
- "query": {
- "match": {
- "query.raw": "midi"
- }
- },
- "controls": {
- "use_significance": false,
- "sample_size": 2000,
- "timeout": 2000,
- "sample_diversity": {
- "field": "category.raw",
- "max_docs_per_value": 500
- }
- },
- "vertices": [
- {
- "field": "product",
- "size": 5,
- "min_doc_count": 10,
- "shard_min_doc_count": 3
- }
- ],
- "connections": {
- "query": {
- "bool": {
- "filter": [
- {
- "range": {
- "query_time": {
- "gte": "2015-10-01 00:00:00"
- }
- }
- }
- ]
- }
- },
- "vertices": [
- {
- "field": "query.raw",
- "size": 5,
- "min_doc_count": 10,
- "shard_min_doc_count": 3
- }
- ]
- }
- },
- "params": {
- "index": "clicklogs"
- },
- "api": "graph.explore"
- }
- ]
- },
- {
- "source_location": {
- "file": "graph/explore.asciidoc",
- "line": 377
- },
- "digest": "fa82d86a046d67366cfe9ce65535e433",
- "lang": "console",
- "found": [],
- "source": "POST clicklogs/_graph/explore\n{\n \"vertices\": [\n {\n \"field\": \"product\",\n \"include\": [ \"1854873\" ] <1>\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\",\n \"exclude\": [ <2>\n \"midi keyboard\",\n \"midi\",\n \"synth\"\n ]\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/clicklogs/_graph/explore",
- "query": null,
- "body": {
- "vertices": [
- {
- "field": "product",
- "include": [
- "1854873"
- ]
- }
- ],
- "connections": {
- "vertices": [
- {
- "field": "query.raw",
- "exclude": [
- "midi keyboard",
- "midi",
- "synth"
- ]
- }
- ]
- }
- },
- "params": {
- "index": "clicklogs"
- },
- "api": "graph.explore"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 12
- },
- "digest": "394aabe7029e4d0741ae6965c6fae5ac",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_alias/alias1",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_alias/alias1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "name": "alias1"
- },
- "api": "indices.put_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 71
- },
- "digest": "7fe8339ce3911382a7c473f6f0c03f89",
- "lang": "console",
- "found": [],
- "source": "PUT /logs_20302801/_alias/2030",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs_20302801/_alias/2030",
- "query": null,
- "body": null,
- "params": {
- "index": "logs_20302801",
- "name": "2030"
- },
- "api": "indices.put_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 83
- },
- "digest": "890f659cfc10ff8171420809bdcf7c67",
- "lang": "console",
- "found": [],
- "source": "PUT /users\n{\n \"mappings\" : {\n \"properties\" : {\n \"user_id\" : {\"type\" : \"integer\"}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "integer"
- }
- }
- }
- },
- "params": {
- "index": "users"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 97
- },
- "digest": "83b2785e63357ab3ade51d8ec0c11917",
- "lang": "console",
- "found": [],
- "source": "PUT /users/_alias/user_12\n{\n \"routing\" : \"12\",\n \"filter\" : {\n \"term\" : {\n \"user_id\" : 12\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users/_alias/user_12",
- "query": null,
- "body": {
- "routing": "12",
- "filter": {
- "term": {
- "user_id": 12
- }
- }
- },
- "params": {
- "index": "users",
- "name": "user_12"
- },
- "api": "indices.put_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 117
- },
- "digest": "3e1e00a08a6fbfdc3d55d69880373cd6",
- "lang": "console",
- "found": [],
- "source": "PUT /logs_20302801\n{\n \"mappings\" : {\n \"properties\" : {\n \"year\" : {\"type\" : \"integer\"}\n }\n },\n \"aliases\" : {\n \"current_day\" : {},\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\"year\" : 2030 }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs_20302801",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "year": {
- "type": "integer"
- }
- }
- },
- "aliases": {
- "2030": {
- "filter": {
- "term": {
- "year": 2030
- }
- }
- },
- "current_day": {}
- }
- },
- "params": {
- "index": "logs_20302801"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 11
- },
- "digest": "fa42ae3bf6a300420cd0f77ba006458a",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"analyzer\" : \"standard\",\n \"text\" : \"Quick Brown Foxes!\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "standard",
- "text": "Quick Brown Foxes!"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 140
- },
- "digest": "76dbdd0b2bd48c3c6b1a8d81e23bafd6",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"analyzer\" : \"standard\",\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "standard",
- "text": "this is a test"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 154
- },
- "digest": "fd9b668eeb1f117950bd4991c7c03fb1",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"analyzer\" : \"standard\",\n \"text\" : [\"this is a test\", \"the second text\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "standard",
- "text": [
- "this is a test",
- "the second text"
- ]
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 170
- },
- "digest": "ef33b3b373f7040b874146599db5d557",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"keyword\",\n \"filter\" : [\"lowercase\"],\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "filter": [
- "lowercase"
- ],
- "text": "this is a test"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 180
- },
- "digest": "dc8c94c9bef1f879282caea5c406f36e",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"keyword\",\n \"filter\" : [\"lowercase\"],\n \"char_filter\" : [\"html_strip\"],\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "filter": [
- "lowercase"
- ],
- "char_filter": [
- "html_strip"
- ],
- "text": "this is a test"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 195
- },
- "digest": "22dde5fe7ac5d85d52115641a68b3c55",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"lowercase\", {\"type\": \"stop\", \"stopwords\": [\"a\", \"is\", \"this\"]}],\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "lowercase",
- {
- "type": "stop",
- "stopwords": [
- "a",
- "is",
- "this"
- ]
- }
- ],
- "text": "this is a test"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 210
- },
- "digest": "3951d7fcd7f849fa278daf342872125a",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "text": "this is a test"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 223
- },
- "digest": "71fa652ddea811eb3c8bf8c5db21e549",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"analyzer\" : \"whitespace\",\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "analyzer": "whitespace",
- "text": "this is a test"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 238
- },
- "digest": "de2f59887737de3a27716177b60393a2",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"field\" : \"obj1.field1\",\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "field": "obj1.field1",
- "text": "this is a test"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 256
- },
- "digest": "49d87c2eb7314ed34221c5fb4f21dfcc",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"normalizer\" : \"my_normalizer\",\n \"text\" : \"BaR\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "normalizer": "my_normalizer",
- "text": "BaR"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 268
- },
- "digest": "15a34bfe0ef8ef6333c8c7b55c011e5d",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"filter\" : [\"lowercase\"],\n \"text\" : \"BaR\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "filter": [
- "lowercase"
- ],
- "text": "BaR"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 285
- },
- "digest": "89f8eac24f3ec6a7668d580aaf0eeefa",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"snowball\"],\n \"text\" : \"detailed output\",\n \"explain\" : true,\n \"attributes\" : [\"keyword\"] <1>\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "snowball"
- ],
- "text": "detailed output",
- "explain": true,
- "attributes": [
- "keyword"
- ]
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 301
- },
- "digest": "cf3af9502f758de0682176adb30e7128",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"detail\" : {\n \"custom_analyzer\" : true,\n \"charfilters\" : [ ],\n \"tokenizer\" : {\n \"name\" : \"standard\",\n \"tokens\" : [ {\n \"token\" : \"detailed\",\n \"start_offset\" : 0,\n \"end_offset\" : 8,\n \"type\" : \"\",\n \"position\" : 0\n }, {\n \"token\" : \"output\",\n \"start_offset\" : 9,\n \"end_offset\" : 15,\n \"type\" : \"\",\n \"position\" : 1\n } ]\n },\n \"tokenfilters\" : [ {\n \"name\" : \"snowball\",\n \"tokens\" : [ {\n \"token\" : \"detail\",\n \"start_offset\" : 0,\n \"end_offset\" : 8,\n \"type\" : \"\",\n \"position\" : 0,\n \"keyword\" : false <1>\n }, {\n \"token\" : \"output\",\n \"start_offset\" : 9,\n \"end_offset\" : 15,\n \"type\" : \"\",\n \"position\" : 1,\n \"keyword\" : false <1>\n } ]\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 360
- },
- "digest": "0957bbd535f58c97b12ffba90813d64c",
- "lang": "console",
- "found": [],
- "source": "PUT /analyze_sample\n{\n \"settings\" : {\n \"index.analyze.max_token_count\" : 20000\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/analyze_sample",
- "query": null,
- "body": {
- "settings": {
- "index.analyze.max_token_count": 20000
- }
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 371
- },
- "digest": "3951d7fcd7f849fa278daf342872125a",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "text": "this is a test"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 10
- },
- "digest": "486eee2c8e75520f825fec08c1fbd67e",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_cache/clear",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 101
- },
- "digest": "e97b14be2c4030bfc92e5d09a27e9fc9",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_cache/clear?fielddata=true <1>\nPOST /twitter/_cache/clear?query=true <2>\nPOST /twitter/_cache/clear?request=true <3>",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": {
- "fielddata": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- },
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": {
- "query": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- },
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": {
- "request": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 121
- },
- "digest": "62069c4118d79daf9612b29659b16627",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_cache/clear?fields=foo,bar <1>",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": {
- "fields": "foo,bar"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 133
- },
- "digest": "2f43c5e976713a5c5cd8eb4b08cfffca",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_cache/clear",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_cache/clear",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 143
- },
- "digest": "c4a1d03dcfb82913d0724a42b0a89f20",
- "lang": "console",
- "found": [],
- "source": "POST /_cache/clear",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_cache/clear",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clone-index.asciidoc",
- "line": 10
- },
- "digest": "085df89b76dd980934d1dc2e59f5db1f",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_clone/cloned-twitter-index",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_clone/cloned-twitter-index",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "target": "cloned-twitter-index"
- },
- "api": "indices.clone"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clone-index.asciidoc",
- "line": 37
- },
- "digest": "1c5a5a8c0bdc3c577f560157bd4e2313",
- "lang": "console",
- "found": [],
- "source": "PUT /my_source_index/_settings\n{\n \"settings\": {\n \"index.blocks.write\": true\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_source_index/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.blocks.write": true
- }
- },
- "params": {
- "index": "my_source_index"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clone-index.asciidoc",
- "line": 78
- },
- "digest": "190a21e32db2125ddaea0f634e126a84",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_clone/my_target_index",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_clone/my_target_index",
- "query": null,
- "body": null,
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.clone"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clone-index.asciidoc",
- "line": 104
- },
- "digest": "81612c2537386e031b7eb604f6756a71",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_clone/my_target_index\n{\n \"settings\": {\n \"index.number_of_shards\": 5 <1>\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_clone/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 5
- },
- "aliases": {
- "my_search_indices": {}
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.clone"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/close.asciidoc",
- "line": 10
- },
- "digest": "34107944bca50a003cda9fca934b2011",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_close",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.close"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/close.asciidoc",
- "line": 66
- },
- "digest": "3a6b9143f3de6258d44ff7e0eb38d953",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_close",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.close"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/close.asciidoc",
- "line": 74
- },
- "digest": "2de507b2683e9f92921201724c13b764",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true,\n \"indices\" : {\n \"my_index\" : {\n \"closed\" : true\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 10
- },
- "digest": "1c23507edd7a3c18538b68223378e4ab",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 81
- },
- "digest": "e5d2172b524332196cac0f031c043659",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter\n{\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : 3, <1>\n \"number_of_replicas\" : 2 <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "number_of_shards": 3,
- "number_of_replicas": 2
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 99
- },
- "digest": "b9c5d7ca6ca9c6f747201f45337a4abf",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter\n{\n \"settings\" : {\n \"number_of_shards\" : 3,\n \"number_of_replicas\" : 2\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 3,
- "number_of_replicas": 2
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 123
- },
- "digest": "dfef545b1e2c247bafd1347e8e807ac1",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /test\n{\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"mappings\" : {\n \"properties\" : {\n \"field1\" : { \"type\" : \"text\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "properties": {
- "field1": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 143
- },
- "digest": "4d56b179242fed59e3d6476f817b6055",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /test\n{\n \"aliases\" : {\n \"alias_1\" : {},\n \"alias_2\" : {\n \"filter\" : {\n \"term\" : {\"user\" : \"kimchy\" }\n },\n \"routing\" : \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "aliases": {
- "alias_1": {},
- "alias_2": {
- "filter": {
- "term": {
- "user": "kimchy"
- }
- },
- "routing": "kimchy"
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 166
- },
- "digest": "fd86e01af45ae8c293888eebfa064e25",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"index\": \"test\"\n}"
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 190
- },
- "digest": "4d46dbb96125b27f46299547de9d8709",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /test\n{\n \"settings\": {\n \"index.write.wait_for_active_shards\": \"2\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "index.write.wait_for_active_shards": "2"
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 203
- },
- "digest": "fabe14480624a99e8ee42c7338672058",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /test?wait_for_active_shards=2",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": {
- "wait_for_active_shards": "2"
- },
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/delete-index.asciidoc",
- "line": 10
- },
- "digest": "98f14fddddea54a7d6149ab7b92e099d",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "DELETE /twitter",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/delete-alias.asciidoc",
- "line": 12
- },
- "digest": "bdeee37db5fbf55e5026746c37df3c31",
- "lang": "console",
- "found": [],
- "source": "DELETE /twitter/_alias/alias1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter/_alias/alias1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "name": "alias1"
- },
- "api": "indices.delete_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/delete-index-template.asciidoc",
- "line": 24
- },
- "digest": "0f0fba0061d26602cd5f401ca4a19be3",
- "lang": "console",
- "found": [],
- "source": "DELETE /_template/template_1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_template/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.delete_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/flush.asciidoc",
- "line": 10
- },
- "digest": "bf7b04e79b861d76d1922a588d57f817",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_flush",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/flush.asciidoc",
- "line": 117
- },
- "digest": "cefde3553fdbd516813e73a603c72c24",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy/_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy/_flush",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy"
- },
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/flush.asciidoc",
- "line": 127
- },
- "digest": "66db9f5108a3936115f1fb64c844934a",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_flush",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/flush.asciidoc",
- "line": 137
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 10
- },
- "digest": "ca16c1f060ca653ea8fbca445359f78f",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_forcemerge",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_forcemerge",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 131
- },
- "digest": "ca16c1f060ca653ea8fbca445359f78f",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_forcemerge",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_forcemerge",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 141
- },
- "digest": "6733f91e27b6d5907d7c58546bc45ca1",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_forcemerge",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_forcemerge",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 151
- },
- "digest": "480e531db799c4c909afd8e2a73a8d0b",
- "lang": "console",
- "found": [],
- "source": "POST /_forcemerge",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_forcemerge",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 167
- },
- "digest": "64d97cda667be166f3df49e87e713560",
- "lang": "console",
- "found": [],
- "source": "POST /logs-000001/_forcemerge?max_num_segments=1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs-000001/_forcemerge",
- "query": {
- "max_num_segments": "1"
- },
- "body": null,
- "params": {
- "index": "logs-000001"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/freeze.asciidoc",
- "line": 44
- },
- "digest": "ffea06f77c9df5720412aa06be964118",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_freeze\nPOST /my_index/_unfreeze",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_freeze",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.freeze"
- },
- {
- "method": "POST",
- "url": "/my_index/_unfreeze",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.unfreeze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 12
- },
- "digest": "02c9cadc657f6afd4ca854c577188d31",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_mapping/field/user",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_mapping/field/user",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "fields": "user"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 65
- },
- "digest": "f0f0f778e19134fbe3e4be98fc47bd34",
- "lang": "console",
- "found": [],
- "source": "PUT /publications\n{\n \"mappings\": {\n \"properties\": {\n \"id\": { \"type\": \"text\" },\n \"title\": { \"type\": \"text\"},\n \"abstract\": { \"type\": \"text\"},\n \"author\": {\n \"properties\": {\n \"id\": { \"type\": \"text\" },\n \"name\": { \"type\": \"text\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/publications",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "id": {
- "type": "text"
- },
- "title": {
- "type": "text"
- },
- "abstract": {
- "type": "text"
- },
- "author": {
- "properties": {
- "id": {
- "type": "text"
- },
- "name": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "publications"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 87
- },
- "digest": "299900fb08da80fe455cf3f1bb7d62ee",
- "lang": "console",
- "found": [],
- "source": "GET publications/_mapping/field/title",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/publications/_mapping/field/title",
- "query": null,
- "body": null,
- "params": {
- "index": "publications",
- "fields": "title"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 95
- },
- "digest": "22f71640207a2e3d4dd49aac36040ec8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"publications\": {\n \"mappings\": {\n \"title\": {\n \"full_name\": \"title\",\n \"mapping\": {\n \"title\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 120
- },
- "digest": "ed3bdf4d6799b43526851e92b6a60c55",
- "lang": "console",
- "found": [],
- "source": "GET publications/_mapping/field/author.id,abstract,name",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/publications/_mapping/field/author.id,abstract,name",
- "query": null,
- "body": null,
- "params": {
- "index": "publications",
- "fields": "author.id,abstract,name"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 128
- },
- "digest": "e7f96a786722ae6daca6f8bcc6cd90d1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"publications\": {\n \"mappings\": {\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 156
- },
- "digest": "b61afb7ca29a11243232ffcc8b5a43cf",
- "lang": "console",
- "found": [],
- "source": "GET publications/_mapping/field/a*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/publications/_mapping/field/a*",
- "query": null,
- "body": null,
- "params": {
- "index": "publications",
- "fields": "a*"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 164
- },
- "digest": "75311399baa651a6df82f8bf60aaec3a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"publications\": {\n \"mappings\": {\n \"author.name\": {\n \"full_name\": \"author.name\",\n \"mapping\": {\n \"name\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n },\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 208
- },
- "digest": "9af393bb38bf098d65d00e7637824f44",
- "lang": "console",
- "found": [],
- "source": "GET /twitter,kimchy/_mapping/field/message\n\nGET /_all/_mapping/field/message,user.id\n\nGET /_all/_mapping/field/*.id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter,kimchy/_mapping/field/message",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter,kimchy",
- "fields": "message"
- },
- "api": "indices.get_field_mapping"
- },
- {
- "method": "GET",
- "url": "/_all/_mapping/field/message,user.id",
- "query": null,
- "body": null,
- "params": {
- "index": "_all",
- "fields": "message,user.id"
- },
- "api": "indices.get_field_mapping"
- },
- {
- "method": "GET",
- "url": "/_all/_mapping/field/*.id",
- "query": null,
- "body": null,
- "params": {
- "index": "_all",
- "fields": "*.id"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index.asciidoc",
- "line": 10
- },
- "digest": "be8f28f31207b173de61be032fcf239c",
- "lang": "console",
- "found": [],
- "source": "GET /twitter",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 12
- },
- "digest": "265ba62e416d27b3408fb8a2f698627d",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_alias/alias1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_alias/alias1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "name": "alias1"
- },
- "api": "indices.get_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 76
- },
- "digest": "8118bad980d7afd31677b5060361ecd2",
- "lang": "console",
- "found": [],
- "source": "PUT /logs_20302801\n{\n \"aliases\" : {\n \"current_day\" : {},\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\"year\" : 2030 }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs_20302801",
- "query": null,
- "body": {
- "aliases": {
- "2030": {
- "filter": {
- "term": {
- "year": 2030
- }
- }
- },
- "current_day": {}
- }
- },
- "params": {
- "index": "logs_20302801"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 94
- },
- "digest": "e85f2b38878f745a16edc575e78d7cde",
- "lang": "console",
- "found": [],
- "source": "GET /logs_20302801/_alias/*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logs_20302801/_alias/*",
- "query": null,
- "body": null,
- "params": {
- "index": "logs_20302801",
- "name": "*"
- },
- "api": "indices.get_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 102
- },
- "digest": "1ece6831c3863087f258493460d49d63",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"logs_20302801\" : {\n \"aliases\" : {\n \"current_day\" : {\n },\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\n \"year\" : 2030\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 127
- },
- "digest": "a71c929ed2e322f91092d5dc625b6440",
- "lang": "console",
- "found": [],
- "source": "GET /_alias/2030",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_alias/2030",
- "query": null,
- "body": null,
- "params": {
- "name": "2030"
- },
- "api": "indices.get_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 135
- },
- "digest": "26b770c1281d844f7344f17413d26208",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"logs_20302801\" : {\n \"aliases\" : {\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\n \"year\" : 2030\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 158
- },
- "digest": "56aa1bff647d1db49dabf175c1e56919",
- "lang": "console",
- "found": [],
- "source": "GET /_alias/20*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_alias/20*",
- "query": null,
- "body": null,
- "params": {
- "name": "20*"
- },
- "api": "indices.get_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 166
- },
- "digest": "26b770c1281d844f7344f17413d26208",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"logs_20302801\" : {\n \"aliases\" : {\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\n \"year\" : 2030\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-settings.asciidoc",
- "line": 10
- },
- "digest": "20bdfd960e8d76c4329269e237792eb7",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_settings",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_settings",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-settings.asciidoc",
- "line": 68
- },
- "digest": "c538fc182f433e7141aee9d75c3e42d2",
- "lang": "console",
- "found": [],
- "source": "GET /twitter,kimchy/_settings\n\nGET /_all/_settings\n\nGET /log_2013_*/_settings",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter,kimchy/_settings",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter,kimchy"
- },
- "api": "indices.get_settings"
- },
- {
- "method": "GET",
- "url": "/_all/_settings",
- "query": null,
- "body": null,
- "params": {
- "index": "_all"
- },
- "api": "indices.get_settings"
- },
- {
- "method": "GET",
- "url": "/log_2013_*/_settings",
- "query": null,
- "body": null,
- "params": {
- "index": "log_2013_*"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-settings.asciidoc",
- "line": 84
- },
- "digest": "9748682dcfb24b7d4893f534f7040370",
- "lang": "console",
- "found": [],
- "source": "GET /log_2013_-*/_settings/index.number_*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/log_2013_-*/_settings/index.number_*",
- "query": null,
- "body": null,
- "params": {
- "index": "log_2013_-*",
- "name": "index.number_*"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index-template.asciidoc",
- "line": 31
- },
- "digest": "02f65c6bab8f40bf3ce18160623d1870",
- "lang": "console",
- "found": [],
- "source": "GET /_template/template_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index-template.asciidoc",
- "line": 69
- },
- "digest": "24aee6033bf77a68ced74e3fd9d34283",
- "lang": "console",
- "found": [],
- "source": "GET /_template/template_1,template_2",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/template_1,template_2",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1,template_2"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index-template.asciidoc",
- "line": 78
- },
- "digest": "ba6040de55afb2c8fb9e5b24bb038820",
- "lang": "console",
- "found": [],
- "source": "GET /_template/temp*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/temp*",
- "query": null,
- "body": null,
- "params": {
- "name": "temp*"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index-template.asciidoc",
- "line": 87
- },
- "digest": "fd2d289e6b725fcc3cbe8fe7ffe02ea0",
- "lang": "console",
- "found": [],
- "source": "GET /_template",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-mapping.asciidoc",
- "line": 10
- },
- "digest": "a8fba09a46b2c3524428aa3259b7124f",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-mapping.asciidoc",
- "line": 60
- },
- "digest": "cf02e3d8b371bd59f0224967c36330da",
- "lang": "console",
- "found": [],
- "source": "GET /twitter,kimchy/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter,kimchy/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter,kimchy"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-mapping.asciidoc",
- "line": 70
- },
- "digest": "09cdd5ae8114c49886026fef8d00a19c",
- "lang": "console",
- "found": [],
- "source": "GET /_all/_mapping\n\nGET /_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_all/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "_all"
- },
- "api": "indices.get_mapping"
- },
- {
- "method": "GET",
- "url": "/_mapping",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/alias-exists.asciidoc",
- "line": 12
- },
- "digest": "83e388644f60178c8de0d0e4247ee4c6",
- "lang": "console",
- "found": [],
- "source": "HEAD /_alias/alias1",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/_alias/alias1",
- "query": null,
- "body": null,
- "params": {
- "name": "alias1"
- },
- "api": "indices.exists_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/alias-exists.asciidoc",
- "line": 62
- },
- "digest": "666785827827be4b5252ec859c354d30",
- "lang": "console",
- "found": [],
- "source": "HEAD /_alias/2030\nHEAD /_alias/20*\nHEAD /logs_20302801/_alias/*",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/_alias/2030",
- "query": null,
- "body": null,
- "params": {
- "name": "2030"
- },
- "api": "indices.exists_alias"
- },
- {
- "method": "HEAD",
- "url": "/_alias/20*",
- "query": null,
- "body": null,
- "params": {
- "name": "20*"
- },
- "api": "indices.exists_alias"
- },
- {
- "method": "HEAD",
- "url": "/logs_20302801/_alias/*",
- "query": null,
- "body": null,
- "params": {
- "index": "logs_20302801",
- "name": "*"
- },
- "api": "indices.exists_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/indices-exists.asciidoc",
- "line": 12
- },
- "digest": "22b6176a55b7884c247e30fb0899be5d",
- "lang": "console",
- "found": [],
- "source": "HEAD /twitter",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/twitter",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.exists"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 11
- },
- "digest": "499e9bdf7848fd4de33b6f2bd8a6b1f2",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_recovery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_recovery",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 171
- },
- "digest": "13ebcb01ebf1b5d2b5c52739db47e30c",
- "lang": "console",
- "found": [],
- "source": "GET index1,index2/_recovery?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index1,index2/_recovery",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "index": "index1,index2"
- },
- "api": "indices.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 226
- },
- "digest": "5dfb23f6e36ef484f1d3271bae76a8d1",
- "lang": "console",
- "found": [],
- "source": "GET /_recovery?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_recovery",
- "query": {
- "human": true
- },
- "body": null,
- "params": null,
- "api": "indices.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 234
- },
- "digest": "dd4b03536a1d0fba1aafc9ad48b24f23",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"SNAPSHOT\",\n \"stage\" : \"INDEX\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:15:59.716\",\n \"start_time_in_millis\": 1393244159716,\n \"stop_time\" : \"0s\",\n \"stop_time_in_millis\" : 0,\n \"total_time\" : \"2.9m\",\n \"total_time_in_millis\" : 175576,\n \"source\" : {\n \"repository\" : \"my_repository\",\n \"snapshot\" : \"my_snapshot\",\n \"index\" : \"index1\",\n \"version\" : \"{version}\",\n \"restoreUUID\": \"PDh1ZAOaRbiGIVtCvZOMww\"\n },\n \"target\" : {\n \"id\" : \"ryqJ5lO5S4-lSFbGntkEkg\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"75.4mb\",\n \"total_in_bytes\" : 79063092,\n \"reused\" : \"0b\",\n \"reused_in_bytes\" : 0,\n \"recovered\" : \"65.7mb\",\n \"recovered_in_bytes\" : 68891939,\n \"percent\" : \"87.1%\"\n },\n \"files\" : {\n \"total\" : 73,\n \"reused\" : 0,\n \"recovered\" : 69,\n \"percent\" : \"94.5%\"\n },\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 0,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0,\n },\n \"verify_index\" : {\n \"check_index_time\" : \"0s\",\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0\n }\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 326
- },
- "digest": "5619103306878d58a058bce87c5bd82b",
- "lang": "console",
- "found": [],
- "source": "GET _recovery?human&detailed=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_recovery",
- "query": {
- "human": true,
- "detailed": "true"
- },
- "body": null,
- "params": null,
- "api": "indices.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 334
- },
- "digest": "2eadd303fba0f73acbf689c6ae69bfe8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"STORE\",\n \"stage\" : \"DONE\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:38:06.349\",\n \"start_time_in_millis\" : \"1393245486349\",\n \"stop_time\" : \"2014-02-24T12:38:08.464\",\n \"stop_time_in_millis\" : \"1393245488464\",\n \"total_time\" : \"2.1s\",\n \"total_time_in_millis\" : 2115,\n \"source\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"target\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"24.7mb\",\n \"total_in_bytes\" : 26001617,\n \"reused\" : \"24.7mb\",\n \"reused_in_bytes\" : 26001617,\n \"recovered\" : \"0b\",\n \"recovered_in_bytes\" : 0,\n \"percent\" : \"100.0%\"\n },\n \"files\" : {\n \"total\" : 26,\n \"reused\" : 26,\n \"recovered\" : 0,\n \"percent\" : \"100.0%\",\n \"details\" : [ {\n \"name\" : \"segments.gen\",\n \"length\" : 20,\n \"recovered\" : 20\n }, {\n \"name\" : \"_0.cfs\",\n \"length\" : 135306,\n \"recovered\" : 135306\n }, {\n \"name\" : \"segments_2\",\n \"length\" : 251,\n \"recovered\" : 251\n }\n ]\n },\n \"total_time\" : \"2ms\",\n \"total_time_in_millis\" : 2,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 71,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"2.0s\",\n \"total_time_in_millis\" : 2025\n },\n \"verify_index\" : {\n \"check_index_time\" : 0,\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"88ms\",\n \"total_time_in_millis\" : 88\n }\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 11
- },
- "digest": "3f176d802b3e2964686ecd91748fab89",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_segments",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_segments",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 108
- },
- "digest": "940e8c2c7ff92d71f489bdb7183c1ce6",
- "lang": "console",
- "found": [],
- "source": "GET /test/_segments",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_segments",
- "query": null,
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 117
- },
- "digest": "975b4b92464d52068516aa2f0f955cc1",
- "lang": "console",
- "found": [],
- "source": "GET /test1,test2/_segments",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test1,test2/_segments",
- "query": null,
- "body": null,
- "params": {
- "index": "test1,test2"
- },
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 126
- },
- "digest": "6414b9276ba1c63898c3ff5cbe03c54e",
- "lang": "console",
- "found": [],
- "source": "GET /_segments",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_segments",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 186
- },
- "digest": "1b21d886f6e9619c73079d14581ccbe4",
- "lang": "console",
- "found": [],
- "source": "GET /test/_segments?verbose=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_segments",
- "query": {
- "verbose": "true"
- },
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 11
- },
- "digest": "45a023986499436a9153eef87788ab82",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_shard_stores",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_shard_stores",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 101
- },
- "digest": "cd93919e13f656ad2e6629f45c579b93",
- "lang": "console",
- "found": [],
- "source": "GET /test/_shard_stores",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_shard_stores",
- "query": null,
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 111
- },
- "digest": "af970eb8b93cdea52209e1256eba9d8c",
- "lang": "console",
- "found": [],
- "source": "GET /test1,test2/_shard_stores",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test1,test2/_shard_stores",
- "query": null,
- "body": null,
- "params": {
- "index": "test1,test2"
- },
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 121
- },
- "digest": "00b3b6d76a368ae71277ea24af318693",
- "lang": "console",
- "found": [],
- "source": "GET /_shard_stores",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_shard_stores",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 137
- },
- "digest": "3545261682af72f4bee57f2bac0a9590",
- "lang": "console",
- "found": [],
- "source": "GET /_shard_stores?status=green",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_shard_stores",
- "query": {
- "status": "green"
- },
- "body": null,
- "params": null,
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 146
- },
- "digest": "28fae40eedf82058ab062d52776c62dc",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"my-index\": {\n \"shards\": {\n \"0\": { <1>\n \"stores\": [ <2>\n {\n \"sPa3OgxLSYGvQ4oPs-Tajw\": { <3>\n \"name\": \"node_t0\",\n \"ephemeral_id\" : \"9NlXRFGCT1m8tkvYCMK-8A\",\n \"transport_address\": \"local[1]\",\n \"attributes\": {}\n },\n \"allocation_id\": \"2iNySv_OQVePRX-yaRH_lQ\", <4>\n \"allocation\" : \"primary|replica|unused\" <5>\n \"store_exception\": ... <6>\n }\n ]\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 10
- },
- "digest": "fce5d68a9ac1b34b59d5308b65688e59",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_stats",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 97
- },
- "digest": "e0b2f56c34e33ff52f8f9658be2f7ca1",
- "lang": "console",
- "found": [],
- "source": "GET /index1,index2/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index1,index2/_stats",
- "query": null,
- "body": null,
- "params": {
- "index": "index1,index2"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 107
- },
- "digest": "78c4035e4fbf6851140660f6ed2a1fa5",
- "lang": "console",
- "found": [],
- "source": "GET /_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 121
- },
- "digest": "a861a89f52008610e813b9f073951c58",
- "lang": "console",
- "found": [],
- "source": "GET /_stats/merge,refresh",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats/merge,refresh",
- "query": null,
- "body": null,
- "params": {
- "metric": "merge,refresh"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 135
- },
- "digest": "7a8de5606f283f4ef171b015eef6befa",
- "lang": "console",
- "found": [],
- "source": "GET /_stats/search?groups=group1,group2",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats/search",
- "query": {
- "groups": "group1,group2"
- },
- "body": null,
- "params": {
- "metric": "search"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/template-exists.asciidoc",
- "line": 12
- },
- "digest": "a6be6c1cb4a556866fdccb0dee2f1dea",
- "lang": "console",
- "found": [],
- "source": "HEAD /_template/template_1",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/_template/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.exists_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/open-close.asciidoc",
- "line": 10
- },
- "digest": "7f36828a03e8cb5a028d9a6efb056b88",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_open",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_open",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.open"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/open-close.asciidoc",
- "line": 103
- },
- "digest": "37e6177bf8803971d30a4252498c07a4",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_open",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_open",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.open"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/open-close.asciidoc",
- "line": 111
- },
- "digest": "6f13fc8af8ddb33c5f00d22ab4cf79ea",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 10
- },
- "digest": "e5f50b31f165462d883ecbff45f74985",
- "lang": "console",
- "found": [],
- "source": "PUT _template/template_1\n{\n \"index_patterns\": [\"te*\", \"bar*\"],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "te*",
- "bar*"
- ],
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "_source": {
- "enabled": false
- },
- "properties": {
- "host_name": {
- "type": "keyword"
- },
- "created_at": {
- "type": "date",
- "format": "EEE MMM dd HH:mm:ss Z yyyy"
- }
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 138
- },
- "digest": "1b8caf0a6741126c6d0ad83b56fce290",
- "lang": "console",
- "found": [],
- "source": "PUT _template/template_1\n{\n \"index_patterns\" : [\"te*\"],\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"aliases\" : {\n \"alias1\" : {},\n \"alias2\" : {\n \"filter\" : {\n \"term\" : {\"user\" : \"kimchy\" }\n },\n \"routing\" : \"kimchy\"\n },\n \"{index}-alias\" : {} <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "te*"
- ],
- "settings": {
- "number_of_shards": 1
- },
- "aliases": {
- "alias1": {},
- "alias2": {
- "filter": {
- "term": {
- "user": "kimchy"
- }
- },
- "routing": "kimchy"
- },
- "{index}-alias": {}
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 172
- },
- "digest": "b5f95bc097a201b29c7200fc8d3d31c1",
- "lang": "console",
- "found": [],
- "source": "PUT /_template/template_1\n{\n \"index_patterns\" : [\"*\"],\n \"order\" : 0,\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"mappings\" : {\n \"_source\" : { \"enabled\" : false }\n }\n}\n\nPUT /_template/template_2\n{\n \"index_patterns\" : [\"te*\"],\n \"order\" : 1,\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"mappings\" : {\n \"_source\" : { \"enabled\" : true }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "*"
- ],
- "order": 0,
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "_source": {
- "enabled": false
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_template"
- },
- {
- "method": "PUT",
- "url": "/_template/template_2",
- "query": null,
- "body": {
- "index_patterns": [
- "te*"
- ],
- "order": 1,
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "_source": {
- "enabled": true
- }
- }
- },
- "params": {
- "name": "template_2"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 223
- },
- "digest": "9166cf38427d5cde5d2ec12a2012b669",
- "lang": "console",
- "found": [],
- "source": "PUT /_template/template_1\n{\n \"index_patterns\" : [\"*\"],\n \"order\" : 0,\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"version\": 123\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "*"
- ],
- "order": 0,
- "settings": {
- "number_of_shards": 1
- },
- "version": 123
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 241
- },
- "digest": "46658f00edc4865dfe472a392374cd0f",
- "lang": "console",
- "found": [],
- "source": "GET /_template/template_1?filter_path=*.version",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/template_1",
- "query": {
- "filter_path": "*.version"
- },
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 249
- },
- "digest": "a2e618c0a7ef9368e0b39e7ece15e27e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template_1\" : {\n \"version\" : 123\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 11
- },
- "digest": "5be23858b35043fcb7b50fe36b873e6e",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /twitter/_mapping\n{\n \"properties\": {\n \"email\": {\n \"type\": \"keyword\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_mapping",
- "query": null,
- "body": {
- "properties": {
- "email": {
- "type": "keyword"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 84
- },
- "digest": "12433d2b637d002e8d5c9a1adce69d3b",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /publications",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/publications",
- "query": null,
- "body": null,
- "params": {
- "index": "publications"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 92
- },
- "digest": "e4be53736bcc02b03068fd72fdbfe271",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /publications/_mapping\n{\n \"properties\": {\n \"title\": { \"type\": \"text\"}\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/publications/_mapping",
- "query": null,
- "body": {
- "properties": {
- "title": {
- "type": "text"
- }
- }
- },
- "params": {
- "index": "publications"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 109
- },
- "digest": "1da77e114459e0b77d78a3dcc8fae429",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "# Create the two indices\nPUT /twitter-1\nPUT /twitter-2\n\n# Update both mappings\nPUT /twitter-1,twitter-2/_mapping <1>\n{\n \"properties\": {\n \"user_name\": {\n \"type\": \"text\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter-1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter-1"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/twitter-2",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter-2"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/twitter-1,twitter-2/_mapping",
- "query": null,
- "body": {
- "properties": {
- "user_name": {
- "type": "text"
- }
- }
- },
- "params": {
- "index": "twitter-1,twitter-2"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 144
- },
- "digest": "d9474f66970c6955e24b17c7447e7b5f",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"name\": {\n \"properties\": {\n \"first\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "properties": {
- "first": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 166
- },
- "digest": "0bbd30b9be3e54ff3028b9f4459634d2",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my_index/_mapping\n{\n \"properties\": {\n \"name\": {\n \"properties\": {\n \"last\": {\n \"type\": \"text\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "name": {
- "properties": {
- "last": {
- "type": "text"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 186
- },
- "digest": "210cf5c76bff517f48e80fa1c2d63907",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /my_index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 194
- },
- "digest": "d83da92e13032bf4a494dd5a7464e74f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"name\" : {\n \"properties\" : {\n \"first\" : {\n \"type\" : \"text\"\n },\n \"last\" : {\n \"type\" : \"text\"\n }\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 234
- },
- "digest": "c849c6c8f8659dbb93e1c14356f74e37",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"city\": {\n \"type\": \"text\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "city": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 257
- },
- "digest": "5f3a3eefeefe6fa85ec49d499212d245",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my_index/_mapping\n{\n \"properties\": {\n \"city\": {\n \"type\": \"text\",\n \"fields\": {\n \"raw\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "city": {
- "type": "text",
- "fields": {
- "raw": {
- "type": "keyword"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 278
- },
- "digest": "210cf5c76bff517f48e80fa1c2d63907",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /my_index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 286
- },
- "digest": "68663da99beea30da47298a1762b5793",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"city\" : {\n \"type\" : \"text\",\n \"fields\" : {\n \"raw\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 327
- },
- "digest": "1f6fe6833686e38c3711c6f2aa00a078",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"user_id\": {\n \"type\": \"keyword\",\n \"ignore_above\": 20\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "keyword",
- "ignore_above": 20
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 346
- },
- "digest": "17de0020b228df961ad3c6b06233c948",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my_index/_mapping\n{\n \"properties\": {\n \"user_id\": {\n \"type\": \"keyword\",\n \"ignore_above\": 100\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "user_id": {
- "type": "keyword",
- "ignore_above": 100
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 363
- },
- "digest": "210cf5c76bff517f48e80fa1c2d63907",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /my_index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 371
- },
- "digest": "1d15d98aff2f885e3a59831d50184fb0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"user_id\" : {\n \"type\" : \"keyword\",\n \"ignore_above\" : 100\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 409
- },
- "digest": "bd5918ab903c0889bb1f09c8c2466e43",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /users\n{\n \"mappings\" : {\n \"properties\": {\n \"user_id\": {\n \"type\": \"long\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "users"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 427
- },
- "digest": "0989cc65d8924f666ce3eb0820d2d244",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "POST /users/_doc?refresh=wait_for\n{\n \"user_id\" : 12345\n}\n\nPOST /users/_doc?refresh=wait_for\n{\n \"user_id\" : 12346\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/users/_doc",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "user_id": 12345
- },
- "params": {
- "index": "users"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/users/_doc",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "user_id": 12346
- },
- "params": {
- "index": "users"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 446
- },
- "digest": "734c2e2a1e45b84f1e4e65b51356fcd7",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /new_users\n{\n \"mappings\" : {\n \"properties\": {\n \"user_id\": {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/new_users",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "new_users"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 465
- },
- "digest": "53d938c754f36a912fcbe6473abb463f",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "POST /_reindex\n{\n \"source\": {\n \"index\": \"users\"\n },\n \"dest\": {\n \"index\": \"new_users\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "users"
- },
- "dest": {
- "index": "new_users"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 481
- },
- "digest": "fbcbfd34d560a2b4b46ce04d8716510d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 147,\n \"timed_out\": false,\n \"total\": 2,\n \"updated\": 0,\n \"created\": 2,\n \"deleted\": 0,\n \"batches\": 1,\n \"version_conflicts\": 0,\n \"noops\": 0,\n \"retries\": {\n \"bulk\": 0,\n \"search\": 0\n },\n \"throttled_millis\": 0,\n \"requests_per_second\": -1.0,\n \"throttled_until_millis\": 0,\n \"failures\" : [ ]\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 519
- },
- "digest": "6bf63f2ec6ba55fcaf1092f48212bf25",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"user_identifier\": {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_identifier": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 536
- },
- "digest": "afc29b61c532cf683f749baf013e7bfe",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "PUT /my_index/_mapping\n{\n \"properties\": {\n \"user_id\": {\n \"type\": \"alias\",\n \"path\": \"user_identifier\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "user_id": {
- "type": "alias",
- "path": "user_identifier"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 553
- },
- "digest": "210cf5c76bff517f48e80fa1c2d63907",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /my_index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 561
- },
- "digest": "aa7abe4ddca0ab400ac20a0d3bc2d6fa",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"user_id\" : {\n \"type\" : \"alias\",\n \"path\" : \"user_identifier\"\n },\n \"user_identifier\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/refresh.asciidoc",
- "line": 10
- },
- "digest": "c2ac42934e4b76197032b2fc429e317d",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_refresh",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/refresh.asciidoc",
- "line": 93
- },
- "digest": "0e98949e80e665795bc6cfc997165241",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_refresh",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/refresh.asciidoc",
- "line": 103
- },
- "digest": "d7898526d239d2aea83727fb982f8f77",
- "lang": "console",
- "found": [],
- "source": "POST /_refresh",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_refresh",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 11
- },
- "digest": "84e8a4cf3453ed2fd4aeecdbdb02b813",
- "lang": "console",
- "found": [],
- "source": "POST /alias1/_rollover/twitter\n{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/alias1/_rollover/twitter",
- "query": null,
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- }
- },
- "params": {
- "alias": "alias1",
- "new_index": "twitter"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 160
- },
- "digest": "593c11e8a9f88ec2629f2eb33cded9b7",
- "lang": "console",
- "found": [],
- "source": "PUT /logs-000001 <1>\n{\n \"aliases\": {\n \"logs_write\": {}\n }\n}\n\n# Add > 1000 documents to logs-000001\n\nPOST /logs_write/_rollover <2>\n{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs-000001",
- "query": null,
- "body": {
- "aliases": {
- "logs_write": {}
- }
- },
- "params": {
- "index": "logs-000001"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/logs_write/_rollover",
- "query": null,
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- }
- },
- "params": {
- "alias": "logs_write"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 189
- },
- "digest": "68a4f959b3d34ade7ae7c32c06ad9b72",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"old_index\": \"logs-000001\",\n \"new_index\": \"logs-000002\",\n \"rolled_over\": true, <1>\n \"dry_run\": false, <2>\n \"conditions\": { <3>\n \"[max_age: 7d]\": false,\n \"[max_docs: 1000]\": true,\n \"[max_size: 5gb]\": false,\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 220
- },
- "digest": "75f887596c4972bc679929ca996698f2",
- "lang": "console",
- "found": [],
- "source": "PUT /logs-000001\n{\n \"aliases\": {\n \"logs_write\": {}\n }\n}\n\nPOST /logs_write/_rollover\n{\n \"conditions\" : {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n },\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs-000001",
- "query": null,
- "body": {
- "aliases": {
- "logs_write": {}
- }
- },
- "params": {
- "index": "logs-000001"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/logs_write/_rollover",
- "query": null,
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- },
- "settings": {
- "index.number_of_shards": 2
- }
- },
- "params": {
- "alias": "logs_write"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 254
- },
- "digest": "659247d91f61ceb17cbcc60801fd3456",
- "lang": "console",
- "found": [],
- "source": "POST /my_alias/_rollover/my_new_index_name\n{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_alias/_rollover/my_new_index_name",
- "query": null,
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- }
- },
- "params": {
- "alias": "my_alias",
- "new_index": "my_new_index_name"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 278
- },
- "digest": "8f6ef669c09e0c8bfc2731f422471770",
- "lang": "console",
- "found": [],
- "source": "# PUT / with URI encoding:\nPUT /%3Clogs-%7Bnow%2Fd%7D-1%3E <1>\n{\n \"aliases\": {\n \"logs_write\": {}\n }\n}\n\nPUT logs_write/_doc/1\n{\n \"message\": \"a dummy log\"\n}\n\nPOST logs_write/_refresh\n\n# Wait for a day to pass\n\nPOST /logs_write/_rollover <2>\n{\n \"conditions\": {\n \"max_docs\": \"1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/%3Clogs-%7Bnow%2Fd%7D-1%3E",
- "query": null,
- "body": {
- "aliases": {
- "logs_write": {}
- }
- },
- "params": {
- "index": "%3Clogs-%7Bnow%2Fd%7D-1%3E"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/logs_write/_doc/1",
- "query": null,
- "body": {
- "message": "a dummy log"
- },
- "params": {
- "index": "logs_write",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/logs_write/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "logs_write"
- },
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/logs_write/_rollover",
- "query": null,
- "body": {
- "conditions": {
- "max_docs": "1"
- }
- },
- "params": {
- "alias": "logs_write"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 337
- },
- "digest": "03584e88046614ec7727db506d866f48",
- "lang": "console",
- "found": [],
- "source": "# GET /,,/_search\nGET /%3Clogs-%7Bnow%2Fd%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-1d%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-2d%7D-*%3E/_search",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/%3Clogs-%7Bnow%2Fd%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-1d%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-2d%7D-*%3E/_search",
- "query": null,
- "body": null,
- "params": {
- "index": "%3Clogs-%7Bnow%2Fd%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-1d%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-2d%7D-*%3E"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 352
- },
- "digest": "896eb7487a512fc43a2af7e16717f40d",
- "lang": "console",
- "found": [],
- "source": "POST /logs_write/_rollover?dry_run\n{\n \"conditions\" : {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs_write/_rollover",
- "query": {
- "dry_run": true
- },
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- }
- },
- "params": {
- "alias": "logs_write"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 380
- },
- "digest": "9e9a3ad495e6305563a88dd4c74a5fda",
- "lang": "console",
- "found": [],
- "source": "PUT my_logs_index-000001\n{\n \"aliases\": {\n \"logs\": { \"is_write_index\": true } <1>\n }\n}\n\nPUT logs/_doc/1\n{\n \"message\": \"a dummy log\"\n}\n\nPOST logs/_refresh\n\nPOST /logs/_rollover\n{\n \"conditions\": {\n \"max_docs\": \"1\"\n }\n}\n\nPUT logs/_doc/2 <2>\n{\n \"message\": \"a newer log\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_logs_index-000001",
- "query": null,
- "body": {
- "aliases": {
- "logs": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "my_logs_index-000001"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/logs/_doc/1",
- "query": null,
- "body": {
- "message": "a dummy log"
- },
- "params": {
- "index": "logs",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/logs/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "logs"
- },
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/logs/_rollover",
- "query": null,
- "body": {
- "conditions": {
- "max_docs": "1"
- }
- },
- "params": {
- "alias": "logs"
- },
- "api": "indices.rollover"
- },
- {
- "method": "PUT",
- "url": "/logs/_doc/2",
- "query": null,
- "body": {
- "message": "a newer log"
- },
- "params": {
- "index": "logs",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 412
- },
- "digest": "30525ea49f09da5979d6046e69fc1993",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"my_logs_index-000002\",\n \"_id\" : \"2\",\n \"_version\" : 1,\n \"result\" : \"created\",\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 1,\n \"failed\" : 0\n },\n \"_seq_no\" : 0,\n \"_primary_term\" : 1\n}"
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 440
- },
- "digest": "ef28fa43104f069fab5db566a796731f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_logs_index-000002\": {\n \"aliases\": {\n \"logs\": { \"is_write_index\": true }\n }\n },\n \"my_logs_index-000001\": {\n \"aliases\": {\n \"logs\": { \"is_write_index\" : false }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/shrink-index.asciidoc",
- "line": 11
- },
- "digest": "36897f18b6b4631a03ba37f3baa00907",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_shrink/shrunk-twitter-index",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_shrink/shrunk-twitter-index",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "target": "shrunk-twitter-index"
- },
- "api": "indices.shrink"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shrink-index.asciidoc",
- "line": 37
- },
- "digest": "5e93f806cfd459149222b443b7992a51",
- "lang": "console",
- "found": [],
- "source": "PUT /my_source_index/_settings\n{\n \"settings\": {\n \"index.routing.allocation.require._name\": \"shrink_node_name\", <1>\n \"index.blocks.write\": true <2>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_source_index/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.routing.allocation.require._name": "shrink_node_name",
- "index.blocks.write": true
- }
- },
- "params": {
- "index": "my_source_index"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shrink-index.asciidoc",
- "line": 98
- },
- "digest": "f3594de7ef39ab09b0bb12c1e76bfe6b",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_shrink/my_target_index\n{\n \"settings\": {\n \"index.routing.allocation.require._name\": null, <1>\n \"index.blocks.write\": null <2>\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_shrink/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.routing.allocation.require._name": null,
- "index.blocks.write": null
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.shrink"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shrink-index.asciidoc",
- "line": 141
- },
- "digest": "76c167d8ab305cb43b594f140c902dfe",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_shrink/my_target_index\n{\n \"settings\": {\n \"index.number_of_replicas\": 1,\n \"index.number_of_shards\": 1, <1>\n \"index.codec\": \"best_compression\" <2>\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_shrink/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_replicas": 1,
- "index.number_of_shards": 1,
- "index.codec": "best_compression"
- },
- "aliases": {
- "my_search_indices": {}
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.shrink"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/split-index.asciidoc",
- "line": 10
- },
- "digest": "1a19b7db5485cd814e1f76f7cd7d2923",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_split/split-twitter-index\n{\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_split/split-twitter-index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 2
- }
- },
- "params": {
- "index": "twitter",
- "target": "split-twitter-index"
- },
- "api": "indices.split"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/split-index.asciidoc",
- "line": 42
- },
- "digest": "01c0e302f4fd5118faf5e34f4a010ebf",
- "lang": "console",
- "found": [],
- "source": "PUT /my_source_index/_settings\n{\n \"settings\": {\n \"index.blocks.write\": true <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_source_index/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.blocks.write": true
- }
- },
- "params": {
- "index": "my_source_index"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/split-index.asciidoc",
- "line": 147
- },
- "digest": "2e796e5ca59768d4426abbf9a049db3e",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_split/my_target_index\n{\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_split/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 2
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.split"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/split-index.asciidoc",
- "line": 181
- },
- "digest": "f2f1cae094855a45fd8f73478bec8e70",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_split/my_target_index\n{\n \"settings\": {\n \"index.number_of_shards\": 5 <1>\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_split/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 5
- },
- "aliases": {
- "my_search_indices": {}
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.split"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/unfreeze.asciidoc",
- "line": 42
- },
- "digest": "ffea06f77c9df5720412aa06be964118",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_freeze\nPOST /my_index/_unfreeze",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_freeze",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.freeze"
- },
- {
- "method": "POST",
- "url": "/my_index/_unfreeze",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.unfreeze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 12
- },
- "digest": "d3016e4e8025362ad9a05ee86bb2061f",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"twitter\", \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "twitter",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 155
- },
- "digest": "b4392116f2cc57ce8064ccbad30318d5",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"test1\", \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test1",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 171
- },
- "digest": "3653567181f43a5f64c74f934aa821c2",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"remove\" : { \"index\" : \"test1\", \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "remove": {
- "index": "test1",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 189
- },
- "digest": "af3fb9fa5691a7b37a6dc2a69ff66e64",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"remove\" : { \"index\" : \"test1\", \"alias\" : \"alias1\" } },\n { \"add\" : { \"index\" : \"test1\", \"alias\" : \"alias2\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "remove": {
- "index": "test1",
- "alias": "alias1"
- }
- },
- {
- "add": {
- "index": "test1",
- "alias": "alias2"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 207
- },
- "digest": "f0e21e03a07c8fa0209b0aafdb3791e6",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"test1\", \"alias\" : \"alias1\" } },\n { \"add\" : { \"index\" : \"test2\", \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test1",
- "alias": "alias1"
- }
- },
- {
- "add": {
- "index": "test2",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 221
- },
- "digest": "5f210f74725ea0c9265190346edfa246",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"indices\" : [\"test1\", \"test2\"], \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "indices": [
- "test1",
- "test2"
- ],
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 238
- },
- "digest": "6799d132c1c7ca3970763acde2337ef9",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"test*\", \"alias\" : \"all_test_indices\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test*",
- "alias": "all_test_indices"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 257
- },
- "digest": "de176bc4788ea286fff9e92418a43ea8",
- "lang": "console",
- "found": [],
- "source": "PUT test <1>\nPUT test_2 <2>\nPOST /_aliases\n{\n \"actions\" : [\n { \"add\": { \"index\": \"test_2\", \"alias\": \"test\" } },\n { \"remove_index\": { \"index\": \"test\" } } <3>\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test_2",
- "query": null,
- "body": null,
- "params": {
- "index": "test_2"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test_2",
- "alias": "test"
- }
- },
- {
- "remove_index": {
- "index": "test"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 285
- },
- "digest": "23ab0f1023b1b2cd5cdf2a8f9ccfd57b",
- "lang": "console",
- "found": [],
- "source": "PUT /test1\n{\n \"mappings\": {\n \"properties\": {\n \"user\" : {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test1",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "test1"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 301
- },
- "digest": "7cf71671859be7c1ecf673396db377cd",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test1\",\n \"alias\" : \"alias2\",\n \"filter\" : { \"term\" : { \"user\" : \"kimchy\" } }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test1",
- "alias": "alias2",
- "filter": {
- "term": {
- "user": "kimchy"
- }
- }
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 329
- },
- "digest": "bc1ad5cc6d3eab98e3ce01f209ba7094",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test\",\n \"alias\" : \"alias1\",\n \"routing\" : \"1\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test",
- "alias": "alias1",
- "routing": "1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 349
- },
- "digest": "fa0f4485cd48f986b7ae8cbb24e331c4",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test\",\n \"alias\" : \"alias2\",\n \"search_routing\" : \"1,2\",\n \"index_routing\" : \"2\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test",
- "alias": "alias2",
- "search_routing": "1,2",
- "index_routing": "2"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 375
- },
- "digest": "427f6b5c5376cbf0f71f242a60ca3d9e",
- "lang": "console",
- "found": [],
- "source": "GET /alias2/_search?q=user:kimchy&routing=2,3",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/alias2/_search",
- "query": {
- "q": "user:kimchy",
- "routing": "2,3"
- },
- "body": null,
- "params": {
- "index": "alias2"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 396
- },
- "digest": "f6d6889667f56b8f49d2858070571a6b",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test\",\n \"alias\" : \"alias1\",\n \"is_write_index\" : true\n }\n },\n {\n \"add\" : {\n \"index\" : \"test2\",\n \"alias\" : \"alias1\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test",
- "alias": "alias1",
- "is_write_index": true
- }
- },
- {
- "add": {
- "index": "test2",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 422
- },
- "digest": "b0ec418bf416c62bed602b0a32a6d5f5",
- "lang": "console",
- "found": [],
- "source": "PUT /alias1/_doc/1\n{\n \"foo\": \"bar\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/alias1/_doc/1",
- "query": null,
- "body": {
- "foo": "bar"
- },
- "params": {
- "index": "alias1",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 434
- },
- "digest": "67bba546d835bca8f31df13e3587c348",
- "lang": "console",
- "found": [],
- "source": "GET /test/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 443
- },
- "digest": "ad79228630684d950fe9792a768d24c5",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test\",\n \"alias\" : \"alias1\",\n \"is_write_index\" : false\n }\n }, {\n \"add\" : {\n \"index\" : \"test2\",\n \"alias\" : \"alias1\",\n \"is_write_index\" : true\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test",
- "alias": "alias1",
- "is_write_index": false
- }
- },
- {
- "add": {
- "index": "test2",
- "alias": "alias1",
- "is_write_index": true
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 10
- },
- "digest": "8653e76676de5d327201b77512afa3a0",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index\" : {\n \"number_of_replicas\" : 2\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index": {
- "number_of_replicas": 2
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 73
- },
- "digest": "42744a175125df5be0ef77413bf8f608",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index\" : {\n \"refresh_interval\" : null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index": {
- "refresh_interval": null
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 97
- },
- "digest": "dfac8d098b50aa0181161bcd17b38ef4",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index\" : {\n \"refresh_interval\" : \"-1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index": {
- "refresh_interval": "-1"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 114
- },
- "digest": "0be2c28ee65384774b1e479b47dc3d92",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index\" : {\n \"refresh_interval\" : \"1s\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index": {
- "refresh_interval": "1s"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 127
- },
- "digest": "fe5763d32955e8b65eb3048e97b1580c",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_forcemerge?max_num_segments=5",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_forcemerge",
- "query": {
- "max_num_segments": "5"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 145
- },
- "digest": "ba0b4081c98f3387f76b77847c52ee9a",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_close\n\nPUT /twitter/_settings\n{\n \"analysis\" : {\n \"analyzer\":{\n \"content\":{\n \"type\":\"custom\",\n \"tokenizer\":\"whitespace\"\n }\n }\n }\n}\n\nPOST /twitter/_open",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.close"
- },
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "analysis": {
- "analyzer": {
- "content": {
- "type": "custom",
- "tokenizer": "whitespace"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- },
- {
- "method": "POST",
- "url": "/twitter/_open",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.open"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/put-lifecycle.asciidoc",
- "line": 52
- },
- "digest": "daa2d4811bec05ac4546b66bd5a615c7",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "min_age": "10d",
- "actions": {
- "forcemerge": {
- "max_num_segments": 1
- }
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/put-lifecycle.asciidoc",
- "line": 79
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/get-lifecycle.asciidoc",
- "line": 76
- },
- "digest": "2e7f4b9be999422a12abb680572b13c8",
- "lang": "console",
- "found": [],
- "source": "GET _ilm/policy/my_policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": null,
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.get_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/get-lifecycle.asciidoc",
- "line": 85
- },
- "digest": "c4c3838c118e037f476ff6eca050fddd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_policy\": {\n \"version\": 1, <1>\n \"modified_date\": 82392349, <2>\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/delete-lifecycle.asciidoc",
- "line": 77
- },
- "digest": "af517b6936fa41d124d68b107b2efdc3",
- "lang": "console",
- "found": [],
- "source": "DELETE _ilm/policy/my_policy",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": null,
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.delete_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/delete-lifecycle.asciidoc",
- "line": 85
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/move-to-step.asciidoc",
- "line": 93
- },
- "digest": "e3c5f93b3c85e8519f801defc20b0ce0",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/move/my_index\n{\n \"current_step\": { <1>\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": { <2>\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/move/my_index",
- "query": null,
- "body": {
- "current_step": {
- "phase": "new",
- "action": "complete",
- "name": "complete"
- },
- "next_step": {
- "phase": "warm",
- "action": "forcemerge",
- "name": "forcemerge"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "ilm.move_to_step"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/move-to-step.asciidoc",
- "line": 115
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/remove-policy-from-index.asciidoc",
- "line": 83
- },
- "digest": "8bec5a437f4aea6f3f897c9df2ce2442",
- "lang": "console",
- "found": [],
- "source": "POST my_index/_ilm/remove",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_ilm/remove",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "ilm.remove_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/remove-policy-from-index.asciidoc",
- "line": 91
- },
- "digest": "7464040de4facd0800a50d9488d41808",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"has_failures\" : false,\n \"failed_indexes\" : []\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/get-status.asciidoc",
- "line": 44
- },
- "digest": "182df084f028479ecbe8d7648ddad892",
- "lang": "console",
- "found": [],
- "source": "GET _ilm/status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ilm/status",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.get_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/get-status.asciidoc",
- "line": 51
- },
- "digest": "99e0bec31e49636bc0053ac66bc29352",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"RUNNING\"\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 97
- },
- "digest": "0f6fa3a706a7c17858d3dbe329839ea6",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_ilm/explain",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_ilm/explain",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "ilm.explain_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 106
- },
- "digest": "bc42b1c517ff1fc6ad4371bae23d1c57",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"my_index\": {\n \"index\": \"my_index\",\n \"managed\": true, <1>\n \"policy\": \"my_policy\", <2>\n \"lifecycle_date_millis\": 1538475653281, <3>\n \"age\": \"15s\", <4>\n \"phase\": \"new\",\n \"phase_time_millis\": 1538475653317, <5>\n \"action\": \"complete\",\n \"action_time_millis\": 1538475653317, <6>\n \"step\": \"complete\",\n \"step_time_millis\": 1538475653317 <7>\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 142
- },
- "digest": "9cf677738535149f0cdb1796ddafbc8a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"test-000069\": {\n \"index\": \"test-000069\",\n \"managed\": true,\n \"policy\": \"my_lifecycle3\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"25.14s\",\n \"phase\": \"hot\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"rollover\",\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"attempt-rollover\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\",\n \"phase_execution\": {\n \"policy\": \"my_lifecycle3\",\n \"phase_definition\": { <1>\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_age\": \"30s\"\n }\n }\n },\n \"version\": 3, <2>\n \"modified_date\": \"2018-10-15T13:21:41.576Z\", <3>\n \"modified_date_in_millis\": 1539609701576 <4>\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 191
- },
- "digest": "0a6dcb918e7d6354c4709505f22a786f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"test-000020\": {\n \"index\": \"test-000020\",\n \"managed\": true,\n \"policy\": \"my_lifecycle3\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"4.12m\",\n \"phase\": \"warm\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"allocate\",\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"check-allocation\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\",\n \"step_info\": { <1>\n \"message\": \"Waiting for all shard copies to be active\",\n \"shards_left_to_allocate\": -1,\n \"all_shards_active\": false,\n \"actual_replicas\": 2\n },\n \"phase_execution\": {\n \"policy\": \"my_lifecycle3\",\n \"phase_definition\": {\n \"min_age\": \"0ms\",\n \"actions\": {\n \"allocate\": {\n \"number_of_replicas\": 2,\n \"include\": {\n \"box_type\": \"warm\"\n },\n \"exclude\": {},\n \"require\": {}\n },\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"version\": 2,\n \"modified_date\": \"2018-10-15T13:20:02.489Z\",\n \"modified_date_in_millis\": 1539609602489\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 255
- },
- "digest": "b7d45a87863e94a174a3af72f9b2d11c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"test-000056\": {\n \"index\": \"test-000056\",\n \"managed\": true,\n \"policy\": \"my_lifecycle3\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"50.1d\",\n \"phase\": \"hot\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"rollover\",\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"ERROR\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\",\n \"failed_step\": \"check-rollover-ready\", <1>\n \"is_auto_retryable_error\": true, <2>\n \"failed_step_retry_count\": 1, <3>\n \"step_info\": { <4>\n \"type\": \"cluster_block_exception\",\n \"reason\": \"index [test-000057/H7lF9n36Rzqa-KfKcnGQMg] blocked by: [FORBIDDEN/5/index read-only (api)\",\n \"index_uuid\": \"H7lF9n36Rzqa-KfKcnGQMg\",\n \"index\": \"test-000057\"\n },\n \"phase_execution\": {\n \"policy\": \"my_lifecycle3\",\n \"phase_definition\": {\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_age\": \"30s\"\n }\n }\n },\n \"version\": 3,\n \"modified_date\": \"2018-10-15T13:21:41.576Z\",\n \"modified_date_in_millis\": 1539609701576\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/start.asciidoc",
- "line": 76
- },
- "digest": "72ae3851160fcf02b8e2cdfd4e57d238",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/start",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.start"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/start.asciidoc",
- "line": 84
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/stop.asciidoc",
- "line": 80
- },
- "digest": "585a34ad79aee16678b37da785933ac8",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/stop",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.stop"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/stop.asciidoc",
- "line": 88
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/put-pipeline.asciidoc",
- "line": 11
- },
- "digest": "e7e28812b86c5257bf48931d131409f0",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/my-pipeline-id\n{\n \"description\" : \"describe pipeline\",\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"bar\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": {
- "description": "describe pipeline",
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "bar"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/put-pipeline.asciidoc",
- "line": 93
- },
- "digest": "3467d11d772321353951461b756e3ffb",
- "lang": "console",
- "found": [],
- "source": "PUT /_ingest/pipeline/my-pipeline-id\n{\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"bar\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": {
- "description": "describe pipeline",
- "version": 123,
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "bar"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/put-pipeline.asciidoc",
- "line": 113
- },
- "digest": "ca42bbe58bdd127eb042389699d4a45c",
- "lang": "console",
- "found": [],
- "source": "PUT /_ingest/pipeline/my-pipeline-id\n{\n \"description\" : \"describe pipeline\",\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"bar\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": {
- "description": "describe pipeline",
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "bar"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 30
- },
- "digest": "6a3a86ff58e5f20950d429cf2832c229",
- "lang": "console",
- "found": [],
- "source": "GET /_ingest/pipeline/my-pipeline-id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": null,
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.get_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 66
- },
- "digest": "6a3a86ff58e5f20950d429cf2832c229",
- "lang": "console",
- "found": [],
- "source": "GET /_ingest/pipeline/my-pipeline-id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": null,
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.get_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 74
- },
- "digest": "82161823bc1112102b52bbb836311b94",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 107
- },
- "digest": "9f549bb400b6cc1523b00d60bc8fd8e1",
- "lang": "console",
- "found": [],
- "source": "GET /_ingest/pipeline/my-pipeline-id?filter_path=*.version",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": {
- "filter_path": "*.version"
- },
- "body": null,
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.get_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 115
- },
- "digest": "61dc34169722548fb040f02e488c8814",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my-pipeline-id\" : {\n \"version\" : 123\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/delete-pipeline.asciidoc",
- "line": 28
- },
- "digest": "dff61a76d5ef9ca8cbe59a416269a84b",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ingest/pipeline/my-pipeline-id",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": null,
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.delete_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/delete-pipeline.asciidoc",
- "line": 67
- },
- "digest": "a7cf31f4b907e4c00132aca75f55790c",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ingest/pipeline/pipeline-one",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ingest/pipeline/pipeline-one",
- "query": null,
- "body": null,
- "params": {
- "id": "pipeline-one"
- },
- "api": "ingest.delete_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/delete-pipeline.asciidoc",
- "line": 76
- },
- "digest": "c6b5c695a9b757b5e7325345b206bde5",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ingest/pipeline/pipeline-*",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ingest/pipeline/pipeline-*",
- "query": null,
- "body": null,
- "params": {
- "id": "pipeline-*"
- },
- "api": "ingest.delete_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/delete-pipeline.asciidoc",
- "line": 85
- },
- "digest": "11e772ff5dbb73408ae30a1a367a0d9b",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ingest/pipeline/*",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ingest/pipeline/*",
- "query": null,
- "body": null,
- "params": {
- "id": "*"
- },
- "api": "ingest.delete_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 31
- },
- "digest": "67ffa135c50c43d6788636c88078c7d1",
- "lang": "console",
- "found": [],
- "source": "POST /_ingest/pipeline/my-pipeline-id/_simulate\n{\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/my-pipeline-id/_simulate",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "bar"
- }
- },
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "rab"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 147
- },
- "digest": "67ffa135c50c43d6788636c88078c7d1",
- "lang": "console",
- "found": [],
- "source": "POST /_ingest/pipeline/my-pipeline-id/_simulate\n{\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/my-pipeline-id/_simulate",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "bar"
- }
- },
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "rab"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 172
- },
- "digest": "661b827203639440daa8f73727c8375e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 212
- },
- "digest": "17c2b0a6b0305804ff3b7fd3b4a68df3",
- "lang": "console",
- "found": [],
- "source": "POST /_ingest/pipeline/_simulate\n{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": null,
- "body": {
- "pipeline": {
- "description": "_description",
- "processors": [
- {
- "set": {
- "field": "field2",
- "value": "_value"
- }
- }
- ]
- },
- "docs": [
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "bar"
- }
- },
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "rab"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 249
- },
- "digest": "661b827203639440daa8f73727c8375e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 296
- },
- "digest": "463de55bb164cde9ac51acd4a7384901",
- "lang": "console",
- "found": [],
- "source": "POST /_ingest/pipeline/_simulate?verbose\n{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value2\"\n }\n },\n {\n \"set\" : {\n \"field\" : \"field3\",\n \"value\" : \"_value3\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": {
- "verbose": true
- },
- "body": {
- "pipeline": {
- "description": "_description",
- "processors": [
- {
- "set": {
- "field": "field2",
- "value": "_value2"
- }
- },
- {
- "set": {
- "field": "field3",
- "value": "_value3"
- }
- }
- ]
- },
- "docs": [
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "bar"
- }
- },
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "rab"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 339
- },
- "digest": "514f42adb2f4e60f6ae30cb4318018f4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"processor_results\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value2\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:46:09.674Z\",\n \"pipeline\": \"_simulate_pipeline\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field3\": \"_value3\",\n \"field2\": \"_value2\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:46:09.675Z\",\n \"pipeline\": \"_simulate_pipeline\"\n }\n }\n }\n ]\n },\n {\n \"processor_results\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value2\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:46:09.676Z\",\n \"pipeline\": \"_simulate_pipeline\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field3\": \"_value3\",\n \"field2\": \"_value2\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:46:09.677Z\",\n \"pipeline\": \"_simulate_pipeline\"\n }\n }\n }\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "rest-api/info.asciidoc",
- "line": 45
- },
- "digest": "9054187cbab5c9e1c4ca2a4dba6a5db0",
- "lang": "console",
- "found": [],
- "source": "GET /_xpack",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_xpack",
- "query": null,
- "body": null,
- "params": null,
- "api": "xpack.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "rest-api/info.asciidoc",
- "line": 52
- },
- "digest": "65e03b5ebd30a8a4dfbfd3c039111ece",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"build\" : {\n \"hash\" : \"2798b1a3ce779b3611bb53a0082d4d741e4d3168\",\n \"date\" : \"2015-04-07T13:34:42Z\"\n },\n \"license\" : {\n \"uid\" : \"893361dc-9749-4997-93cb-xxx\",\n \"type\" : \"trial\",\n \"mode\" : \"trial\",\n \"status\" : \"active\",\n \"expiry_date_in_millis\" : 1542665112332\n },\n \"features\" : {\n \"ccr\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"analytics\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"enrich\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"flattened\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"frozen_indices\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"graph\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ilm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"logstash\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ml\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"monitoring\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"rollup\": {\n \"available\": true,\n \"enabled\": true\n },\n \"security\" : {\n \"available\" : true,\n \"enabled\" : false\n },\n \"slm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"spatial\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"eql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"sql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"transform\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"vectors\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"voting_only\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"watcher\" : {\n \"available\" : true,\n \"enabled\" : true\n }\n },\n \"tagline\" : \"You know, for X\"\n}"
- },
- {
- "source_location": {
- "file": "rest-api/info.asciidoc",
- "line": 163
- },
- "digest": "b11a0675e49df0709be693297ca73a2c",
- "lang": "console",
- "found": [],
- "source": "GET /_xpack?categories=build,features",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_xpack",
- "query": {
- "categories": "build,features"
- },
- "body": null,
- "params": null,
- "api": "xpack.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "rest-api/info.asciidoc",
- "line": 170
- },
- "digest": "4ed946065faa92f9950f04e402676a97",
- "lang": "console",
- "found": [],
- "source": "GET /_xpack?human=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_xpack",
- "query": {
- "human": "false"
- },
- "body": null,
- "params": null,
- "api": "xpack.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/delete-license.asciidoc",
- "line": 36
- },
- "digest": "4f8a4ad49e2bca6784c88ede18a1a709",
- "lang": "console",
- "found": [],
- "source": "DELETE /_license",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_license",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-license.asciidoc",
- "line": 47
- },
- "digest": "11c395d1649733bcab853fe31ec393b2",
- "lang": "console",
- "found": [],
- "source": "GET /_license",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_license",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-license.asciidoc",
- "line": 52
- },
- "digest": "a151a5db7e5b65046743be37fd9a02e9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"license\" : {\n \"status\" : \"active\",\n \"uid\" : \"cbff45e7-c553-41f7-ae4f-9205eabd80xx\",\n \"type\" : \"trial\",\n \"issue_date\" : \"2018-10-20T22:05:12.332Z\",\n \"issue_date_in_millis\" : 1540073112332,\n \"expiry_date\" : \"2018-11-19T22:05:12.332Z\",\n \"expiry_date_in_millis\" : 1542665112332,\n \"max_nodes\" : 1000,\n \"max_resource_units\" : null,\n \"issued_to\" : \"test\",\n \"issuer\" : \"elasticsearch\",\n \"start_date_in_millis\" : -1\n }\n}"
- },
- {
- "source_location": {
- "file": "licensing/get-trial-status.asciidoc",
- "line": 43
- },
- "digest": "88cf60d3310a56d8ae12704abc05b565",
- "lang": "console",
- "found": [],
- "source": "GET /_license/trial_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_license/trial_status",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.get_trial_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-trial-status.asciidoc",
- "line": 50
- },
- "digest": "cd83a052bf4f1fe11413e7aa51e5b9a5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"eligible_to_start_trial\": true\n}"
- },
- {
- "source_location": {
- "file": "licensing/start-trial.asciidoc",
- "line": 47
- },
- "digest": "37f1f2e75ed95308ae436bbbb8d5645e",
- "lang": "console",
- "found": [],
- "source": "POST /_license/start_trial?acknowledge=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_license/start_trial",
- "query": {
- "acknowledge": "true"
- },
- "body": null,
- "params": null,
- "api": "license.post_start_trial"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-basic-status.asciidoc",
- "line": 36
- },
- "digest": "f92d2f5018a8843ffbb56ade15f84406",
- "lang": "console",
- "found": [],
- "source": "GET /_license/basic_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_license/basic_status",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.get_basic_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-basic-status.asciidoc",
- "line": 43
- },
- "digest": "7539f49762b2e372c275d0d061009d19",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"eligible_to_start_basic\": true\n}"
- },
- {
- "source_location": {
- "file": "licensing/start-basic.asciidoc",
- "line": 43
- },
- "digest": "8699d35269a47ba867fa8cc766287413",
- "lang": "console",
- "found": [],
- "source": "POST /_license/start_basic",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_license/start_basic",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.post_start_basic"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/start-basic.asciidoc",
- "line": 63
- },
- "digest": "f58fd031597e2c3df78bf0efd07206e3",
- "lang": "console",
- "found": [],
- "source": "POST /_license/start_basic?acknowledge=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_license/start_basic",
- "query": {
- "acknowledge": "true"
- },
- "body": null,
- "params": null,
- "api": "license.post_start_basic"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/update-license.asciidoc",
- "line": 61
- },
- "digest": "85f2839beeb71edb66988e5c82188be0",
- "lang": "console",
- "found": [],
- "source": "PUT _license\n{\n \"licenses\": [\n {\n \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\":\"basic\",\n \"issue_date_in_millis\":1411948800000,\n \"expiry_date_in_millis\":1914278399999,\n \"max_nodes\":1,\n \"issued_to\":\"issuedTo\",\n \"issuer\":\"issuer\",\n \"signature\":\"xx\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_license",
- "query": null,
- "body": {
- "licenses": [
- {
- "uid": "893361dc-9749-4997-93cb-802e3d7fa4xx",
- "type": "basic",
- "issue_date_in_millis": 1411948800000,
- "expiry_date_in_millis": 1914278399999,
- "max_nodes": 1,
- "issued_to": "issuedTo",
- "issuer": "issuer",
- "signature": "xx"
- }
- ]
- },
- "params": null,
- "api": "license.post"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/update-license.asciidoc",
- "line": 137
- },
- "digest": "46b1c1f6e0c86528be84c373eeb8d425",
- "lang": "console",
- "found": [],
- "source": "PUT _license?acknowledge=true\n{\n \"licenses\": [\n {\n \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\":\"basic\",\n \"issue_date_in_millis\":1411948800000,\n \"expiry_date_in_millis\":1914278399999,\n \"max_nodes\":1,\n \"issued_to\":\"issuedTo\",\n \"issuer\":\"issuer\",\n \"signature\":\"xx\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_license",
- "query": {
- "acknowledge": "true"
- },
- "body": {
- "licenses": [
- {
- "uid": "893361dc-9749-4997-93cb-802e3d7fa4xx",
- "type": "basic",
- "issue_date_in_millis": 1411948800000,
- "expiry_date_in_millis": 1914278399999,
- "max_nodes": 1,
- "issued_to": "issuedTo",
- "issuer": "issuer",
- "signature": "xx"
- }
- ]
- },
- "params": null,
- "api": "license.post"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/post-calendar-event.asciidoc",
- "line": 63
- },
- "digest": "c067182d385f59ce5952fb9a716fbf05",
- "lang": "console",
- "found": [],
- "source": "POST _ml/calendars/planned-outages/events\n{\n \"events\" : [\n {\"description\": \"event 1\", \"start_time\": 1513641600000, \"end_time\": 1513728000000},\n {\"description\": \"event 2\", \"start_time\": 1513814400000, \"end_time\": 1513900800000},\n {\"description\": \"event 3\", \"start_time\": 1514160000000, \"end_time\": 1514246400000}\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/calendars/planned-outages/events",
- "query": null,
- "body": {
- "events": [
- {
- "description": "event 1",
- "start_time": 1513641600000,
- "end_time": 1513728000000
- },
- {
- "description": "event 2",
- "start_time": 1513814400000,
- "end_time": 1513900800000
- },
- {
- "description": "event 3",
- "start_time": 1514160000000,
- "end_time": 1514246400000
- }
- ]
- },
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.post_calendar_events"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/post-calendar-event.asciidoc",
- "line": 78
- },
- "digest": "d85277c7ee060163024f51ce226e9687",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"events\": [\n {\n \"description\": \"event 1\",\n \"start_time\": 1513641600000,\n \"end_time\": 1513728000000,\n \"calendar_id\": \"planned-outages\"\n },\n {\n \"description\": \"event 2\",\n \"start_time\": 1513814400000,\n \"end_time\": 1513900800000,\n \"calendar_id\": \"planned-outages\"\n },\n {\n \"description\": \"event 3\",\n \"start_time\": 1514160000000,\n \"end_time\": 1514246400000,\n \"calendar_id\": \"planned-outages\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-calendar-job.asciidoc",
- "line": 38
- },
- "digest": "1b2ab75d3c8064fac6ecc63104396c02",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/calendars/planned-outages/jobs/total-requests",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/calendars/planned-outages/jobs/total-requests",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages",
- "job_id": "total-requests"
- },
- "api": "ml.put_calendar_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-calendar-job.asciidoc",
- "line": 46
- },
- "digest": "1dae5fc15721297e0bbb7f75f4d688c8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": [\n \"total-requests\"\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/close-job.asciidoc",
- "line": 92
- },
- "digest": "75957a7d1b67e3d47899c5f18b32cb61",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_close",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_close",
- "query": null,
- "body": null,
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.close_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/close-job.asciidoc",
- "line": 100
- },
- "digest": "bde804b8b2cf95aad1cf3ca64df67fa9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"closed\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-job.asciidoc",
- "line": 239
- },
- "digest": "9c11e238772d67dbc9d273776de9916c",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/anomaly_detectors/total-requests\n{\n \"description\" : \"Total sum of requests\",\n \"analysis_config\" : {\n \"bucket_span\":\"10m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of total\",\n \"function\": \"sum\",\n \"field_name\": \"total\"\n }\n ]\n },\n \"data_description\" : {\n \"time_field\":\"timestamp\",\n \"time_format\": \"epoch_ms\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/anomaly_detectors/total-requests",
- "query": null,
- "body": {
- "description": "Total sum of requests",
- "analysis_config": {
- "bucket_span": "10m",
- "detectors": [
- {
- "detector_description": "Sum of total",
- "function": "sum",
- "field_name": "total"
- }
- ]
- },
- "data_description": {
- "time_field": "timestamp",
- "time_format": "epoch_ms"
- }
- },
- "params": {
- "job_id": "total-requests"
- },
- "api": "ml.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-job.asciidoc",
- "line": 263
- },
- "digest": "f7a3b1a944f2c19acd808c89012a47a3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"job_id\" : \"total-requests\",\n \"job_type\" : \"anomaly_detector\",\n \"job_version\" : \"8.0.0\",\n \"description\" : \"Total sum of requests\",\n \"create_time\" : 1562352500629,\n \"analysis_config\" : {\n \"bucket_span\" : \"10m\",\n \"detectors\" : [\n {\n \"detector_description\" : \"Sum of total\",\n \"function\" : \"sum\",\n \"field_name\" : \"total\",\n \"detector_index\" : 0\n }\n ],\n \"influencers\" : [ ]\n },\n \"analysis_limits\" : {\n \"model_memory_limit\" : \"1024mb\",\n \"categorization_examples_limit\" : 4\n },\n \"data_description\" : {\n \"time_field\" : \"timestamp\",\n \"time_format\" : \"epoch_ms\"\n },\n \"model_snapshot_retention_days\" : 1,\n \"results_index_name\" : \"shared\",\n \"allow_lazy_open\" : false\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-calendar.asciidoc",
- "line": 46
- },
- "digest": "e61b5abe85000cc954a42e2cd74f3a26",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/calendars/planned-outages",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/calendars/planned-outages",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.put_calendar"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-calendar.asciidoc",
- "line": 54
- },
- "digest": "171c0cd3b79df8fc5fe414cf9607f56f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": []\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-datafeed.asciidoc",
- "line": 105
- },
- "digest": "23067c5e8da958fa4d914f3b5c9bf607",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/datafeeds/datafeed-total-requests\n{\n \"job_id\": \"total-requests\",\n \"indices\": [\"server-metrics\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/datafeeds/datafeed-total-requests",
- "query": null,
- "body": {
- "job_id": "total-requests",
- "indices": [
- "server-metrics"
- ]
- },
- "params": {
- "datafeed_id": "datafeed-total-requests"
- },
- "api": "ml.put_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-datafeed.asciidoc",
- "line": 117
- },
- "digest": "6bdf0b32f57bad22be8b6bfc07ff58d7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"datafeed_id\": \"datafeed-total-requests\",\n \"job_id\": \"total-requests\",\n \"query_delay\": \"83474ms\",\n \"indices\": [\n \"server-metrics\"\n ],\n \"query\": {\n \"match_all\": {\n \"boost\": 1.0\n }\n },\n \"scroll_size\": 1000,\n \"chunking_config\": {\n \"mode\": \"auto\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-filter.asciidoc",
- "line": 52
- },
- "digest": "b4aec2a1d353852507c091bdb629b765",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/filters/safe_domains\n{\n \"description\": \"A list of safe domains\",\n \"items\": [\"*.google.com\", \"wikipedia.org\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/filters/safe_domains",
- "query": null,
- "body": {
- "description": "A list of safe domains",
- "items": [
- "*.google.com",
- "wikipedia.org"
- ]
- },
- "params": {
- "filter_id": "safe_domains"
- },
- "api": "ml.put_filter"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-filter.asciidoc",
- "line": 64
- },
- "digest": "e5edabc3d3e627c7ed92623b855c05d9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"filter_id\": \"safe_domains\",\n \"description\": \"A list of safe domains\",\n \"items\": [\"*.google.com\", \"wikipedia.org\"]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar.asciidoc",
- "line": 40
- },
- "digest": "63893e7e9479a9b60db71dcddcc79aaf",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/calendars/planned-outages",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/calendars/planned-outages",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.delete_calendar"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar.asciidoc",
- "line": 48
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-datafeed.asciidoc",
- "line": 45
- },
- "digest": "8a12cd824404d74f098d854716a26899",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/datafeeds/datafeed-total-requests",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/datafeeds/datafeed-total-requests",
- "query": null,
- "body": null,
- "params": {
- "datafeed_id": "datafeed-total-requests"
- },
- "api": "ml.delete_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-datafeed.asciidoc",
- "line": 53
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar-event.asciidoc",
- "line": 45
- },
- "digest": "f6982ff80b9a64cd5fcac5b20908c906",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages",
- "event_id": "LS8LJGEBMTCMA-qz49st"
- },
- "api": "ml.delete_calendar_event"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-filter.asciidoc",
- "line": 41
- },
- "digest": "8c5d48252cd6d1ee26a2bb817f89c78e",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/filters/safe_domains",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/filters/safe_domains",
- "query": null,
- "body": null,
- "params": {
- "filter_id": "safe_domains"
- },
- "api": "ml.delete_filter"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-filter.asciidoc",
- "line": 49
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-forecast.asciidoc",
- "line": 71
- },
- "digest": "eb4e43b47867b54214a8630172dd0e21",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/anomaly_detectors/total-requests/_forecast/_all",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/anomaly_detectors/total-requests/_forecast/_all",
- "query": null,
- "body": null,
- "params": {
- "job_id": "total-requests",
- "forecast_id": "_all"
- },
- "api": "ml.delete_forecast"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-job.asciidoc",
- "line": 60
- },
- "digest": "3ac8b5234e9d53859245cf8ab0094ca5",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/anomaly_detectors/total-requests",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/anomaly_detectors/total-requests",
- "query": null,
- "body": null,
- "params": {
- "job_id": "total-requests"
- },
- "api": "ml.delete_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-job.asciidoc",
- "line": 68
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-job.asciidoc",
- "line": 77
- },
- "digest": "ccec66fb20d5ede6c691e0890cfe402a",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/anomaly_detectors/total-requests?wait_for_completion=false",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/anomaly_detectors/total-requests",
- "query": {
- "wait_for_completion": "false"
- },
- "body": null,
- "params": {
- "job_id": "total-requests"
- },
- "api": "ml.delete_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-job.asciidoc",
- "line": 86
- },
- "digest": "7911626413c70672fd05359a832096c3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"task\": \"oTUltX4IQMOUUVeiohTt8A:39\"\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar-job.asciidoc",
- "line": 38
- },
- "digest": "1b0b29e5cd7550c648d0892378e93804",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/calendars/planned-outages/jobs/total-requests",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/calendars/planned-outages/jobs/total-requests",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages",
- "job_id": "total-requests"
- },
- "api": "ml.delete_calendar_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar-job.asciidoc",
- "line": 47
- },
- "digest": "f114ee8c6333648f1cfd511a4bc15655",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": []\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-snapshot.asciidoc",
- "line": 44
- },
- "digest": "1e08e054c761353f99211cd18e8ca47b",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/anomaly_detectors/farequote/model_snapshots/1491948163",
- "query": null,
- "body": null,
- "params": {
- "job_id": "farequote",
- "snapshot_id": "1491948163"
- },
- "api": "ml.delete_model_snapshot"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-snapshot.asciidoc",
- "line": 52
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-expired-data.asciidoc",
- "line": 36
- },
- "digest": "f2f09bc4723805c7aaabdc83c55100fa",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/_delete_expired_data",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/_delete_expired_data",
- "query": null,
- "body": null,
- "params": null,
- "api": "ml.delete_expired_data"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-expired-data.asciidoc",
- "line": 44
- },
- "digest": "c852b65b9085718ec12e9fc5b41d8655",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"deleted\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/find-file-structure.asciidoc",
- "line": 247
- },
- "digest": "7a145f2c4ad1c3c9fea24afeadb847ef",
- "lang": "console",
- "found": [],
- "source": "POST _ml/find_file_structure\n{\"name\": \"Leviathan Wakes\", \"author\": \"James S.A. Corey\", \"release_date\": \"2011-06-02\", \"page_count\": 561}\n{\"name\": \"Hyperion\", \"author\": \"Dan Simmons\", \"release_date\": \"1989-05-26\", \"page_count\": 482}\n{\"name\": \"Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1965-06-01\", \"page_count\": 604}\n{\"name\": \"Dune Messiah\", \"author\": \"Frank Herbert\", \"release_date\": \"1969-10-15\", \"page_count\": 331}\n{\"name\": \"Children of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1976-04-21\", \"page_count\": 408}\n{\"name\": \"God Emperor of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1981-05-28\", \"page_count\": 454}\n{\"name\": \"Consider Phlebas\", \"author\": \"Iain M. Banks\", \"release_date\": \"1987-04-23\", \"page_count\": 471}\n{\"name\": \"Pandora's Star\", \"author\": \"Peter F. Hamilton\", \"release_date\": \"2004-03-02\", \"page_count\": 768}\n{\"name\": \"Revelation Space\", \"author\": \"Alastair Reynolds\", \"release_date\": \"2000-03-15\", \"page_count\": 585}\n{\"name\": \"A Fire Upon the Deep\", \"author\": \"Vernor Vinge\", \"release_date\": \"1992-06-01\", \"page_count\": 613}\n{\"name\": \"Ender's Game\", \"author\": \"Orson Scott Card\", \"release_date\": \"1985-06-01\", \"page_count\": 324}\n{\"name\": \"1984\", \"author\": \"George Orwell\", \"release_date\": \"1985-06-01\", \"page_count\": 328}\n{\"name\": \"Fahrenheit 451\", \"author\": \"Ray Bradbury\", \"release_date\": \"1953-10-15\", \"page_count\": 227}\n{\"name\": \"Brave New World\", \"author\": \"Aldous Huxley\", \"release_date\": \"1932-06-01\", \"page_count\": 268}\n{\"name\": \"Foundation\", \"author\": \"Isaac Asimov\", \"release_date\": \"1951-06-01\", \"page_count\": 224}\n{\"name\": \"The Giver\", \"author\": \"Lois Lowry\", \"release_date\": \"1993-04-26\", \"page_count\": 208}\n{\"name\": \"Slaughterhouse-Five\", \"author\": \"Kurt Vonnegut\", \"release_date\": \"1969-06-01\", \"page_count\": 275}\n{\"name\": \"The Hitchhiker's Guide to the Galaxy\", \"author\": \"Douglas Adams\", \"release_date\": \"1979-10-12\", \"page_count\": 180}\n{\"name\": \"Snow Crash\", \"author\": \"Neal Stephenson\", \"release_date\": \"1992-06-01\", \"page_count\": 470}\n{\"name\": \"Neuromancer\", \"author\": \"William Gibson\", \"release_date\": \"1984-07-01\", \"page_count\": 271}\n{\"name\": \"The Handmaid's Tale\", \"author\": \"Margaret Atwood\", \"release_date\": \"1985-06-01\", \"page_count\": 311}\n{\"name\": \"Starship Troopers\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1959-12-01\", \"page_count\": 335}\n{\"name\": \"The Left Hand of Darkness\", \"author\": \"Ursula K. Le Guin\", \"release_date\": \"1969-06-01\", \"page_count\": 304}\n{\"name\": \"The Moon is a Harsh Mistress\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1966-04-01\", \"page_count\": 288}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/find_file_structure",
- "query": null,
- "body": [
- {
- "name": "Leviathan Wakes",
- "author": "James S.A. Corey",
- "release_date": "2011-06-02",
- "page_count": 561
- },
- {
- "name": "Hyperion",
- "author": "Dan Simmons",
- "release_date": "1989-05-26",
- "page_count": 482
- },
- {
- "name": "Dune",
- "author": "Frank Herbert",
- "release_date": "1965-06-01",
- "page_count": 604
- },
- {
- "name": "Dune Messiah",
- "author": "Frank Herbert",
- "release_date": "1969-10-15",
- "page_count": 331
- },
- {
- "name": "Children of Dune",
- "author": "Frank Herbert",
- "release_date": "1976-04-21",
- "page_count": 408
- },
- {
- "name": "God Emperor of Dune",
- "author": "Frank Herbert",
- "release_date": "1981-05-28",
- "page_count": 454
- },
- {
- "name": "Consider Phlebas",
- "author": "Iain M. Banks",
- "release_date": "1987-04-23",
- "page_count": 471
- },
- {
- "name": "Pandora's Star",
- "author": "Peter F. Hamilton",
- "release_date": "2004-03-02",
- "page_count": 768
- },
- {
- "name": "Revelation Space",
- "author": "Alastair Reynolds",
- "release_date": "2000-03-15",
- "page_count": 585
- },
- {
- "name": "A Fire Upon the Deep",
- "author": "Vernor Vinge",
- "release_date": "1992-06-01",
- "page_count": 613
- },
- {
- "name": "Ender's Game",
- "author": "Orson Scott Card",
- "release_date": "1985-06-01",
- "page_count": 324
- },
- {
- "name": "1984",
- "author": "George Orwell",
- "release_date": "1985-06-01",
- "page_count": 328
- },
- {
- "name": "Fahrenheit 451",
- "author": "Ray Bradbury",
- "release_date": "1953-10-15",
- "page_count": 227
- },
- {
- "name": "Brave New World",
- "author": "Aldous Huxley",
- "release_date": "1932-06-01",
- "page_count": 268
- },
- {
- "name": "Foundation",
- "author": "Isaac Asimov",
- "release_date": "1951-06-01",
- "page_count": 224
- },
- {
- "name": "The Giver",
- "author": "Lois Lowry",
- "release_date": "1993-04-26",
- "page_count": 208
- },
- {
- "name": "Slaughterhouse-Five",
- "author": "Kurt Vonnegut",
- "release_date": "1969-06-01",
- "page_count": 275
- },
- {
- "name": "The Hitchhiker's Guide to the Galaxy",
- "author": "Douglas Adams",
- "release_date": "1979-10-12",
- "page_count": 180
- },
- {
- "name": "Snow Crash",
- "author": "Neal Stephenson",
- "release_date": "1992-06-01",
- "page_count": 470
- },
- {
- "name": "Neuromancer",
- "author": "William Gibson",
- "release_date": "1984-07-01",
- "page_count": 271
- },
- {
- "name": "The Handmaid's Tale",
- "author": "Margaret Atwood",
- "release_date": "1985-06-01",
- "page_count": 311
- },
- {
- "name": "Starship Troopers",
- "author": "Robert A. Heinlein",
- "release_date": "1959-12-01",
- "page_count": 335
- },
- {
- "name": "The Left Hand of Darkness",
- "author": "Ursula K. Le Guin",
- "release_date": "1969-06-01",
- "page_count": 304
- },
- {
- "name": "The Moon is a Harsh Mistress",
- "author": "Robert A. Heinlein",
- "release_date": "1966-04-01",
- "page_count": 288
- }
- ],
- "params": null,
- "api": "ml.find_file_structure"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/find-file-structure.asciidoc",
- "line": 278
- },
- "digest": "70a2df9a5d05f1dc9e9b4152e3098174",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"num_lines_analyzed\" : 24, <1>\n \"num_messages_analyzed\" : 24, <2>\n \"sample_start\" : \"{\\\"name\\\": \\\"Leviathan Wakes\\\", \\\"author\\\": \\\"James S.A. Corey\\\", \\\"release_date\\\": \\\"2011-06-02\\\", \\\"page_count\\\": 561}\\n{\\\"name\\\": \\\"Hyperion\\\", \\\"author\\\": \\\"Dan Simmons\\\", \\\"release_date\\\": \\\"1989-05-26\\\", \\\"page_count\\\": 482}\\n\", <3>\n \"charset\" : \"UTF-8\", <4>\n \"has_byte_order_marker\" : false, <5>\n \"format\" : \"ndjson\", <6>\n \"timestamp_field\" : \"release_date\", <7>\n \"joda_timestamp_formats\" : [ <8>\n \"ISO8601\"\n ],\n \"java_timestamp_formats\" : [ <9>\n \"ISO8601\"\n ],\n \"need_client_timezone\" : true, <10>\n \"mappings\" : { <11>\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"author\" : {\n \"type\" : \"keyword\"\n },\n \"name\" : {\n \"type\" : \"keyword\"\n },\n \"page_count\" : {\n \"type\" : \"long\"\n },\n \"release_date\" : {\n \"type\" : \"date\",\n \"format\" : \"iso8601\"\n }\n },\n \"ingest_pipeline\" : {\n \"description\" : \"Ingest pipeline created by file structure finder\",\n \"processors\" : [\n {\n \"date\" : {\n \"field\" : \"release_date\",\n \"timezone\" : \"{{ event.timezone }}\",\n \"formats\" : [\n \"ISO8601\"\n ]\n }\n }\n ]\n },\n \"field_stats\" : { <12>\n \"author\" : {\n \"count\" : 24,\n \"cardinality\" : 20,\n \"top_hits\" : [\n {\n \"value\" : \"Frank Herbert\",\n \"count\" : 4\n },\n {\n \"value\" : \"Robert A. Heinlein\",\n \"count\" : 2\n },\n {\n \"value\" : \"Alastair Reynolds\",\n \"count\" : 1\n },\n {\n \"value\" : \"Aldous Huxley\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dan Simmons\",\n \"count\" : 1\n },\n {\n \"value\" : \"Douglas Adams\",\n \"count\" : 1\n },\n {\n \"value\" : \"George Orwell\",\n \"count\" : 1\n },\n {\n \"value\" : \"Iain M. Banks\",\n \"count\" : 1\n },\n {\n \"value\" : \"Isaac Asimov\",\n \"count\" : 1\n },\n {\n \"value\" : \"James S.A. Corey\",\n \"count\" : 1\n }\n ]\n },\n \"name\" : {\n \"count\" : 24,\n \"cardinality\" : 24,\n \"top_hits\" : [\n {\n \"value\" : \"1984\",\n \"count\" : 1\n },\n {\n \"value\" : \"A Fire Upon the Deep\",\n \"count\" : 1\n },\n {\n \"value\" : \"Brave New World\",\n \"count\" : 1\n },\n {\n \"value\" : \"Children of Dune\",\n \"count\" : 1\n },\n {\n \"value\" : \"Consider Phlebas\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dune\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dune Messiah\",\n \"count\" : 1\n },\n {\n \"value\" : \"Ender's Game\",\n \"count\" : 1\n },\n {\n \"value\" : \"Fahrenheit 451\",\n \"count\" : 1\n },\n {\n \"value\" : \"Foundation\",\n \"count\" : 1\n }\n ]\n },\n \"page_count\" : {\n \"count\" : 24,\n \"cardinality\" : 24,\n \"min_value\" : 180,\n \"max_value\" : 768,\n \"mean_value\" : 387.0833333333333,\n \"median_value\" : 329.5,\n \"top_hits\" : [\n {\n \"value\" : 180,\n \"count\" : 1\n },\n {\n \"value\" : 208,\n \"count\" : 1\n },\n {\n \"value\" : 224,\n \"count\" : 1\n },\n {\n \"value\" : 227,\n \"count\" : 1\n },\n {\n \"value\" : 268,\n \"count\" : 1\n },\n {\n \"value\" : 271,\n \"count\" : 1\n },\n {\n \"value\" : 275,\n \"count\" : 1\n },\n {\n \"value\" : 288,\n \"count\" : 1\n },\n {\n \"value\" : 304,\n \"count\" : 1\n },\n {\n \"value\" : 311,\n \"count\" : 1\n }\n ]\n },\n \"release_date\" : {\n \"count\" : 24,\n \"cardinality\" : 20,\n \"earliest\" : \"1932-06-01\",\n \"latest\" : \"2011-06-02\",\n \"top_hits\" : [\n {\n \"value\" : \"1985-06-01\",\n \"count\" : 3\n },\n {\n \"value\" : \"1969-06-01\",\n \"count\" : 2\n },\n {\n \"value\" : \"1992-06-01\",\n \"count\" : 2\n },\n {\n \"value\" : \"1932-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1951-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1953-10-15\",\n \"count\" : 1\n },\n {\n \"value\" : \"1959-12-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1965-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1966-04-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1969-10-15\",\n \"count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/flush-job.asciidoc",
- "line": 71
- },
- "digest": "02520ac7816b2c4cf8fb413fd16122f2",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_flush\n{\n \"calc_interim\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_flush",
- "query": null,
- "body": {
- "calc_interim": true
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.flush_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/flush-job.asciidoc",
- "line": 82
- },
- "digest": "aa814fa4e6fba339421d0c6c94680041",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"flushed\": true,\n \"last_finalized_bucket_end\": 1455234900000\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/flush-job.asciidoc",
- "line": 98
- },
- "digest": "3033133e8675524fd8f969db0625b62e",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/total-requests/_flush\n{\n \"advance_time\": \"1514804400\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/total-requests/_flush",
- "query": null,
- "body": {
- "advance_time": "1514804400"
- },
- "params": {
- "job_id": "total-requests"
- },
- "api": "ml.flush_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/flush-job.asciidoc",
- "line": 109
- },
- "digest": "f6622deb2aae0e2e468ff3b3285eaaa5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"flushed\": true,\n \"last_finalized_bucket_end\": 1514804400000\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/forecast.asciidoc",
- "line": 61
- },
- "digest": "591c7fb7451069829a14bba593136f1f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_forecast\n{\n \"duration\": \"10d\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_forecast",
- "query": null,
- "body": {
- "duration": "10d"
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.forecast"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-bucket.asciidoc",
- "line": 174
- },
- "digest": "f96d4614f2fc294339fef325b794355f",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/low_request_rate/results/buckets\n{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/low_request_rate/results/buckets",
- "query": null,
- "body": {
- "anomaly_score": 80,
- "start": "1454530200001"
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.get_buckets"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-calendar.asciidoc",
- "line": 68
- },
- "digest": "5fca6671bc8eaddc44ac488d1c3c6909",
- "lang": "console",
- "found": [],
- "source": "GET _ml/calendars/planned-outages",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/calendars/planned-outages",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.get_calendars"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-calendar.asciidoc",
- "line": 76
- },
- "digest": "e611275d3d0d39a05718b5468d3c51b4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 1,\n \"calendars\": [\n {\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": [\n \"total-requests\"\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-category.asciidoc",
- "line": 100
- },
- "digest": "e8f1c9ee003d115ec8f55e57990df6e4",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/esxi_log/results/categories\n{\n \"page\":{\n \"size\": 1\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/esxi_log/results/categories",
- "query": null,
- "body": {
- "page": {
- "size": 1
- }
- },
- "params": {
- "job_id": "esxi_log"
- },
- "api": "ml.get_categories"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-datafeed.asciidoc",
- "line": 77
- },
- "digest": "4fa9ee04188cbf0b38cfc28f6a56527d",
- "lang": "console",
- "found": [],
- "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/datafeeds/datafeed-high_sum_total_sales",
- "query": null,
- "body": null,
- "params": {
- "datafeed_id": "datafeed-high_sum_total_sales"
- },
- "api": "ml.get_datafeeds"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-datafeed.asciidoc",
- "line": 85
- },
- "digest": "5d99d21222b701c5d94bfccefc210a6e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"datafeeds\" : [\n {\n \"datafeed_id\" : \"datafeed-high_sum_total_sales\",\n \"job_id\" : \"high_sum_total_sales\",\n \"query_delay\" : \"93169ms\",\n \"indices\" : [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\" : {\n \"bool\" : {\n \"filter\" : [\n {\n \"term\" : {\n \"_index\" : \"kibana_sample_data_ecommerce\"\n }\n }\n ]\n }\n },\n \"scroll_size\" : 1000,\n \"chunking_config\" : {\n \"mode\" : \"auto\"\n },\n \"delayed_data_check_config\" : {\n \"enabled\" : true\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-datafeed-stats.asciidoc",
- "line": 122
- },
- "digest": "f44d287c6937785eb09b91353c1deb1e",
- "lang": "console",
- "found": [],
- "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/datafeeds/datafeed-high_sum_total_sales/_stats",
- "query": null,
- "body": null,
- "params": {
- "datafeed_id": "datafeed-high_sum_total_sales"
- },
- "api": "ml.get_datafeed_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-datafeed-stats.asciidoc",
- "line": 130
- },
- "digest": "1217b5b9acc1a42b1854ce7d5d6f34d2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"datafeeds\" : [\n {\n \"datafeed_id\" : \"datafeed-high_sum_total_sales\",\n \"state\" : \"started\",\n \"node\" : {\n \"id\" : \"7bmMXyWCRs-TuPfGJJ_yMw\",\n \"name\" : \"node-0\",\n \"ephemeral_id\" : \"hoXMLZB0RWKfR9UPPUCxXX\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"attributes\" : {\n \"ml.machine_memory\" : \"17179869184\",\n \"ml.max_open_jobs\" : \"20\"\n }\n },\n \"assignment_explanation\" : \"\",\n \"timing_stats\" : {\n \"job_id\" : \"high_sum_total_sales\",\n \"search_count\" : 7,\n \"bucket_count\" : 743,\n \"total_search_time_ms\" : 134.0,\n \"average_search_time_per_bucket_ms\" : 0.180349932705249,\n \"exponential_average_search_time_per_hour_ms\" : 11.514712961628677\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-influencer.asciidoc",
- "line": 128
- },
- "digest": "5bbccf103107e505c17ae59863753efd",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/high_sum_total_sales/results/influencers\n{\n \"sort\": \"influencer_score\",\n \"desc\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/high_sum_total_sales/results/influencers",
- "query": null,
- "body": {
- "sort": "influencer_score",
- "desc": true
- },
- "params": {
- "job_id": "high_sum_total_sales"
- },
- "api": "ml.get_influencers"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-job.asciidoc",
- "line": 90
- },
- "digest": "86280dcb49aa89083be4b2644daf1b7c",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/high_sum_total_sales",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/high_sum_total_sales",
- "query": null,
- "body": null,
- "params": {
- "job_id": "high_sum_total_sales"
- },
- "api": "ml.get_jobs"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-job-stats.asciidoc",
- "line": 367
- },
- "digest": "9298aaf8232a819e79b3bf8471245e98",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/low_request_rate/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/low_request_rate/_stats",
- "query": null,
- "body": null,
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.get_job_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-ml-info.asciidoc",
- "line": 41
- },
- "digest": "4d7c0b52d3c0a084157428624c543c90",
- "lang": "console",
- "found": [],
- "source": "GET _ml/info",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/info",
- "query": null,
- "body": null,
- "params": null,
- "api": "ml.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-ml-info.asciidoc",
- "line": 49
- },
- "digest": "d7f223ca9bb78d5eaaa7be550e288afa",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"defaults\" : {\n \"anomaly_detectors\" : {\n \"categorization_analyzer\" : {\n \"tokenizer\" : \"ml_classic\",\n \"filter\" : [\n {\n \"type\" : \"stop\",\n \"stopwords\" : [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\",\n \"Sun\",\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n \"GMT\",\n \"UTC\"\n ]\n }\n ]\n },\n \"model_memory_limit\" : \"1gb\",\n \"categorization_examples_limit\" : 4,\n \"model_snapshot_retention_days\" : 1\n },\n \"datafeeds\" : {\n \"scroll_size\" : 1000\n }\n },\n \"upgrade_mode\": false,\n \"native_code\" : {\n \"version\": \"7.0.0\",\n \"build_hash\": \"99a07c016d5a73\"\n },\n \"limits\" : { }\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-snapshot.asciidoc",
- "line": 193
- },
- "digest": "c873f9cd093e26515148f052e28c7805",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots\n{\n \"start\": \"1575402236000\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots",
- "query": null,
- "body": {
- "start": "1575402236000"
- },
- "params": {
- "job_id": "high_sum_total_sales"
- },
- "api": "ml.get_model_snapshots"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-overall-buckets.asciidoc",
- "line": 124
- },
- "digest": "e48e7da65c2b32d724fd7e3bfa175c6f",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/job-*/results/overall_buckets\n{\n \"overall_score\": 80,\n \"start\": \"1403532000000\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/job-*/results/overall_buckets",
- "query": null,
- "body": {
- "overall_score": 80,
- "start": "1403532000000"
- },
- "params": {
- "job_id": "job-*"
- },
- "api": "ml.get_overall_buckets"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-overall-buckets.asciidoc",
- "line": 169
- },
- "digest": "405db6f3a01eceacfaa8b0ed3e4b3ac2",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/job-*/results/overall_buckets\n{\n \"top_n\": 2,\n \"overall_score\": 50.0,\n \"start\": \"1403532000000\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/job-*/results/overall_buckets",
- "query": null,
- "body": {
- "top_n": 2,
- "overall_score": 50,
- "start": "1403532000000"
- },
- "params": {
- "job_id": "job-*"
- },
- "api": "ml.get_overall_buckets"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-calendar-event.asciidoc",
- "line": 85
- },
- "digest": "39d6f575c9458d9c941364dfd0493fa0",
- "lang": "console",
- "found": [],
- "source": "GET _ml/calendars/planned-outages/events",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/calendars/planned-outages/events",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.get_calendar_events"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-calendar-event.asciidoc",
- "line": 93
- },
- "digest": "8c820d98ef814220df1fed0dad919ca6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 3,\n \"events\": [\n {\n \"description\": \"event 1\",\n \"start_time\": 1513641600000,\n \"end_time\": 1513728000000,\n \"calendar_id\": \"planned-outages\",\n \"event_id\": \"LS8LJGEBMTCMA-qz49st\"\n },\n {\n \"description\": \"event 2\",\n \"start_time\": 1513814400000,\n \"end_time\": 1513900800000,\n \"calendar_id\": \"planned-outages\",\n \"event_id\": \"Li8LJGEBMTCMA-qz49st\"\n },\n {\n \"description\": \"event 3\",\n \"start_time\": 1514160000000,\n \"end_time\": 1514246400000,\n \"calendar_id\": \"planned-outages\",\n \"event_id\": \"Ly8LJGEBMTCMA-qz49st\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-filter.asciidoc",
- "line": 67
- },
- "digest": "800861c15bb33ca01a46fb97dde7537a",
- "lang": "console",
- "found": [],
- "source": "GET _ml/filters/safe_domains",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/filters/safe_domains",
- "query": null,
- "body": null,
- "params": {
- "filter_id": "safe_domains"
- },
- "api": "ml.get_filters"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-filter.asciidoc",
- "line": 75
- },
- "digest": "b72f41bb18115f07edacf2eb5e6ec8c4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 1,\n \"filters\": [\n {\n \"filter_id\": \"safe_domains\",\n \"description\": \"A list of safe domains\",\n \"items\": [\n \"*.google.com\",\n \"wikipedia.org\"\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-record.asciidoc",
- "line": 202
- },
- "digest": "20e3b181114e00c943a27a9bbcf85f15",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/low_request_rate/results/records\n{\n \"sort\": \"record_score\",\n \"desc\": true,\n \"start\": \"1454944100000\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/low_request_rate/results/records",
- "query": null,
- "body": {
- "sort": "record_score",
- "desc": true,
- "start": "1454944100000"
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.get_records"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/open-job.asciidoc",
- "line": 54
- },
- "digest": "a6204edaa0bcf7b82a89ab4f6bda0914",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_open\n{\n \"timeout\": \"35m\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_open",
- "query": null,
- "body": {
- "timeout": "35m"
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.open_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/open-job.asciidoc",
- "line": 65
- },
- "digest": "71f99817272cf85977dc23543fbacf0b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"opened\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/preview-datafeed.asciidoc",
- "line": 51
- },
- "digest": "38eed000de433b540116928681c520d3",
- "lang": "console",
- "found": [],
- "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_preview",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/datafeeds/datafeed-high_sum_total_sales/_preview",
- "query": null,
- "body": null,
- "params": {
- "datafeed_id": "datafeed-high_sum_total_sales"
- },
- "api": "ml.preview_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/preview-datafeed.asciidoc",
- "line": 59
- },
- "digest": "cb9301147c1c73e6d4b6abfbe731e2f7",
- "lang": "console-result",
- "found": [],
- "source": "[\n {\n \"order_date\" : 1574294659000,\n \"category.keyword\" : \"Men's Clothing\",\n \"customer_full_name.keyword\" : \"Sultan Al Benson\",\n \"taxful_total_price\" : 35.96875\n },\n {\n \"order_date\" : 1574294918000,\n \"category.keyword\" : [\n \"Women's Accessories\",\n \"Women's Clothing\"\n ],\n \"customer_full_name.keyword\" : \"Pia Webb\",\n \"taxful_total_price\" : 83.0\n },\n {\n \"order_date\" : 1574295782000,\n \"category.keyword\" : [\n \"Women's Accessories\",\n \"Women's Shoes\"\n ],\n \"customer_full_name.keyword\" : \"Brigitte Graham\",\n \"taxful_total_price\" : 72.0\n }\n]"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/revert-snapshot.asciidoc",
- "line": 62
- },
- "digest": "b173b1b5bab610668ab74d5b2ab03f78",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/high_sum_total_sales/model_snapshots/1575402237/_revert\n{\n \"delete_intervening_results\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots/1575402237/_revert",
- "query": null,
- "body": {
- "delete_intervening_results": true
- },
- "params": {
- "job_id": "high_sum_total_sales",
- "snapshot_id": "1575402237"
- },
- "api": "ml.revert_model_snapshot"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/set-upgrade-mode.asciidoc",
- "line": 76
- },
- "digest": "ae4aa368617637a390074535df86e64b",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true&timeout=10m",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true",
- "timeout": "10m"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/set-upgrade-mode.asciidoc",
- "line": 83
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/set-upgrade-mode.asciidoc",
- "line": 98
- },
- "digest": "8e9e7dc5fad2b2b8e74ab4dc225d9c53",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false&timeout=10m",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false",
- "timeout": "10m"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/start-datafeed.asciidoc",
- "line": 99
- },
- "digest": "d7ae456f119246e95f2f4c37e7544b8c",
- "lang": "console",
- "found": [],
- "source": "POST _ml/datafeeds/datafeed-low_request_rate/_start\n{\n \"start\": \"2019-04-07T18:22:16Z\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/datafeeds/datafeed-low_request_rate/_start",
- "query": null,
- "body": {
- "start": "2019-04-07T18:22:16Z"
- },
- "params": {
- "datafeed_id": "datafeed-low_request_rate"
- },
- "api": "ml.start_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/start-datafeed.asciidoc",
- "line": 110
- },
- "digest": "1851f163178ac4046c8fc88b0293644f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"started\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/stop-datafeed.asciidoc",
- "line": 74
- },
- "digest": "fd60b4092c6552164862cec287359676",
- "lang": "console",
- "found": [],
- "source": "POST _ml/datafeeds/datafeed-low_request_rate/_stop\n{\n \"timeout\": \"30s\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/datafeeds/datafeed-low_request_rate/_stop",
- "query": null,
- "body": {
- "timeout": "30s"
- },
- "params": {
- "datafeed_id": "datafeed-low_request_rate"
- },
- "api": "ml.stop_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/stop-datafeed.asciidoc",
- "line": 85
- },
- "digest": "5dcda409b93a4b4a031d6990cee66328",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"stopped\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-datafeed.asciidoc",
- "line": 108
- },
- "digest": "df6d5b5f8e1c8785503269ccb7b34763",
- "lang": "console",
- "found": [],
- "source": "POST _ml/datafeeds/datafeed-total-requests/_update\n{\n \"query\": {\n \"term\": {\n \"level\": \"error\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/datafeeds/datafeed-total-requests/_update",
- "query": null,
- "body": {
- "query": {
- "term": {
- "level": "error"
- }
- }
- },
- "params": {
- "datafeed_id": "datafeed-total-requests"
- },
- "api": "ml.update_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-datafeed.asciidoc",
- "line": 124
- },
- "digest": "037d9fe54be67c0e6418799c3cfe7b50",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"datafeed_id\": \"datafeed-total-requests\",\n \"job_id\": \"total-requests\",\n \"query_delay\": \"83474ms\",\n \"indices\": [\"server-metrics\"],\n \"query\": {\n \"term\": {\n \"level\": {\n \"value\": \"error\",\n \"boost\": 1.0\n }\n }\n },\n \"scroll_size\": 1000,\n \"chunking_config\": {\n \"mode\": \"auto\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-filter.asciidoc",
- "line": 46
- },
- "digest": "4d21725453955582ff12b4a1104aa7b6",
- "lang": "console",
- "found": [],
- "source": "POST _ml/filters/safe_domains/_update\n{\n \"description\": \"Updated list of domains\",\n \"add_items\": [\"*.myorg.com\"],\n \"remove_items\": [\"wikipedia.org\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/filters/safe_domains/_update",
- "query": null,
- "body": {
- "description": "Updated list of domains",
- "add_items": [
- "*.myorg.com"
- ],
- "remove_items": [
- "wikipedia.org"
- ]
- },
- "params": {
- "filter_id": "safe_domains"
- },
- "api": "ml.update_filter"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-filter.asciidoc",
- "line": 59
- },
- "digest": "c1cdffb22de3a5beadff539c0e856e60",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"filter_id\": \"safe_domains\",\n \"description\": \"Updated list of domains\",\n \"items\": [\"*.google.com\", \"*.myorg.com\"]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-job.asciidoc",
- "line": 172
- },
- "digest": "421e68e2b9789f0e8c08760d9e685d1c",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_update\n{\n \"description\":\"An updated job\",\n \"detectors\": {\n \"detector_index\": 0,\n \"description\": \"An updated detector description\"\n },\n \"groups\": [\"kibana_sample_data\",\"kibana_sample_web_logs\"],\n \"model_plot_config\": {\n \"enabled\": true\n },\n \"renormalization_window_days\": 30,\n \"background_persist_interval\": \"2h\",\n \"model_snapshot_retention_days\": 7,\n \"results_retention_days\": 60\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_update",
- "query": null,
- "body": {
- "description": "An updated job",
- "detectors": {
- "detector_index": 0,
- "description": "An updated detector description"
- },
- "groups": [
- "kibana_sample_data",
- "kibana_sample_web_logs"
- ],
- "model_plot_config": {
- "enabled": true
- },
- "renormalization_window_days": 30,
- "background_persist_interval": "2h",
- "model_snapshot_retention_days": 7,
- "results_retention_days": 60
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.update_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-snapshot.asciidoc",
- "line": 52
- },
- "digest": "3b9c54604535d97e8368d47148aecc6f",
- "lang": "console",
- "found": [],
- "source": "POST\n_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update\n{\n \"description\": \"Snapshot 1\",\n \"retain\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update",
- "query": null,
- "body": {
- "description": "Snapshot 1",
- "retain": true
- },
- "params": {
- "job_id": "it_ops_new_logs",
- "snapshot_id": "1491852978"
- },
- "api": "ml.update_model_snapshot"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 291
- },
- "digest": "8c6f3bb8abae9ff1d21e776f16ad1c86",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/model-flight-delays-pre\n{\n \"source\": {\n \"index\": [\n \"kibana_sample_data_flights\" <1>\n ],\n \"query\": { <2>\n \"range\": {\n \"DistanceKilometers\": {\n \"gt\": 0\n }\n }\n },\n \"_source\": { <3>\n \"includes\": [],\n \"excludes\": [\n \"FlightDelay\",\n \"FlightDelayType\"\n ]\n }\n },\n \"dest\": { <4>\n \"index\": \"df-flight-delays\",\n \"results_field\": \"ml-results\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"FlightDelayMin\",\n \"training_percent\": 90\n }\n },\n \"analyzed_fields\": { <5>\n \"includes\": [],\n \"excludes\": [\n \"FlightNum\"\n ]\n },\n \"model_memory_limit\": \"100mb\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/model-flight-delays-pre",
- "query": null,
- "body": {
- "source": {
- "index": [
- "kibana_sample_data_flights"
- ],
- "query": {
- "range": {
- "DistanceKilometers": {
- "gt": 0
- }
- }
- },
- "_source": {
- "includes": [],
- "excludes": [
- "FlightDelay",
- "FlightDelayType"
- ]
- }
- },
- "dest": {
- "index": "df-flight-delays",
- "results_field": "ml-results"
- },
- "analysis": {
- "regression": {
- "dependent_variable": "FlightDelayMin",
- "training_percent": 90
- }
- },
- "analyzed_fields": {
- "includes": [],
- "excludes": [
- "FlightNum"
- ]
- },
- "model_memory_limit": "100mb"
- },
- "params": {
- "id": "model-flight-delays-pre"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 363
- },
- "digest": "ce3c391c2b1915cfc44a2917bca71d19",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/loganalytics\n{\n \"description\": \"Outlier detection on log data\",\n \"source\": {\n \"index\": \"logdata\"\n },\n \"dest\": {\n \"index\": \"logdata_out\"\n },\n \"analysis\": {\n \"outlier_detection\": {\n \"compute_feature_influence\": true,\n \"outlier_fraction\": 0.05,\n \"standardization_enabled\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/loganalytics",
- "query": null,
- "body": {
- "description": "Outlier detection on log data",
- "source": {
- "index": "logdata"
- },
- "dest": {
- "index": "logdata_out"
- },
- "analysis": {
- "outlier_detection": {
- "compute_feature_influence": true,
- "outlier_fraction": 0.05,
- "standardization_enabled": true
- }
- }
- },
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 388
- },
- "digest": "21ecd0d3fa2f27cbee2a89b6c7973b28",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\": \"loganalytics\",\n \"description\": \"Outlier detection on log data\",\n \"source\": {\n \"index\": [\"logdata\"],\n \"query\": {\n \"match_all\": {}\n }\n },\n \"dest\": {\n \"index\": \"logdata_out\",\n \"results_field\": \"ml\"\n },\n \"analysis\": {\n \"outlier_detection\": {\n \"compute_feature_influence\": true,\n \"outlier_fraction\": 0.05,\n \"standardization_enabled\": true\n }\n },\n \"model_memory_limit\": \"1gb\",\n \"create_time\" : 1562265491319,\n \"version\" : \"8.0.0\",\n \"allow_lazy_start\" : false\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 426
- },
- "digest": "e8211247c280a3fbbbdd32850b743b7b",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/house_price_regression_analysis\n{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"dest\": {\n \"index\": \"house_price_predictions\"\n },\n \"analysis\":\n {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/house_price_regression_analysis",
- "query": null,
- "body": {
- "source": {
- "index": "houses_sold_last_10_yrs"
- },
- "dest": {
- "index": "house_price_predictions"
- },
- "analysis": {
- "regression": {
- "dependent_variable": "price"
- }
- }
- },
- "params": {
- "id": "house_price_regression_analysis"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 449
- },
- "digest": "4ff328150800d40f323aa57c871362d7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\" : \"house_price_regression_analysis\",\n \"source\" : {\n \"index\" : [\n \"houses_sold_last_10_yrs\"\n ],\n \"query\" : {\n \"match_all\" : { }\n }\n },\n \"dest\" : {\n \"index\" : \"house_price_predictions\",\n \"results_field\" : \"ml\"\n },\n \"analysis\" : {\n \"regression\" : {\n \"dependent_variable\" : \"price\",\n \"training_percent\" : 100\n }\n },\n \"model_memory_limit\" : \"1gb\",\n \"create_time\" : 1567168659127,\n \"version\" : \"8.0.0\",\n \"allow_lazy_start\" : false\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 483
- },
- "digest": "ae82eb17c23cb8e5761cb6240a5ed0a6",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/student_performance_mathematics_0.3\n{\n \"source\": {\n \"index\": \"student_performance_mathematics\"\n },\n \"dest\": {\n \"index\":\"student_performance_mathematics_reg\"\n },\n \"analysis\":\n {\n \"regression\": {\n \"dependent_variable\": \"G3\",\n \"training_percent\": 70, <1>\n \"randomize_seed\": 19673948271 <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/student_performance_mathematics_0.3",
- "query": null,
- "body": {
- "source": {
- "index": "student_performance_mathematics"
- },
- "dest": {
- "index": "student_performance_mathematics_reg"
- },
- "analysis": {
- "regression": {
- "dependent_variable": "G3",
- "training_percent": 70,
- "randomize_seed": 19673948271
- }
- }
- },
- "params": {
- "id": "student_performance_mathematics_0.3"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 517
- },
- "digest": "4fb0629146ca78b85e823edd405497bb",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/loan_classification\n{\n \"source\" : {\n \"index\": \"loan-applicants\"\n },\n \"dest\" : {\n \"index\": \"loan-applicants-classified\"\n },\n \"analysis\" : {\n \"classification\": {\n \"dependent_variable\": \"label\",\n \"training_percent\": 75,\n \"num_top_classes\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/loan_classification",
- "query": null,
- "body": {
- "source": {
- "index": "loan-applicants"
- },
- "dest": {
- "index": "loan-applicants-classified"
- },
- "analysis": {
- "classification": {
- "dependent_variable": "label",
- "training_percent": 75,
- "num_top_classes": 2
- }
- }
- },
- "params": {
- "id": "loan_classification"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/delete-dfanalytics.asciidoc",
- "line": 54
- },
- "digest": "1c8b6768c4eefc76fcb38708152f561b",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/data_frame/analytics/loganalytics",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/data_frame/analytics/loganalytics",
- "query": null,
- "body": null,
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.delete_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/delete-dfanalytics.asciidoc",
- "line": 62
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/delete-inference-trained-model.asciidoc",
- "line": 57
- },
- "digest": "334e28ff99f12b721b9942bad3a78f94",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/inference/regression-job-one-1574775307356",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/inference/regression-job-one-1574775307356",
- "query": null,
- "body": null,
- "params": {
- "model_id": "regression-job-one-1574775307356"
- },
- "api": "ml.delete_trained_model"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/delete-inference-trained-model.asciidoc",
- "line": 66
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 197
- },
- "digest": "eae68412d998bc0f65b09711f007a4b7",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"my_analytics_dest_index\",\n \"evaluation\": {\n \"binary_soft_classification\": {\n \"actual_field\": \"is_outlier\",\n \"predicted_probability_field\": \"ml.outlier_score\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "my_analytics_dest_index",
- "evaluation": {
- "binary_soft_classification": {
- "actual_field": "is_outlier",
- "predicted_probability_field": "ml.outlier_score"
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 214
- },
- "digest": "7e2a4291c3a234e50d50f3731aff64fe",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"binary_soft_classification\": {\n \"auc_roc\": {\n \"score\": 0.92584757746414444\n },\n \"confusion_matrix\": {\n \"0.25\": {\n \"tp\": 5,\n \"fp\": 9,\n \"tn\": 204,\n \"fn\": 5\n },\n \"0.5\": {\n \"tp\": 1,\n \"fp\": 5,\n \"tn\": 208,\n \"fn\": 9\n },\n \"0.75\": {\n \"tp\": 0,\n \"fp\": 4,\n \"tn\": 209,\n \"fn\": 10\n }\n },\n \"precision\": {\n \"0.25\": 0.35714285714285715,\n \"0.5\": 0.16666666666666666,\n \"0.75\": 0\n },\n \"recall\": {\n \"0.25\": 0.5,\n \"0.5\": 0.1,\n \"0.75\": 0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 259
- },
- "digest": "e6e7586a81068773d18cca848346b69f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"house_price_predictions\", <1>\n \"query\": {\n \"bool\": {\n \"filter\": [\n { \"term\": { \"ml.is_training\": false } } <2>\n ]\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"price\", <3>\n \"predicted_field\": \"ml.price_prediction\", <4>\n \"metrics\": {\n \"r_squared\": {},\n \"mean_squared_error\": {}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "house_price_predictions",
- "query": {
- "bool": {
- "filter": [
- {
- "term": {
- "ml.is_training": false
- }
- }
- ]
- }
- },
- "evaluation": {
- "regression": {
- "actual_field": "price",
- "predicted_field": "ml.price_prediction",
- "metrics": {
- "r_squared": {},
- "mean_squared_error": {}
- }
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 296
- },
- "digest": "862efc8d548a9202597c72c7e98a599d",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"student_performance_mathematics_reg\",\n \"query\": {\n \"term\": {\n \"ml.is_training\": {\n \"value\": true <1>\n }\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"G3\", <2>\n \"predicted_field\": \"ml.G3_prediction\", <3>\n \"metrics\": {\n \"r_squared\": {},\n \"mean_squared_error\": {}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "student_performance_mathematics_reg",
- "query": {
- "term": {
- "ml.is_training": {
- "value": true
- }
- }
- },
- "evaluation": {
- "regression": {
- "actual_field": "G3",
- "predicted_field": "ml.G3_prediction",
- "metrics": {
- "r_squared": {},
- "mean_squared_error": {}
- }
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 335
- },
- "digest": "051b2682d386d49616b18a5db591afdf",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"student_performance_mathematics_reg\",\n \"query\": {\n \"term\": {\n \"ml.is_training\": {\n \"value\": false <1>\n }\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"G3\", <2>\n \"predicted_field\": \"ml.G3_prediction\", <3>\n \"metrics\": {\n \"r_squared\": {},\n \"mean_squared_error\": {}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "student_performance_mathematics_reg",
- "query": {
- "term": {
- "ml.is_training": {
- "value": false
- }
- }
- },
- "evaluation": {
- "regression": {
- "actual_field": "G3",
- "predicted_field": "ml.G3_prediction",
- "metrics": {
- "r_squared": {},
- "mean_squared_error": {}
- }
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 374
- },
- "digest": "388d3eda4f792d3fce044777739217e6",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": { <1>\n \"actual_field\": \"animal_class\", <2>\n \"predicted_field\": \"ml.animal_class_prediction\", <3>\n \"metrics\": {\n \"multiclass_confusion_matrix\" : {} <4>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "animal_classification",
- "evaluation": {
- "classification": {
- "actual_field": "animal_class",
- "predicted_field": "ml.animal_class_prediction",
- "metrics": {
- "multiclass_confusion_matrix": {}
- }
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 402
- },
- "digest": "c9b0865574c0db1f8ea02d507e215bfe",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"classification\" : {\n \"multiclass_confusion_matrix\" : {\n \"confusion_matrix\" : [\n {\n \"actual_class\" : \"cat\", <1>\n \"actual_class_doc_count\" : 12, <2>\n \"predicted_classes\" : [ <3>\n {\n \"predicted_class\" : \"cat\",\n \"count\" : 12 <4>\n },\n {\n \"predicted_class\" : \"dog\",\n \"count\" : 0 <5>\n }\n ],\n \"other_predicted_class_doc_count\" : 0 <6>\n },\n {\n \"actual_class\" : \"dog\",\n \"actual_class_doc_count\" : 11,\n \"predicted_classes\" : [\n {\n \"predicted_class\" : \"dog\",\n \"count\" : 7\n },\n {\n \"predicted_class\" : \"cat\",\n \"count\" : 4\n }\n ],\n \"other_predicted_class_doc_count\" : 0\n }\n ],\n \"other_actual_class_count\" : 0\n }\n }\n }"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/explain-dfanalytics.asciidoc",
- "line": 88
- },
- "digest": "1e75b0e71294527b43015cc333f9d9f7",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/analytics/_explain\n{\n \"data_frame_analytics_config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/analytics/_explain",
- "query": null,
- "body": {
- "data_frame_analytics_config": {
- "source": {
- "index": "houses_sold_last_10_yrs"
- },
- "analysis": {
- "regression": {
- "dependent_variable": "price"
- }
- }
- }
- },
- "params": null,
- "api": "ml.explain_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/explain-dfanalytics.asciidoc",
- "line": 109
- },
- "digest": "fdfac19398a52c398d60bcdd3d4f7c9d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"field_selection\": [\n {\n \"field\": \"number_of_bedrooms\",\n \"mappings_types\": [\"integer\"],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"numerical\"\n },\n {\n \"field\": \"postcode\",\n \"mappings_types\": [\"text\"],\n \"is_included\": false,\n \"is_required\": false,\n \"reason\": \"[postcode.keyword] is preferred because it is aggregatable\"\n },\n {\n \"field\": \"postcode.keyword\",\n \"mappings_types\": [\"keyword\"],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"categorical\"\n },\n {\n \"field\": \"price\",\n \"mappings_types\": [\"float\"],\n \"is_included\": true,\n \"is_required\": true,\n \"feature_type\": \"numerical\"\n }\n ],\n \"memory_estimation\": {\n \"expected_memory_without_disk\": \"128MB\",\n \"expected_memory_with_disk\": \"32MB\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-dfanalytics.asciidoc",
- "line": 98
- },
- "digest": "5ccfd9f4698dcd7cdfbc6bad60081aab",
- "lang": "console",
- "found": [],
- "source": "GET _ml/data_frame/analytics/loganalytics",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/data_frame/analytics/loganalytics",
- "query": null,
- "body": null,
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.get_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-dfanalytics.asciidoc",
- "line": 106
- },
- "digest": "fde59be34000b8e62c12d539890e26ff",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 1,\n \"data_frame_analytics\": [\n {\n \"id\": \"loganalytics\",\n \"source\": {\n \"index\": \"logdata\",\n \"query\": {\n \"match_all\": {}\n }\n },\n \"dest\": {\n \"index\": \"logdata_out\",\n \"results_field\": \"ml\"\n },\n \"analysis\": {\n \"outlier_detection\": {}\n },\n \"model_memory_limit\": \"1gb\",\n \"create_time\": 1562265491319,\n \"version\" : \"8.0.0\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-dfanalytics-stats.asciidoc",
- "line": 85
- },
- "digest": "cfc52956b005d57111c49dfe1735634e",
- "lang": "console",
- "found": [],
- "source": "GET _ml/data_frame/analytics/loganalytics/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/data_frame/analytics/loganalytics/_stats",
- "query": null,
- "body": null,
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.get_data_frame_analytics_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-dfanalytics-stats.asciidoc",
- "line": 94
- },
- "digest": "d51195db67610db5b1b39f600f6badee",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 1,\n \"data_frame_analytics\": [\n {\n \"id\": \"loganalytics\",\n \"state\": \"stopped\",\n \"progress\": [\n {\n \"phase\": \"reindexing\",\n \"progress_percent\": 0\n },\n {\n \"phase\": \"loading_data\",\n \"progress_percent\": 0\n },\n {\n \"phase\": \"analyzing\",\n \"progress_percent\": 0\n },\n {\n \"phase\": \"writing_results\",\n \"progress_percent\": 0\n }\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-inference-trained-model.asciidoc",
- "line": 100
- },
- "digest": "f97c7791a0dd23aad5f96fd38ec7d12e",
- "lang": "console",
- "found": [],
- "source": "GET _ml/inference/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/inference/",
- "query": null,
- "body": null,
- "params": null,
- "api": "ml.get_trained_models"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-inference-trained-model-stats.asciidoc",
- "line": 85
- },
- "digest": "2dde95ba98c5d5e19725fbb10435d283",
- "lang": "console",
- "found": [],
- "source": "GET _ml/inference/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/inference/_stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "ml.get_trained_models_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-inference-trained-model-stats.asciidoc",
- "line": 94
- },
- "digest": "0bc8d7ffe3d9eb23394ccbc45eb1a3e3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 2,\n \"trained_model_stats\": [\n {\n \"model_id\": \"flight-delay-prediction-1574775339910\",\n \"pipeline_count\": 0\n },\n {\n \"model_id\": \"regression-job-one-1574775307356\",\n \"pipeline_count\": 1,\n \"ingest\": {\n \"total\": {\n \"count\": 178,\n \"time_in_millis\": 8,\n \"current\": 0,\n \"failed\": 0\n },\n \"pipelines\": {\n \"flight-delay\": {\n \"count\": 178,\n \"time_in_millis\": 8,\n \"current\": 0,\n \"failed\": 0,\n \"processors\": [\n {\n \"inference\": {\n \"type\": \"inference\",\n \"stats\": {\n \"count\": 178,\n \"time_in_millis\": 7,\n \"current\": 0,\n \"failed\": 0\n }\n }\n }\n ]\n }\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/start-dfanalytics.asciidoc",
- "line": 57
- },
- "digest": "1a3a4b8a4bfee4ab84ddd13d8835f560",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/analytics/loganalytics/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/analytics/loganalytics/_start",
- "query": null,
- "body": null,
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.start_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/start-dfanalytics.asciidoc",
- "line": 65
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/stop-dfanalytics.asciidoc",
- "line": 76
- },
- "digest": "db19cc7a26ca80106d86d688f4be67a8",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/analytics/loganalytics/_stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/analytics/loganalytics/_stop",
- "query": null,
- "body": null,
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.stop_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/stop-dfanalytics.asciidoc",
- "line": 84
- },
- "digest": "0cb51a35e30e7cb43c0d65adef177a84",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"stopped\" : true\n}"
- },
- {
- "source_location": {
- "file": "migration/apis/deprecation.asciidoc",
- "line": 40
- },
- "digest": "135819da3a4bde684357c57a49ad8e85",
- "lang": "console",
- "found": [],
- "source": "GET /_migration/deprecations",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_migration/deprecations",
- "query": null,
- "body": null,
- "params": null,
- "api": "migration.deprecations"
- }
- ]
- },
- {
- "source_location": {
- "file": "migration/apis/deprecation.asciidoc",
- "line": 118
- },
- "digest": "69f8b0f2a9ba47e11f363d788cee9d6d",
- "lang": "console",
- "found": [],
- "source": "GET /logstash-*/_migration/deprecations",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logstash-*/_migration/deprecations",
- "query": null,
- "body": null,
- "params": {
- "index": "logstash-*"
- },
- "api": "migration.deprecations"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/reload-analyzers.asciidoc",
- "line": 12
- },
- "digest": "b0015e63323171f38995b8e4aa2b52d5",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_reload_search_analyzers",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_reload_search_analyzers",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.reload_search_analyzers"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/reload-analyzers.asciidoc",
- "line": 98
- },
- "digest": "db8cbfa2afece5d21b3ca69ffee8f5c0",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_synonyms\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"synonym\"]\n }\n },\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym_graph\",\n \"synonyms_path\" : \"analysis/synonym.txt\", <1>\n \"updateable\" : true <2>\n }\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"analyzer\" : \"standard\",\n \"search_analyzer\": \"my_synonyms\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "my_synonyms": {
- "tokenizer": "whitespace",
- "filter": [
- "synonym"
- ]
- }
- },
- "filter": {
- "synonym": {
- "type": "synonym_graph",
- "synonyms_path": "analysis/synonym.txt",
- "updateable": true
- }
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "analyzer": "standard",
- "search_analyzer": "my_synonyms"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/reload-analyzers.asciidoc",
- "line": 142
- },
- "digest": "7554da505cc27f6bd0d028b66e85f4a5",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_reload_search_analyzers",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_reload_search_analyzers",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.reload_search_analyzers"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/reload-analyzers.asciidoc",
- "line": 150
- },
- "digest": "02c4e2e6c6793d50a38aa77a3daaab67",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 2,\n \"failed\" : 0\n },\n \"reload_details\" : [\n {\n \"index\" : \"my_index\",\n \"reloaded_analyzers\" : [\n \"my_synonyms\"\n ],\n \"reloaded_node_ids\" : [\n \"mfdqTXn_T7SGr2Ho2KT8uw\"\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/put-job.asciidoc",
- "line": 223
- },
- "digest": "2025834fab7efbb0542275c30d9d0bfe",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : { <1>\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [ <2>\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/put-job.asciidoc",
- "line": 262
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/delete-job.asciidoc",
- "line": 80
- },
- "digest": "94246f45025ed394cd6415ed8d7a0588",
- "lang": "console",
- "found": [],
- "source": "DELETE _rollup/job/sensor",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.delete_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/delete-job.asciidoc",
- "line": 88
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/get-job.asciidoc",
- "line": 83
- },
- "digest": "d095b422d9803c02b62c01adffc85376",
- "lang": "console",
- "found": [],
- "source": "GET _rollup/job/sensor",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.get_jobs"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/get-job.asciidoc",
- "line": 91
- },
- "digest": "e98d776ee180f747f5d0ad77a11e3a7b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"jobs\" : [\n {\n \"config\" : {\n \"id\" : \"sensor\",\n \"index_pattern\" : \"sensor-*\",\n \"rollup_index\" : \"sensor_rollup\",\n \"cron\" : \"*/30 * * * * ?\",\n \"groups\" : {\n \"date_histogram\" : {\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\",\n \"field\": \"timestamp\",\n \"time_zone\": \"UTC\"\n },\n \"terms\" : {\n \"fields\" : [\n \"node\"\n ]\n }\n },\n \"metrics\" : [\n {\n \"field\" : \"temperature\",\n \"metrics\" : [\n \"min\",\n \"max\",\n \"sum\"\n ]\n },\n {\n \"field\" : \"voltage\",\n \"metrics\" : [\n \"avg\"\n ]\n }\n ],\n \"timeout\" : \"20s\",\n \"page_size\" : 1000\n },\n \"status\" : {\n \"job_state\" : \"stopped\"\n },\n \"stats\" : {\n \"pages_processed\" : 0,\n \"documents_processed\" : 0,\n \"rollups_indexed\" : 0,\n \"trigger_count\" : 0,\n \"index_failures\": 0,\n \"index_time_in_ms\": 0,\n \"index_total\": 0,\n \"search_failures\": 0,\n \"search_time_in_ms\": 0,\n \"search_total\": 0\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/get-job.asciidoc",
- "line": 156
- },
- "digest": "6d13e0721a7aac00adcdc5fe77198300",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor2 <1>\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}\n\nGET _rollup/job/_all <2>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor2",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor2"
- },
- "api": "rollup.put_job"
- },
- {
- "method": "GET",
- "url": "/_rollup/job/_all",
- "query": null,
- "body": null,
- "params": {
- "id": "_all"
- },
- "api": "rollup.get_jobs"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 57
- },
- "digest": "2d20c42e9664febeccaff61581605cbe",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 92
- },
- "digest": "a00311843b5f8f3e9f7d511334a828b1",
- "lang": "console",
- "found": [],
- "source": "GET _rollup/data/sensor-*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_rollup/data/sensor-*",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor-*"
- },
- "api": "rollup.get_rollup_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 100
- },
- "digest": "daffdcda9042b8ac26bc109a3b38173a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"sensor-*\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 164
- },
- "digest": "944806221eb89f5af2298ccdf2902277",
- "lang": "console",
- "found": [],
- "source": "GET _rollup/data/_all",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_rollup/data/_all",
- "query": null,
- "body": null,
- "params": {
- "id": "_all"
- },
- "api": "rollup.get_rollup_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 173
- },
- "digest": "f8cb1a04c2e487ff006b5ae0e1a7afbd",
- "lang": "console",
- "found": [],
- "source": "GET _rollup/data/sensor-1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_rollup/data/sensor-1",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor-1"
- },
- "api": "rollup.get_rollup_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 179
- },
- "digest": "ecde3c2fa2f4b771baec679a4cdf348f",
- "lang": "console-result",
- "found": [],
- "source": "{\n\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-index-caps.asciidoc",
- "line": 53
- },
- "digest": "2d20c42e9664febeccaff61581605cbe",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-index-caps.asciidoc",
- "line": 88
- },
- "digest": "73d1a6c5ef90b7e35d43a0bfdc1e158d",
- "lang": "console",
- "found": [],
- "source": "GET /sensor_rollup/_rollup/data",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup/data",
- "query": null,
- "body": null,
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.get_rollup_index_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-index-caps.asciidoc",
- "line": 97
- },
- "digest": "b656c91a173b5aaaf21efb9ff882c0b6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"sensor_rollup\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-index-caps.asciidoc",
- "line": 163
- },
- "digest": "642161d70dacf7d153767d37d3726838",
- "lang": "console",
- "found": [],
- "source": "GET /*_rollup/_rollup/data",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/*_rollup/_rollup/data",
- "query": null,
- "body": null,
- "params": {
- "index": "*_rollup"
- },
- "api": "rollup.get_rollup_index_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 71
- },
- "digest": "2d20c42e9664febeccaff61581605cbe",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 108
- },
- "digest": "4e63a0fd56cc5d59595baa0b0721f971",
- "lang": "console",
- "found": [],
- "source": "GET /sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "max_temperature": {
- "max": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 129
- },
- "digest": "82742a24e16fbaffa950867499a39b97",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 102,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : ... ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"max_temperature\" : {\n \"value\" : 202.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 163
- },
- "digest": "3d1cea1ad861d1ee62e5f34b84371943",
- "lang": "console",
- "found": [],
- "source": "GET sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"avg_temperature\": {\n \"avg\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "avg_temperature": {
- "avg": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 180
- },
- "digest": "b010489cc7d519a628dcbc1ce81adb3c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"error\" : {\n \"root_cause\" : [\n {\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"There is not a rollup job that has a [avg] agg with name [avg_temperature] which also satisfies all requirements of query.\",\n \"stack_trace\": ...\n }\n ],\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"There is not a rollup job that has a [avg] agg with name [avg_temperature] which also satisfies all requirements of query.\",\n \"stack_trace\": ...\n },\n \"status\": 400\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 206
- },
- "digest": "adcd760ef029f744ab59460818d2342e",
- "lang": "console",
- "found": [],
- "source": "GET sensor-1,sensor_rollup/_rollup_search <1>\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor-1,sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "max_temperature": {
- "max": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor-1,sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 237
- },
- "digest": "82742a24e16fbaffa950867499a39b97",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 102,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : ... ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"max_temperature\" : {\n \"value\" : 202.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/start-job.asciidoc",
- "line": 51
- },
- "digest": "618c9d42284c067891fb57034a4fd834",
- "lang": "console",
- "found": [],
- "source": "POST _rollup/job/sensor/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_rollup/job/sensor/_start",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.start_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/start-job.asciidoc",
- "line": 59
- },
- "digest": "1851f163178ac4046c8fc88b0293644f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"started\": true\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/stop-job.asciidoc",
- "line": 76
- },
- "digest": "07a5fdeb7805cec1d28ba288b28f5ff5",
- "lang": "console",
- "found": [],
- "source": "POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_rollup/job/sensor/_stop",
- "query": {
- "wait_for_completion": "true",
- "timeout": "10s"
- },
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.stop_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "search.asciidoc",
- "line": 18
- },
- "digest": "5d32279dcd52b22d9e1178a02a3ad957",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST /twitter/_doc?routing=kimchy\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_doc",
- "query": {
- "routing": "kimchy"
- },
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search.asciidoc",
- "line": 32
- },
- "digest": "8acc1d67b152e7027e0f0e1a8b4b2431",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST /twitter/_search?routing=kimchy\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"query_string\" : {\n \"query\" : \"some query string here\"\n }\n },\n \"filter\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "routing": "kimchy"
- },
- "body": {
- "query": {
- "bool": {
- "must": {
- "query_string": {
- "query": "some query string here"
- }
- },
- "filter": {
- "term": {
- "user": "kimchy"
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search.asciidoc",
- "line": 72
- },
- "digest": "014b788c879e4aaa1020672e45e25473",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT /_cluster/settings\n{\n \"transient\": {\n \"cluster.routing.use_adaptive_replica_selection\": false\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "cluster.routing.use_adaptive_replica_selection": false
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "search.asciidoc",
- "line": 96
- },
- "digest": "189a921df2f5b1fe580937210ce9c1c2",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "POST /_search\n{\n \"query\" : {\n \"match_all\" : {}\n },\n \"stats\" : [\"group1\", \"group2\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "stats": [
- "group1",
- "group2"
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 7
- },
- "digest": "9bdd3c0d47e60c8cfafc8109f9369922",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /twitter/_search?q=tag:wow",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "q": "tag:wow"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 342
- },
- "digest": "be49260e1b3496c4feac38c56ebb0669",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /twitter/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 350
- },
- "digest": "47a23d3d61f1a76fc1695411d6375a5b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 5,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 1,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 1.3862942,\n \"hits\" : [\n {\n \"_index\" : \"twitter\",\n \"_id\" : \"0\",\n \"_score\" : 1.3862942,\n \"_source\" : {\n \"date\" : \"2009-11-15T14:12:12\",\n \"likes\" : 0,\n \"message\" : \"trying out Elasticsearch\",\n \"user\" : \"kimchy\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 388
- },
- "digest": "f5569945024b9d664828693705c27c1a",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /kimchy,elasticsearch/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/kimchy,elasticsearch/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 400
- },
- "digest": "168bfdde773570cfc6dd3ab3574e413b",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 409
- },
- "digest": "8022e6a690344035b6472a43a9d122e0",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_all/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_all/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "_all"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 415
- },
- "digest": "43682666e1abcb14770c99f02eb26a0d",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /*/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/*/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/uri-request.asciidoc",
- "line": 7
- },
- "digest": "68188db64fc50a9b35e5646493b00d2c",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/uri-request.asciidoc",
- "line": 113
- },
- "digest": "68188db64fc50a9b35e5646493b00d2c",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/uri-request.asciidoc",
- "line": 122
- },
- "digest": "a2655597bf8ab8acac2c5ed715316433",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"timed_out\": false,\n \"took\": 62,\n \"_shards\":{\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\":{\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.3862942,\n \"hits\" : [\n {\n \"_index\" : \"twitter\",\n \"_id\" : \"0\",\n \"_score\": 1.3862942,\n \"_source\" : {\n \"user\" : \"kimchy\",\n \"date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\",\n \"likes\": 0\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request-body.asciidoc",
- "line": 7
- },
- "digest": "0ce3606f1dba490eef83c4317b315b62",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /twitter/_search\n{\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request-body.asciidoc",
- "line": 92
- },
- "digest": "0ce3606f1dba490eef83c4317b315b62",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /twitter/_search\n{\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request-body.asciidoc",
- "line": 106
- },
- "digest": "9eda8df365d4c2e32e22d453e5f8a05a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 1,\n \"timed_out\": false,\n \"_shards\":{\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\":{\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.3862942,\n \"hits\" : [\n {\n \"_index\" : \"twitter\",\n \"_id\" : \"0\",\n \"_score\": 1.3862942,\n \"_source\" : {\n \"user\" : \"kimchy\",\n \"message\": \"trying out Elasticsearch\",\n \"date\" : \"2009-11-15T14:12:12\",\n \"likes\" : 0\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request-body.asciidoc",
- "line": 156
- },
- "digest": "bfcd65ab85d684d36a8550080032958d",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search?q=message:number&size=0&terminate_after=1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "q": "message:number",
- "size": "0",
- "terminate_after": "1"
- },
- "body": null,
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request-body.asciidoc",
- "line": 170
- },
- "digest": "31fa804420aad7728f9ba9f20dc1a9c5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 3,\n \"timed_out\": false,\n \"terminated_early\": true,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": []\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/docvalue-fields.asciidoc",
- "line": 8
- },
- "digest": "097a6bc1d76c3fc92fb299001d27896e",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match_all\": {}\n },\n \"docvalue_fields\" : [\n \"my_ip_field\", <1>\n {\n \"field\": \"my_keyword_field\" <2>\n },\n {\n \"field\": \"my_date_field\",\n \"format\": \"epoch_millis\" <3>\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "docvalue_fields": [
- "my_ip_field",
- {
- "field": "my_keyword_field"
- },
- {
- "field": "my_date_field",
- "format": "epoch_millis"
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/docvalue-fields.asciidoc",
- "line": 36
- },
- "digest": "1518ad2c540fd55f9df84bbe75c81606",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match_all\": {}\n },\n \"docvalue_fields\" : [\n {\n \"field\": \"*_date_field\", <1>\n \"format\": \"epoch_millis\" <2>\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "docvalue_fields": [
- {
- "field": "*_date_field",
- "format": "epoch_millis"
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/explain.asciidoc",
- "line": 7
- },
- "digest": "e405e90fe3207157d3c0f9c76c6778e8",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"explain\": true,\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "explain": true,
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/collapse.asciidoc",
- "line": 9
- },
- "digest": "032f67ced3e7d106f8722432ebbd94d3",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n },\n \"collapse\" : {\n \"field\" : \"user\" <1>\n },\n \"sort\": [\"likes\"], <2>\n \"from\": 10 <3>\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "collapse": {
- "field": "user"
- },
- "sort": [
- "likes"
- ],
- "from": 10
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/collapse.asciidoc",
- "line": 43
- },
- "digest": "63d36a10d9475be2e2fa73d2415e20e6",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n },\n \"collapse\" : {\n \"field\" : \"user\", <1>\n \"inner_hits\": {\n \"name\": \"last_tweets\", <2>\n \"size\": 5, <3>\n \"sort\": [{ \"date\": \"asc\" }] <4>\n },\n \"max_concurrent_group_searches\": 4 <5>\n },\n \"sort\": [\"likes\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "collapse": {
- "field": "user",
- "inner_hits": {
- "name": "last_tweets",
- "size": 5,
- "sort": [
- {
- "date": "asc"
- }
- ]
- },
- "max_concurrent_group_searches": 4
- },
- "sort": [
- "likes"
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/collapse.asciidoc",
- "line": 77
- },
- "digest": "4f20ca49fbaac83620d4cb23fd355f3b",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n },\n \"collapse\" : {\n \"field\" : \"user\", <1>\n \"inner_hits\": [\n {\n \"name\": \"most_liked\", <2>\n \"size\": 3,\n \"sort\": [\"likes\"]\n },\n {\n \"name\": \"most_recent\", <3>\n \"size\": 3,\n \"sort\": [{ \"date\": \"asc\" }]\n }\n ]\n },\n \"sort\": [\"likes\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "collapse": {
- "field": "user",
- "inner_hits": [
- {
- "name": "most_liked",
- "size": 3,
- "sort": [
- "likes"
- ]
- },
- {
- "name": "most_recent",
- "size": 3,
- "sort": [
- {
- "date": "asc"
- }
- ]
- }
- ]
- },
- "sort": [
- "likes"
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/from-size.asciidoc",
- "line": 14
- },
- "digest": "9a26759ccbd338224ecaacf7c49ab08e",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"from\" : 0, \"size\" : 10,\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "from": 0,
- "size": 10,
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 24
- },
- "digest": "05e1088d2c04391203cc8eb3ab287b71",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"content\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"content\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "content": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "content": {}
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 279
- },
- "digest": "3cc4e8b1e2aecac644ba52d34ca29422",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"number_of_fragments\" : 3,\n \"fragment_size\" : 150,\n \"fields\" : {\n \"body\" : { \"pre_tags\" : [\"\"], \"post_tags\" : [\"\"] },\n \"blog.title\" : { \"number_of_fragments\" : 0 },\n \"blog.author\" : { \"number_of_fragments\" : 0 },\n \"blog.comment\" : { \"number_of_fragments\" : 5, \"order\" : \"score\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "number_of_fragments": 3,
- "fragment_size": 150,
- "fields": {
- "body": {
- "pre_tags": [
- ""
- ],
- "post_tags": [
- ""
- ]
- },
- "blog.title": {
- "number_of_fragments": 0
- },
- "blog.author": {
- "number_of_fragments": 0
- },
- "blog.comment": {
- "number_of_fragments": 5,
- "order": "score"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 309
- },
- "digest": "129cddb56fafef5cc454917a374eae1a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"stored_fields\": [ \"_id\" ],\n \"query\" : {\n \"match\": {\n \"comment\": {\n \"query\": \"foo bar\"\n }\n }\n },\n \"rescore\": {\n \"window_size\": 50,\n \"query\": {\n \"rescore_query\" : {\n \"match_phrase\": {\n \"comment\": {\n \"query\": \"foo bar\",\n \"slop\": 1\n }\n }\n },\n \"rescore_query_weight\" : 10\n }\n },\n \"highlight\" : {\n \"order\" : \"score\",\n \"fields\" : {\n \"comment\" : {\n \"fragment_size\" : 150,\n \"number_of_fragments\" : 3,\n \"highlight_query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"comment\": {\n \"query\": \"foo bar\"\n }\n }\n },\n \"should\": {\n \"match_phrase\": {\n \"comment\": {\n \"query\": \"foo bar\",\n \"slop\": 1,\n \"boost\": 10.0\n }\n }\n },\n \"minimum_should_match\": 0\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "stored_fields": [
- "_id"
- ],
- "query": {
- "match": {
- "comment": {
- "query": "foo bar"
- }
- }
- },
- "rescore": {
- "window_size": 50,
- "query": {
- "rescore_query": {
- "match_phrase": {
- "comment": {
- "query": "foo bar",
- "slop": 1
- }
- }
- },
- "rescore_query_weight": 10
- }
- },
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "fragment_size": 150,
- "number_of_fragments": 3,
- "highlight_query": {
- "bool": {
- "must": {
- "match": {
- "comment": {
- "query": "foo bar"
- }
- }
- },
- "should": {
- "match_phrase": {
- "comment": {
- "query": "foo bar",
- "slop": 1,
- "boost": 10
- }
- }
- },
- "minimum_should_match": 0
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 377
- },
- "digest": "9e502038aa4ebb9cb4df230c0c4a854e",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"comment\" : {\"type\" : \"plain\"}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "comment": {
- "type": "plain"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 401
- },
- "digest": "ee079a3f9eb529aac33f09be16747aa9",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"pre_tags\" : [\"\"],\n \"post_tags\" : [\"\"],\n \"fields\" : {\n \"body\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "pre_tags": [
- ""
- ],
- "post_tags": [
- ""
- ],
- "fields": {
- "body": {}
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 422
- },
- "digest": "a225bb439c204b20ed52a28e1dcd663b",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"pre_tags\" : [\"\", \"\"],\n \"post_tags\" : [\"\", \"\"],\n \"fields\" : {\n \"body\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "pre_tags": [
- "",
- ""
- ],
- "post_tags": [
- "",
- ""
- ],
- "fields": {
- "body": {}
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 442
- },
- "digest": "05ce63b83a89fddb63fd60c923811582",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"tags_schema\" : \"styled\",\n \"fields\" : {\n \"comment\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "tags_schema": "styled",
- "fields": {
- "comment": {}
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 466
- },
- "digest": "87b697eb7340e9e52ca790922eca0066",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"comment\" : {\"force_source\" : true}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "comment": {
- "force_source": true
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 490
- },
- "digest": "1e8b687c757981af3a9f005cfd2b4946",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"require_field_match\": false,\n \"fields\": {\n \"body\" : { \"pre_tags\" : [\"\"], \"post_tags\" : [\"\"] }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "require_field_match": false,
- "fields": {
- "body": {
- "pre_tags": [
- ""
- ],
- "post_tags": [
- ""
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 523
- },
- "digest": "a182c91923ad1e47cf502ea890c53015",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"comment.plain:running scissors\",\n \"fields\": [\"comment\"]\n }\n },\n \"highlight\": {\n \"order\": \"score\",\n \"fields\": {\n \"comment\": {\n \"matched_fields\": [\"comment\", \"comment.plain\"],\n \"type\" : \"fvh\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "comment.plain:running scissors",
- "fields": [
- "comment"
- ]
- }
- },
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "matched_fields": [
- "comment",
- "comment.plain"
- ],
- "type": "fvh"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 552
- },
- "digest": "974bb1452f614f9a378a695fa9addd4e",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"running scissors\",\n \"fields\": [\"comment\", \"comment.plain^10\"]\n }\n },\n \"highlight\": {\n \"order\": \"score\",\n \"fields\": {\n \"comment\": {\n \"matched_fields\": [\"comment\", \"comment.plain\"],\n \"type\" : \"fvh\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "running scissors",
- "fields": [
- "comment",
- "comment.plain^10"
- ]
- }
- },
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "matched_fields": [
- "comment",
- "comment.plain"
- ],
- "type": "fvh"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 579
- },
- "digest": "4971d093f19f85e3c622f1e0257ff60f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"running scissors\",\n \"fields\": [\"comment\", \"comment.plain^10\"]\n }\n },\n \"highlight\": {\n \"order\": \"score\",\n \"fields\": {\n \"comment\": {\n \"matched_fields\": [\"comment.plain\"],\n \"type\" : \"fvh\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "running scissors",
- "fields": [
- "comment",
- "comment.plain^10"
- ]
- }
- },
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "matched_fields": [
- "comment.plain"
- ],
- "type": "fvh"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 648
- },
- "digest": "2859fb1a8139777dca087862a5b1c205",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"highlight\": {\n \"fields\": [\n { \"title\": {} },\n { \"text\": {} }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "highlight": {
- "fields": [
- {
- "title": {}
- },
- {
- "text": {}
- }
- ]
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 677
- },
- "digest": "e8446172481fb6298c04b4bdc3340f3f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"comment\" : {\"fragment_size\" : 150, \"number_of_fragments\" : 3}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "comment": {
- "fragment_size": 150,
- "number_of_fragments": 3
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 696
- },
- "digest": "4ae1e4f88af2f9be50696e5a59466bb6",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"order\" : \"score\",\n \"fields\" : {\n \"comment\" : {\"fragment_size\" : 150, \"number_of_fragments\" : 3}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "fragment_size": 150,
- "number_of_fragments": 3
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 719
- },
- "digest": "62b15eac8c6d294da9114541fdfc527f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"body\" : {},\n \"blog.title\" : {\"number_of_fragments\" : 0}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "body": {},
- "blog.title": {
- "number_of_fragments": 0
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 745
- },
- "digest": "3d10eba5cac0069486bc3c2854d15689",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"comment\" : {\n \"fragment_size\" : 150,\n \"number_of_fragments\" : 3,\n \"no_match_size\": 150\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "comment": {
- "fragment_size": 150,
- "number_of_fragments": 3,
- "no_match_size": 150
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 772
- },
- "digest": "5ea9da129ca70a5fe534f27a82d80b29",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"comment\" : {\n \"type\": \"text\",\n \"index_options\" : \"offsets\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comment": {
- "type": "text",
- "index_options": "offsets"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 790
- },
- "digest": "17a1e308761afd3282f13d44d7be008a",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"comment\" : {\n \"type\": \"text\",\n \"term_vector\" : \"with_positions_offsets\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comment": {
- "type": "text",
- "term_vector": "with_positions_offsets"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 812
- },
- "digest": "146bfeeaa2ac4fc1352bf8d41097baa0",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"query\" : {\n \"match_phrase\": { \"message\": \"number 1\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"message\" : {\n \"type\": \"plain\",\n \"fragment_size\" : 15,\n \"number_of_fragments\" : 3,\n \"fragmenter\": \"simple\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "message": "number 1"
- }
- },
- "highlight": {
- "fields": {
- "message": {
- "type": "plain",
- "fragment_size": 15,
- "number_of_fragments": 3,
- "fragmenter": "simple"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 835
- },
- "digest": "37d38d963a009dc9a40d2deb7cac58d5",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.6011951,\n \"hits\": [\n {\n \"_index\": \"twitter\",\n \"_id\": \"1\",\n \"_score\": 1.6011951,\n \"_source\": {\n \"user\": \"test\",\n \"message\": \"some message with the number 1\",\n \"date\": \"2009-11-15T14:12:12\",\n \"likes\": 1\n },\n \"highlight\": {\n \"message\": [\n \" with the number\",\n \" 1\"\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 869
- },
- "digest": "bc9bd39420f810edae72b9fb33a154fd",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"query\" : {\n \"match_phrase\": { \"message\": \"number 1\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"message\" : {\n \"type\": \"plain\",\n \"fragment_size\" : 15,\n \"number_of_fragments\" : 3,\n \"fragmenter\": \"span\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "message": "number 1"
- }
- },
- "highlight": {
- "fields": {
- "message": {
- "type": "plain",
- "fragment_size": 15,
- "number_of_fragments": 3,
- "fragmenter": "span"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 892
- },
- "digest": "b21b88a3a25231b37aca12d2e84ab698",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.6011951,\n \"hits\": [\n {\n \"_index\": \"twitter\",\n \"_id\": \"1\",\n \"_score\": 1.6011951,\n \"_source\": {\n \"user\": \"test\",\n \"message\": \"some message with the number 1\",\n \"date\": \"2009-11-15T14:12:12\",\n \"likes\": 1\n },\n \"highlight\": {\n \"message\": [\n \" with the number 1\"\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/index-boost.asciidoc",
- "line": 11
- },
- "digest": "393c6b7a2e8c3381530c41ff2f7c4991",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"indices_boost\" : {\n \"index1\" : 1.4,\n \"index2\" : 1.3\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "indices_boost": {
- "index1": 1.4,
- "index2": 1.3
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/index-boost.asciidoc",
- "line": 25
- },
- "digest": "fb8a4322825d26c4e7b41bd763b3d392",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"indices_boost\" : [\n { \"alias1\" : 1.4 },\n { \"index*\" : 1.3 }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "indices_boost": [
- {
- "alias1": 1.4
- },
- {
- "index*": 1.3
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 86
- },
- "digest": "2a91e1fb8ad93a188fa9d77ec01bc431",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"mappings\": {\n \"properties\": {\n \"comments\": {\n \"type\": \"nested\"\n }\n }\n }\n}\n\nPUT test/_doc/1?refresh\n{\n \"title\": \"Test title\",\n \"comments\": [\n {\n \"author\": \"kimchy\",\n \"number\": 1\n },\n {\n \"author\": \"nik9000\",\n \"number\": 2\n }\n ]\n}\n\nPOST test/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"comments\",\n \"query\": {\n \"match\": {\"comments.number\" : 2}\n },\n \"inner_hits\": {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comments": {
- "type": "nested"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Test title",
- "comments": [
- {
- "author": "kimchy",
- "number": 1
- },
- {
- "author": "nik9000",
- "number": 2
- }
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "comments",
- "query": {
- "match": {
- "comments.number": 2
- }
- },
- "inner_hits": {}
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 132
- },
- "digest": "cb58a734d14c0a1e2743f7449d42e9c9",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...,\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.0,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_score\": 1.0,\n \"_source\": ...,\n \"inner_hits\": {\n \"comments\": { <1>\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.0,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_nested\": {\n \"field\": \"comments\",\n \"offset\": 1\n },\n \"_score\": 1.0,\n \"_source\": {\n \"author\": \"nik9000\",\n \"number\": 2\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 207
- },
- "digest": "983fbb78e57e8fe98db38cf2d217e943",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"mappings\": {\n \"properties\": {\n \"comments\": {\n \"type\": \"nested\"\n }\n }\n }\n}\n\nPUT test/_doc/1?refresh\n{\n \"title\": \"Test title\",\n \"comments\": [\n {\n \"author\": \"kimchy\",\n \"text\": \"comment text\"\n },\n {\n \"author\": \"nik9000\",\n \"text\": \"words words words\"\n }\n ]\n}\n\nPOST test/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"comments\",\n \"query\": {\n \"match\": {\"comments.text\" : \"words\"}\n },\n \"inner_hits\": {\n \"_source\" : false,\n \"docvalue_fields\" : [\n \"comments.text.keyword\"\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comments": {
- "type": "nested"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Test title",
- "comments": [
- {
- "author": "kimchy",
- "text": "comment text"
- },
- {
- "author": "nik9000",
- "text": "words words words"
- }
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "comments",
- "query": {
- "match": {
- "comments.text": "words"
- }
- },
- "inner_hits": {
- "_source": false,
- "docvalue_fields": [
- "comments.text.keyword"
- ]
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 318
- },
- "digest": "79feb4a0c0a21b7015a52f9736cd4683",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"mappings\": {\n \"properties\": {\n \"comments\": {\n \"type\": \"nested\",\n \"properties\": {\n \"votes\": {\n \"type\": \"nested\"\n }\n }\n }\n }\n }\n}\n\nPUT test/_doc/1?refresh\n{\n \"title\": \"Test title\",\n \"comments\": [\n {\n \"author\": \"kimchy\",\n \"text\": \"comment text\",\n \"votes\": []\n },\n {\n \"author\": \"nik9000\",\n \"text\": \"words words words\",\n \"votes\": [\n {\"value\": 1 , \"voter\": \"kimchy\"},\n {\"value\": -1, \"voter\": \"other\"}\n ]\n }\n ]\n}\n\nPOST test/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"comments.votes\",\n \"query\": {\n \"match\": {\n \"comments.votes.voter\": \"kimchy\"\n }\n },\n \"inner_hits\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comments": {
- "type": "nested",
- "properties": {
- "votes": {
- "type": "nested"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Test title",
- "comments": [
- {
- "author": "kimchy",
- "text": "comment text",
- "votes": []
- },
- {
- "author": "nik9000",
- "text": "words words words",
- "votes": [
- {
- "value": 1,
- "voter": "kimchy"
- },
- {
- "value": -1,
- "voter": "other"
- }
- ]
- }
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "comments.votes",
- "query": {
- "match": {
- "comments.votes.voter": "kimchy"
- }
- },
- "inner_hits": {}
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 374
- },
- "digest": "bb924187bb9a4f4f07e55042f1f4b639",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...,\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.6931471,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_score\": 0.6931471,\n \"_source\": ...,\n \"inner_hits\": {\n \"comments.votes\": { <1>\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.6931471,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_nested\": {\n \"field\": \"comments\",\n \"offset\": 1,\n \"_nested\": {\n \"field\": \"votes\",\n \"offset\": 0\n }\n },\n \"_score\": 0.6931471,\n \"_source\": {\n \"value\": 1,\n \"voter\": \"kimchy\"\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 435
- },
- "digest": "3f5b5bee692e7d4b0992dc0a64e95a60",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"mappings\": {\n \"properties\": {\n \"my_join_field\": {\n \"type\": \"join\",\n \"relations\": {\n \"my_parent\": \"my_child\"\n }\n }\n }\n }\n}\n\nPUT test/_doc/1?refresh\n{\n \"number\": 1,\n \"my_join_field\": \"my_parent\"\n}\n\nPUT test/_doc/2?routing=1&refresh\n{\n \"number\": 1,\n \"my_join_field\": {\n \"name\": \"my_child\",\n \"parent\": \"1\"\n }\n}\n\nPOST test/_search\n{\n \"query\": {\n \"has_child\": {\n \"type\": \"my_child\",\n \"query\": {\n \"match\": {\n \"number\": 1\n }\n },\n \"inner_hits\": {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_join_field": {
- "type": "join",
- "relations": {
- "my_parent": "my_child"
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "number": 1,
- "my_join_field": "my_parent"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/2",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "number": 1,
- "my_join_field": {
- "name": "my_child",
- "parent": "1"
- }
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "has_child": {
- "type": "my_child",
- "query": {
- "match": {
- "number": 1
- }
- },
- "inner_hits": {}
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 486
- },
- "digest": "fb62e4e434f60048bdc77373e674834a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...,\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.0,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_score\": 1.0,\n \"_source\": {\n \"number\": 1,\n \"my_join_field\": \"my_parent\"\n },\n \"inner_hits\": {\n \"my_child\": {\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.0,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_score\": 1.0,\n \"_routing\": \"1\",\n \"_source\": {\n \"number\": 1,\n \"my_join_field\": {\n \"name\": \"my_child\",\n \"parent\": \"1\"\n }\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/min-score.asciidoc",
- "line": 8
- },
- "digest": "8e8ceac8fc99348f885f85ff714557fd",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"min_score\": 0.5,\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "min_score": 0.5,
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/named-queries-and-filters.asciidoc",
- "line": 7
- },
- "digest": "0aad4321e968effc6e6ef2b98c6c71a5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"should\" : [\n {\"match\" : { \"name.first\" : {\"query\" : \"shay\", \"_name\" : \"first\"} }},\n {\"match\" : { \"name.last\" : {\"query\" : \"banon\", \"_name\" : \"last\"} }}\n ],\n \"filter\" : {\n \"terms\" : {\n \"name.last\" : [\"banon\", \"kimchy\"],\n \"_name\" : \"test\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "match": {
- "name.first": {
- "query": "shay",
- "_name": "first"
- }
- }
- },
- {
- "match": {
- "name.last": {
- "query": "banon",
- "_name": "last"
- }
- }
- }
- ],
- "filter": {
- "terms": {
- "name.last": [
- "banon",
- "kimchy"
- ],
- "_name": "test"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/post-filter.asciidoc",
- "line": 11
- },
- "digest": "35390274db3acad03eb77b2376c57e40",
- "lang": "console",
- "found": [],
- "source": "PUT /shirts\n{\n \"mappings\": {\n \"properties\": {\n \"brand\": { \"type\": \"keyword\"},\n \"color\": { \"type\": \"keyword\"},\n \"model\": { \"type\": \"keyword\"}\n }\n }\n}\n\nPUT /shirts/_doc/1?refresh\n{\n \"brand\": \"gucci\",\n \"color\": \"red\",\n \"model\": \"slim\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/shirts",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "brand": {
- "type": "keyword"
- },
- "color": {
- "type": "keyword"
- },
- "model": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "shirts"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/shirts/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "brand": "gucci",
- "color": "red",
- "model": "slim"
- },
- "params": {
- "index": "shirts",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/post-filter.asciidoc",
- "line": 40
- },
- "digest": "f83eb6605c7c56e297a494b318400ef0",
- "lang": "console",
- "found": [],
- "source": "GET /shirts/_search\n{\n \"query\": {\n \"bool\": {\n \"filter\": [\n { \"term\": { \"color\": \"red\" }},\n { \"term\": { \"brand\": \"gucci\" }}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/shirts/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": [
- {
- "term": {
- "color": "red"
- }
- },
- {
- "term": {
- "brand": "gucci"
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "shirts"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/post-filter.asciidoc",
- "line": 63
- },
- "digest": "81f1b1e1d5c81683b6bf471c469e6046",
- "lang": "console",
- "found": [],
- "source": "GET /shirts/_search\n{\n \"query\": {\n \"bool\": {\n \"filter\": [\n { \"term\": { \"color\": \"red\" }},\n { \"term\": { \"brand\": \"gucci\" }}\n ]\n }\n },\n \"aggs\": {\n \"models\": {\n \"terms\": { \"field\": \"model\" } <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/shirts/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": [
- {
- "term": {
- "color": "red"
- }
- },
- {
- "term": {
- "brand": "gucci"
- }
- }
- ]
- }
- },
- "aggs": {
- "models": {
- "terms": {
- "field": "model"
- }
- }
- }
- },
- "params": {
- "index": "shirts"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/post-filter.asciidoc",
- "line": 94
- },
- "digest": "48313f620c2871b6f4019b66be730109",
- "lang": "console",
- "found": [],
- "source": "GET /shirts/_search\n{\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"term\": { \"brand\": \"gucci\" } <1>\n }\n }\n },\n \"aggs\": {\n \"colors\": {\n \"terms\": { \"field\": \"color\" } <2>\n },\n \"color_red\": {\n \"filter\": {\n \"term\": { \"color\": \"red\" } <3>\n },\n \"aggs\": {\n \"models\": {\n \"terms\": { \"field\": \"model\" } <3>\n }\n }\n }\n },\n \"post_filter\": { <4>\n \"term\": { \"color\": \"red\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/shirts/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "brand": "gucci"
- }
- }
- }
- },
- "aggs": {
- "colors": {
- "terms": {
- "field": "color"
- }
- },
- "color_red": {
- "filter": {
- "term": {
- "color": "red"
- }
- },
- "aggs": {
- "models": {
- "terms": {
- "field": "model"
- }
- }
- }
- }
- },
- "post_filter": {
- "term": {
- "color": "red"
- }
- }
- },
- "params": {
- "index": "shirts"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/preference.asciidoc",
- "line": 59
- },
- "digest": "9405de6fd841c32ac510eb0a7eeed989",
- "lang": "console",
- "found": [],
- "source": "GET /_search?preference=xyzabc123\n{\n \"query\": {\n \"match\": {\n \"title\": \"elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "preference": "xyzabc123"
- },
- "body": {
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/query.asciidoc",
- "line": 8
- },
- "digest": "a8e19886f6b4792def0381c3f8cf2b5c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/rescore.asciidoc",
- "line": 43
- },
- "digest": "829a40d484c778a8c58340c7bf09e1d8",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"query\" : {\n \"match\" : {\n \"message\" : {\n \"operator\" : \"or\",\n \"query\" : \"the quick brown\"\n }\n }\n },\n \"rescore\" : {\n \"window_size\" : 50,\n \"query\" : {\n \"rescore_query\" : {\n \"match_phrase\" : {\n \"message\" : {\n \"query\" : \"the quick brown\",\n \"slop\" : 2\n }\n }\n },\n \"query_weight\" : 0.7,\n \"rescore_query_weight\" : 1.2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "operator": "or",
- "query": "the quick brown"
- }
- }
- },
- "rescore": {
- "window_size": 50,
- "query": {
- "rescore_query": {
- "match_phrase": {
- "message": {
- "query": "the quick brown",
- "slop": 2
- }
- }
- },
- "query_weight": 0.7,
- "rescore_query_weight": 1.2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/rescore.asciidoc",
- "line": 90
- },
- "digest": "7d7855afd9882a665bbabda810f94f61",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"query\" : {\n \"match\" : {\n \"message\" : {\n \"operator\" : \"or\",\n \"query\" : \"the quick brown\"\n }\n }\n },\n \"rescore\" : [ {\n \"window_size\" : 100,\n \"query\" : {\n \"rescore_query\" : {\n \"match_phrase\" : {\n \"message\" : {\n \"query\" : \"the quick brown\",\n \"slop\" : 2\n }\n }\n },\n \"query_weight\" : 0.7,\n \"rescore_query_weight\" : 1.2\n }\n }, {\n \"window_size\" : 10,\n \"query\" : {\n \"score_mode\": \"multiply\",\n \"rescore_query\" : {\n \"function_score\" : {\n \"script_score\": {\n \"script\": {\n \"source\": \"Math.log10(doc.likes.value + 2)\"\n }\n }\n }\n }\n }\n } ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "operator": "or",
- "query": "the quick brown"
- }
- }
- },
- "rescore": [
- {
- "window_size": 100,
- "query": {
- "rescore_query": {
- "match_phrase": {
- "message": {
- "query": "the quick brown",
- "slop": 2
- }
- }
- },
- "query_weight": 0.7,
- "rescore_query_weight": 1.2
- }
- },
- {
- "window_size": 10,
- "query": {
- "score_mode": "multiply",
- "rescore_query": {
- "function_score": {
- "script_score": {
- "script": {
- "source": "Math.log10(doc.likes.value + 2)"
- }
- }
- }
- }
- }
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/script-fields.asciidoc",
- "line": 8
- },
- "digest": "68358f94e77b5dce7eb01679516bae69",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match_all\": {}\n },\n \"script_fields\" : {\n \"test1\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['price'].value * 2\"\n }\n },\n \"test2\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['price'].value * params.factor\",\n \"params\" : {\n \"factor\" : 2.0\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "script_fields": {
- "test1": {
- "script": {
- "lang": "painless",
- "source": "doc['price'].value * 2"
- }
- },
- "test2": {
- "script": {
- "lang": "painless",
- "source": "doc['price'].value * params.factor",
- "params": {
- "factor": 2
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/script-fields.asciidoc",
- "line": 44
- },
- "digest": "34dd16c077e81b3744963b19a3dc9e49",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n {\n \"query\" : {\n \"match_all\": {}\n },\n \"script_fields\" : {\n \"test1\" : {\n \"script\" : \"params['_source']['message']\"\n }\n }\n }",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "script_fields": {
- "test1": {
- "script": "params['_source']['message']"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 40
- },
- "digest": "7e52bec09624cf6c0de5d13f2bfad5a5",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?scroll=1m\n{\n \"size\": 100,\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "size": 100,
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 58
- },
- "digest": "b41dce56b0e640d32b1cf452f87cec17",
- "lang": "console",
- "found": [],
- "source": "POST /_search/scroll <1>\n{\n \"scroll\" : \"1m\", <2>\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\" <3>\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search/scroll",
- "query": null,
- "body": {
- "scroll": "1m",
- "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
- },
- "params": null,
- "api": "scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 90
- },
- "digest": "d5dcddc6398b473b6ad9bce5c6adf986",
- "lang": "console",
- "found": [],
- "source": "GET /_search?scroll=1m\n{\n \"sort\": [\n \"_doc\"\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "sort": [
- "_doc"
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 143
- },
- "digest": "72beebe779a258c225dee7b023e60c52",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/stats/indices/search",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/search",
- "query": null,
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "search"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 156
- },
- "digest": "b0d64d0a554549e5b2808002a0725493",
- "lang": "console",
- "found": [],
- "source": "DELETE /_search/scroll\n{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_search/scroll",
- "query": null,
- "body": {
- "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
- },
- "params": null,
- "api": "clear_scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 167
- },
- "digest": "3a700f836d8d5da1b656a876554028aa",
- "lang": "console",
- "found": [],
- "source": "DELETE /_search/scroll\n{\n \"scroll_id\" : [\n \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n \"DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB\"\n ]\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_search/scroll",
- "query": null,
- "body": {
- "scroll_id": [
- "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
- "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB"
- ]
- },
- "params": null,
- "api": "clear_scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 181
- },
- "digest": "c2c21e2824fbf6b7198ede30419da82b",
- "lang": "console",
- "found": [],
- "source": "DELETE /_search/scroll/_all",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_search/scroll/_all",
- "query": null,
- "body": null,
- "params": {
- "scroll_id": "_all"
- },
- "api": "clear_scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 189
- },
- "digest": "b94cee0f74f57742b3948f9b784dfdd4",
- "lang": "console",
- "found": [],
- "source": "DELETE /_search/scroll/DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==,DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_search/scroll/DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==,DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB",
- "query": null,
- "body": null,
- "params": {
- "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==,DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB"
- },
- "api": "clear_scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 201
- },
- "digest": "1027ab1ca767ac1428176ef4f84bfbcf",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search?scroll=1m\n{\n \"slice\": {\n \"id\": 0, <1>\n \"max\": 2 <2>\n },\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n }\n}\nGET /twitter/_search?scroll=1m\n{\n \"slice\": {\n \"id\": 1,\n \"max\": 2\n },\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "slice": {
- "id": 0,
- "max": 2
- },
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "slice": {
- "id": 1,
- "max": 2
- },
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 263
- },
- "digest": "fdcaba9547180439ff4b6275034a5170",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search?scroll=1m\n{\n \"slice\": {\n \"field\": \"date\",\n \"id\": 0,\n \"max\": 10\n },\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "slice": {
- "field": "date",
- "id": 0,
- "max": 10
- },
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/search-after.asciidoc",
- "line": 14
- },
- "digest": "402ee4bf8e2e386d5f9100fdaf13a6d6",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"size\": 10,\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n },\n \"sort\": [\n {\"date\": \"asc\"},\n {\"tie_breaker_id\": \"asc\"} <1>\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "size": 10,
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- },
- "sort": [
- {
- "date": "asc"
- },
- {
- "tie_breaker_id": "asc"
- }
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/search-after.asciidoc",
- "line": 57
- },
- "digest": "525ec32997125d401f9c128ca450cefa",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"size\": 10,\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n },\n \"search_after\": [1463538857, \"654323\"],\n \"sort\": [\n {\"date\": \"asc\"},\n {\"tie_breaker_id\": \"asc\"}\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "size": 10,
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- },
- "search_after": [
- 1463538857,
- "654323"
- ],
- "sort": [
- {
- "date": "asc"
- },
- {
- "tie_breaker_id": "asc"
- }
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/search-type.asciidoc",
- "line": 54
- },
- "digest": "de3c9fe00efc5647ad4b695524cbe8a0",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search?search_type=query_then_fetch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "search_type": "query_then_fetch"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/search-type.asciidoc",
- "line": 72
- },
- "digest": "be0d2fbf861842eef2c98d5e5bf6e406",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search?search_type=dfs_query_then_fetch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "search_type": "dfs_query_then_fetch"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/seq-no.asciidoc",
- "line": 8
- },
- "digest": "63965d439716ed6d18d30baef09001a5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"seq_no_primary_term\": true,\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "seq_no_primary_term": true,
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 11
- },
- "digest": "d1b3b7d2bb2ab90d15fd10318abd24db",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"post_date\": { \"type\": \"date\" },\n \"user\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"age\": { \"type\": \"integer\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "post_date": {
- "type": "date"
- },
- "user": {
- "type": "keyword"
- },
- "name": {
- "type": "keyword"
- },
- "age": {
- "type": "integer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 30
- },
- "digest": "ae9b5fbd42af2386ffbf56ad4a697e51",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_search\n{\n \"sort\" : [\n { \"post_date\" : {\"order\" : \"asc\"}},\n \"user\",\n { \"name\" : \"desc\" },\n { \"age\" : \"desc\" },\n \"_score\"\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "post_date": {
- "order": "asc"
- }
- },
- "user",
- {
- "name": "desc"
- },
- {
- "age": "desc"
- },
- "_score"
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 94
- },
- "digest": "b997885974522ef439d5e345924cc5ba",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index/_doc/1?refresh\n{\n \"product\": \"chocolate\",\n \"price\": [20, 4]\n}\n\nPOST /_search\n{\n \"query\" : {\n \"term\" : { \"product\" : \"chocolate\" }\n },\n \"sort\" : [\n {\"price\" : {\"order\" : \"asc\", \"mode\" : \"avg\"}}\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "product": "chocolate",
- "price": [
- 20,
- 4
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "product": "chocolate"
- }
- },
- "sort": [
- {
- "price": {
- "order": "asc",
- "mode": "avg"
- }
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 123
- },
- "digest": "abf329ebefaf58acd4ee30e685731499",
- "lang": "console",
- "found": [],
- "source": "PUT /index_double\n{\n \"mappings\": {\n \"properties\": {\n \"field\": { \"type\": \"double\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_double",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "field": {
- "type": "double"
- }
- }
- }
- },
- "params": {
- "index": "index_double"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 135
- },
- "digest": "f6b5032bf27c2445d28845be0d413970",
- "lang": "console",
- "found": [],
- "source": "PUT /index_long\n{\n \"mappings\": {\n \"properties\": {\n \"field\": { \"type\": \"long\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_long",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "field": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "index_long"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 154
- },
- "digest": "2891aa10ee9d474780adf94d5607f2db",
- "lang": "console",
- "found": [],
- "source": "POST /index_long,index_double/_search\n{\n \"sort\" : [\n {\n \"field\" : {\n \"numeric_type\" : \"double\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/index_long,index_double/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "field": {
- "numeric_type": "double"
- }
- }
- ]
- },
- "params": {
- "index": "index_long,index_double"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 181
- },
- "digest": "f4a1008b3f9baa67bb03ce9ef5ab4cb4",
- "lang": "console",
- "found": [],
- "source": "PUT /index_double\n{\n \"mappings\": {\n \"properties\": {\n \"field\": { \"type\": \"date\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_double",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "field": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "index_double"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 193
- },
- "digest": "7477671958734843dd67cf0b8e6c7515",
- "lang": "console",
- "found": [],
- "source": "PUT /index_long\n{\n \"mappings\": {\n \"properties\": {\n \"field\": { \"type\": \"date_nanos\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_long",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "field": {
- "type": "date_nanos"
- }
- }
- }
- },
- "params": {
- "index": "index_long"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 212
- },
- "digest": "5f3549ac7fee94682ca0d7439eebdd2a",
- "lang": "console",
- "found": [],
- "source": "POST /index_long,index_double/_search\n{\n \"sort\" : [\n {\n \"field\" : {\n \"numeric_type\" : \"date_nanos\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/index_long,index_double/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "field": {
- "numeric_type": "date_nanos"
- }
- }
- ]
- },
- "params": {
- "index": "index_long,index_double"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 263
- },
- "digest": "de139866a220124360e5e27d1a736ea4",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"query\" : {\n \"term\" : { \"product\" : \"chocolate\" }\n },\n \"sort\" : [\n {\n \"offer.price\" : {\n \"mode\" : \"avg\",\n \"order\" : \"asc\",\n \"nested\": {\n \"path\": \"offer\",\n \"filter\": {\n \"term\" : { \"offer.color\" : \"blue\" }\n }\n }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "product": "chocolate"
- }
- },
- "sort": [
- {
- "offer.price": {
- "mode": "avg",
- "order": "asc",
- "nested": {
- "path": "offer",
- "filter": {
- "term": {
- "offer.color": "blue"
- }
- }
- }
- }
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 290
- },
- "digest": "22334f4b24bb8977d3e1bf2ffdc29d3f",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"parent\",\n \"query\": {\n \"bool\": {\n \"must\": {\"range\": {\"parent.age\": {\"gte\": 21}}},\n \"filter\": {\n \"nested\": {\n \"path\": \"parent.child\",\n \"query\": {\"match\": {\"parent.child.name\": \"matt\"}}\n }\n }\n }\n }\n }\n },\n \"sort\" : [\n {\n \"parent.child.age\" : {\n \"mode\" : \"min\",\n \"order\" : \"asc\",\n \"nested\": {\n \"path\": \"parent\",\n \"filter\": {\n \"range\": {\"parent.age\": {\"gte\": 21}}\n },\n \"nested\": {\n \"path\": \"parent.child\",\n \"filter\": {\n \"match\": {\"parent.child.name\": \"matt\"}\n }\n }\n }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "parent",
- "query": {
- "bool": {
- "must": {
- "range": {
- "parent.age": {
- "gte": 21
- }
- }
- },
- "filter": {
- "nested": {
- "path": "parent.child",
- "query": {
- "match": {
- "parent.child.name": "matt"
- }
- }
- }
- }
- }
- }
- }
- },
- "sort": [
- {
- "parent.child.age": {
- "mode": "min",
- "order": "asc",
- "nested": {
- "path": "parent",
- "filter": {
- "range": {
- "parent.age": {
- "gte": 21
- }
- }
- },
- "nested": {
- "path": "parent.child",
- "filter": {
- "match": {
- "parent.child.name": "matt"
- }
- }
- }
- }
- }
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 346
- },
- "digest": "ef0f4fa4272c47ff62fb7b422cf975e7",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"sort\" : [\n { \"price\" : {\"missing\" : \"_last\"} }\n ],\n \"query\" : {\n \"term\" : { \"product\" : \"chocolate\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "price": {
- "missing": "_last"
- }
- }
- ],
- "query": {
- "term": {
- "product": "chocolate"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 370
- },
- "digest": "899eef71a67a1b2aa11a2166ec7f48f1",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"sort\" : [\n { \"price\" : {\"unmapped_type\" : \"long\"} }\n ],\n \"query\" : {\n \"term\" : { \"product\" : \"chocolate\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "price": {
- "unmapped_type": "long"
- }
- }
- ],
- "query": {
- "term": {
- "product": "chocolate"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 392
- },
- "digest": "d17269bb80fb63ec0bf37d219e003dcb",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : [-70, 40],\n \"order\" : \"asc\",\n \"unit\" : \"km\",\n \"mode\" : \"min\",\n \"distance_type\" : \"arc\",\n \"ignore_unmapped\": true\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": [
- -70,
- 40
- ],
- "order": "asc",
- "unit": "km",
- "mode": "min",
- "distance_type": "arc",
- "ignore_unmapped": true
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 445
- },
- "digest": "979d25dff2d8987119410291ad47b0d1",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : {\n \"lat\" : 40,\n \"lon\" : -70\n },\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": {
- "lat": 40,
- "lon": -70
- },
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 471
- },
- "digest": "d50a3c64890f88af32c6d4ef4899d82a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : \"40,-70\",\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": "40,-70",
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 492
- },
- "digest": "a1db5c822745fe167e9ef854dca3d129",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : \"drm3btev3e86\",\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": "drm3btev3e86",
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 516
- },
- "digest": "15dad5338065baaaa7d475abe85f4c22",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : [-70, 40],\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": [
- -70,
- 40
- ],
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 540
- },
- "digest": "77243bbf92f2a55e0fca6c2a349a1c15",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : [[-70, 40], [-71, 42]],\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": [
- [
- -70,
- 40
- ],
- [
- -71,
- 42
- ]
- ],
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 569
- },
- "digest": "04fe1e3a0047b0cdb10987b79fc3f3f3",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n },\n \"sort\" : {\n \"_script\" : {\n \"type\" : \"number\",\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['field_name'].value * params.factor\",\n \"params\" : {\n \"factor\" : 1.1\n }\n },\n \"order\" : \"asc\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- },
- "sort": {
- "_script": {
- "type": "number",
- "script": {
- "lang": "painless",
- "source": "doc['field_name'].value * params.factor",
- "params": {
- "factor": 1.1
- }
- },
- "order": "asc"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 598
- },
- "digest": "e8e451bc8c45bcf16df43804c4fc8329",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"track_scores\": true,\n \"sort\" : [\n { \"post_date\" : {\"order\" : \"desc\"} },\n { \"name\" : \"desc\" },\n { \"age\" : \"desc\" }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "track_scores": true,
- "sort": [
- {
- "post_date": {
- "order": "desc"
- }
- },
- {
- "name": "desc"
- },
- {
- "age": "desc"
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/source-filtering.asciidoc",
- "line": 15
- },
- "digest": "08c5b266f5e5534dc094346974cf7386",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"_source\": false,\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "_source": false,
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/source-filtering.asciidoc",
- "line": 30
- },
- "digest": "5c10e00c99b338353b3e486e94be253e",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"_source\": \"obj.*\",\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "_source": "obj.*",
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/source-filtering.asciidoc",
- "line": 43
- },
- "digest": "160ae4ff9c53b8a98700caed0e82d7fe",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"_source\": [ \"obj1.*\", \"obj2.*\" ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "_source": [
- "obj1.*",
- "obj2.*"
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/source-filtering.asciidoc",
- "line": 60
- },
- "digest": "1e86a78433a0748970d6c3922a34898c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"_source\": {\n \"includes\": [ \"obj1.*\", \"obj2.*\" ],\n \"excludes\": [ \"*.description\" ]\n },\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "_source": {
- "includes": [
- "obj1.*",
- "obj2.*"
- ],
- "excludes": [
- "*.description"
- ]
- },
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/stored-fields.asciidoc",
- "line": 13
- },
- "digest": "2eeb3e55a7d3955e084bb369f1539009",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"stored_fields\" : [\"user\", \"postDate\"],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "stored_fields": [
- "user",
- "postDate"
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/stored-fields.asciidoc",
- "line": 29
- },
- "digest": "2af86a6ebbb834fbcf6fa7268f87a3a5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"stored_fields\" : [],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "stored_fields": [],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/stored-fields.asciidoc",
- "line": 60
- },
- "digest": "ccec437aed7a10d9111724ffd929fe00",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"stored_fields\": \"_none_\",\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "stored_fields": "_none_",
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 23
- },
- "digest": "32789ba30a73d8813b61c39619ad7d71",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"track_total_hits\": true,\n \"query\": {\n \"match\" : {\n \"message\" : \"Elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "track_total_hits": true,
- "query": {
- "match": {
- "message": "Elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 39
- },
- "digest": "2d4cfa49f19c4bece01b3ddfba0da723",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"timed_out\": false,\n \"took\": 100,\n \"hits\": {\n \"max_score\": 1.0,\n \"total\" : {\n \"value\": 2048, <1>\n \"relation\": \"eq\" <2>\n },\n \"hits\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 68
- },
- "digest": "e45cb729ed4a694b2d6cabaa55c9b5be",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"track_total_hits\": 100,\n \"query\": {\n \"match\" : {\n \"message\" : \"Elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "track_total_hits": 100,
- "query": {
- "match": {
- "message": "Elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 88
- },
- "digest": "2f9249492404ae95838b393e86c4cf88",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"timed_out\": false,\n \"took\": 30,\n \"hits\" : {\n \"max_score\": 1.0,\n \"total\" : {\n \"value\": 42, <1>\n \"relation\": \"eq\" <2>\n },\n \"hits\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 120
- },
- "digest": "66e97dfb31795ce3066106b3303a9bc2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"hits\" : {\n \"max_score\": 1.0,\n \"total\" : {\n \"value\": 100, <1>\n \"relation\": \"gte\" <2>\n },\n \"hits\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 142
- },
- "digest": "d9e08bca979c7ba3a9581f69470bf914",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"track_total_hits\": false,\n \"query\": {\n \"match\" : {\n \"message\" : \"Elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "track_total_hits": false,
- "query": {
- "match": {
- "message": "Elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 158
- },
- "digest": "05857ba6b0db5d68df139c82f6a3be80",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"timed_out\": false,\n \"took\": 10,\n \"hits\" : { <1>\n \"max_score\": 1.0,\n \"hits\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/version.asciidoc",
- "line": 7
- },
- "digest": "9535be36eac8a589bd6bf7b7228eefd7",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"version\": true,\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "version": true,
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 7
- },
- "digest": "e068d93555351b9afbdb9dd2aff6368d",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\" : {\n \"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } },\n \"size\" : \"{{my_size}}\"\n },\n \"params\" : {\n \"my_field\" : \"message\",\n \"my_value\" : \"some message\",\n \"my_size\" : 5\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "match": {
- "{{my_field}}": "{{my_value}}"
- }
- },
- "size": "{{my_size}}"
- },
- "params": {
- "my_field": "message",
- "my_value": "some message",
- "my_size": 5
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 112
- },
- "digest": "b19dc078255bfa1237206913ae94012f",
- "lang": "console",
- "found": [],
- "source": "POST _scripts/\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"title\": \"{{query_string}}\"\n }\n }\n }\n }\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 147
- },
- "digest": "e51c88800679913981757542bc639816",
- "lang": "console",
- "found": [],
- "source": "GET _scripts/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 155
- },
- "digest": "f3f8f542b19e2e32b38274df21e74c43",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"script\" : {\n \"lang\" : \"mustache\",\n \"source\" : \"{\\\"query\\\":{\\\"match\\\":{\\\"title\\\":\\\"{{query_string}}\\\"}}}\",\n \"options\": {\n \"content_type\" : \"application/json; charset=UTF-8\"\n }\n },\n \"_id\": \"\",\n \"found\": true\n}"
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 173
- },
- "digest": "ed639528456671b302ecc887f5a60987",
- "lang": "console",
- "found": [],
- "source": "DELETE _scripts/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 185
- },
- "digest": "de5b9f1211876f6ba7a4c93e87c27d3a",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"id\": \"\", <1>\n \"params\": {\n \"query_string\": \"search for these words\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "id": "",
- "params": {
- "query_string": "search for these words"
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 205
- },
- "digest": "4b13f649aa2eca6f7ee4221f708430c1",
- "lang": "console",
- "found": [],
- "source": "GET _render/template\n{\n \"source\": \"{ \\\"query\\\": { \\\"terms\\\": {{#toJson}}statuses{{/toJson}} }}\",\n \"params\": {\n \"statuses\" : {\n \"status\": [ \"pending\", \"published\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_render/template",
- "query": null,
- "body": {
- "source": "{ \"query\": { \"terms\": {{#toJson}}statuses{{/toJson}} }}",
- "params": {
- "statuses": {
- "status": [
- "pending",
- "published"
- ]
- }
- }
- },
- "params": null,
- "api": "render_search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 221
- },
- "digest": "f4b44a1758edafc2e3ea3db7ed7cd9e2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template_output\": {\n \"query\": {\n \"terms\": {\n \"status\": [ <1>\n \"pending\",\n \"published\"\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 258
- },
- "digest": "99e29a569f37ea83b02687e6e2793529",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"id\": \"my_template\",\n \"params\": {\n \"status\": [ \"pending\", \"published\" ]\n },\n \"explain\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "id": "my_template",
- "params": {
- "status": [
- "pending",
- "published"
- ]
- },
- "explain": true
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 277
- },
- "digest": "3462452c6fdba8dc1efe2cca101246e8",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"id\": \"my_template\",\n \"params\": {\n \"status\": [ \"pending\", \"published\" ]\n },\n \"profile\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "id": "my_template",
- "params": {
- "status": [
- "pending",
- "published"
- ]
- },
- "profile": true
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 294
- },
- "digest": "4697b9aa952ac1613ee1a6ec7b3223c1",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": {\n \"query\": {\n \"term\": {\n \"message\": \"{{query_string}}\"\n }\n }\n },\n \"params\": {\n \"query_string\": \"search for these words\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "term": {
- "message": "{{query_string}}"
- }
- }
- },
- "params": {
- "query_string": "search for these words"
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 318
- },
- "digest": "eb1f3134f28a9ba8406b0f10199cf5be",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": \"{ \\\"query\\\": { \\\"terms\\\": {{#toJson}}statuses{{/toJson}} }}\",\n \"params\": {\n \"statuses\" : {\n \"status\": [ \"pending\", \"published\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": "{ \"query\": { \"terms\": {{#toJson}}statuses{{/toJson}} }}",
- "params": {
- "statuses": {
- "status": [
- "pending",
- "published"
- ]
- }
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 350
- },
- "digest": "6be45fa02e779a727ddf48f871610aa8",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": \"{\\\"query\\\":{\\\"bool\\\":{\\\"must\\\": {{#toJson}}clauses{{/toJson}} }}}\",\n \"params\": {\n \"clauses\": [\n { \"term\": { \"user\" : \"foo\" } },\n { \"term\": { \"user\" : \"bar\" } }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": "{\"query\":{\"bool\":{\"must\": {{#toJson}}clauses{{/toJson}} }}}",
- "params": {
- "clauses": [
- {
- "term": {
- "user": "foo"
- }
- },
- {
- "term": {
- "user": "bar"
- }
- }
- ]
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 395
- },
- "digest": "33bb4a6ec63a709a14dfa15a5e2cca88",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": {\n \"query\": {\n \"match\": {\n \"emails\": \"{{#join}}emails{{/join}}\"\n }\n }\n },\n \"params\": {\n \"emails\": [ \"username@email.com\", \"lastname@email.com\" ]\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "match": {
- "emails": "{{#join}}emails{{/join}}"
- }
- }
- },
- "params": {
- "emails": [
- "username@email.com",
- "lastname@email.com"
- ]
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 428
- },
- "digest": "02f0012ca77fdc409592e524e5647fb8",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": {\n \"query\": {\n \"range\": {\n \"born\": {\n \"gte\" : \"{{date.min}}\",\n \"lte\" : \"{{date.max}}\",\n \"format\": \"{{#join delimiter='||'}}date.formats{{/join delimiter='||'}}\"\n\t }\n }\n }\n },\n \"params\": {\n \"date\": {\n \"min\": \"2016\",\n \"max\": \"31/12/2017\",\n \"formats\": [\"dd/MM/yyyy\", \"yyyy\"]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "range": {
- "born": {
- "gte": "{{date.min}}",
- "lte": "{{date.max}}",
- "format": "{{#join delimiter='||'}}date.formats{{/join delimiter='||'}}"
- }
- }
- }
- },
- "params": {
- "date": {
- "min": "2016",
- "max": "31/12/2017",
- "formats": [
- "dd/MM/yyyy",
- "yyyy"
- ]
- }
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 612
- },
- "digest": "a5cc9a86f0f9525cd86564421c721d2f",
- "lang": "console",
- "found": [],
- "source": "GET _render/template\n{\n \"source\" : {\n \"query\" : {\n \"term\": {\n \"http_access_log\": \"{{#url}}{{host}}/{{page}}{{/url}}\"\n }\n }\n },\n \"params\": {\n \"host\": \"https://www.elastic.co/\",\n \"page\": \"learn\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_render/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "term": {
- "http_access_log": "{{#url}}{{host}}/{{page}}{{/url}}"
- }
- }
- },
- "params": {
- "host": "https://www.elastic.co/",
- "page": "learn"
- }
- },
- "params": null,
- "api": "render_search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 633
- },
- "digest": "619e96682251070000a25d9c2416456e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template_output\" : {\n \"query\" : {\n \"term\" : {\n \"http_access_log\" : \"https%3A%2F%2Fwww.elastic.co%2F%2Flearn\"\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 7
- },
- "digest": "49b137a1c0016face219bac3faf41996",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search_shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search_shards",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search_shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 60
- },
- "digest": "49b137a1c0016face219bac3faf41996",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search_shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search_shards",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search_shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 68
- },
- "digest": "76b0a597cf67a4a269f0d58f2a48f062",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\": ...,\n \"indices\" : {\n \"twitter\": { }\n },\n \"shards\": [\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 0,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"0TvkCyF7TAmM1wHP4a42-A\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 1,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"fMju3hd1QHWmWrIgFnI4Ww\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 2,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"Nwl0wbMBTHCWjEEbGYGapg\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 3,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"bU_KLGJISbW0RejwnwDPKw\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 4,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"DMs7_giNSwmdqVukF7UydA\"},\n \"relocating_node\": null\n }\n ]\n ]\n}"
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 144
- },
- "digest": "a44b7da0091ac75e5571475a4e99bb16",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search_shards?routing=foo,bar",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search_shards",
- "query": {
- "routing": "foo,bar"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search_shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 152
- },
- "digest": "15386d464faca2db38376ae46da0d967",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\": ...,\n \"indices\" : {\n \"twitter\": { }\n },\n \"shards\": [\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 2,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"fMju3hd1QHWmWrIgFnI4Ww\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 3,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"0TvkCyF7TAmM1wHP4a42-A\"},\n \"relocating_node\": null\n }\n ]\n ]\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters.asciidoc",
- "line": 8
- },
- "digest": "626f8c4b3e2cd3d9beaa63a7f5799d7a",
- "lang": "console",
- "found": [],
- "source": "POST twitter/_search\n{\n \"query\" : {\n \"match\": {\n \"message\": \"tring out Elasticsearch\"\n }\n },\n \"suggest\" : {\n \"my-suggestion\" : {\n \"text\" : \"tring out Elasticsearch\",\n \"term\" : {\n \"field\" : \"message\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "tring out Elasticsearch"
- }
- },
- "suggest": {
- "my-suggestion": {
- "text": "tring out Elasticsearch",
- "term": {
- "field": "message"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters.asciidoc",
- "line": 51
- },
- "digest": "2533e4b36ae837eaecda08407ecb6383",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"suggest\": {\n \"my-suggest-1\" : {\n \"text\" : \"tring out Elasticsearch\",\n \"term\" : {\n \"field\" : \"message\"\n }\n },\n \"my-suggest-2\" : {\n \"text\" : \"kmichy\",\n \"term\" : {\n \"field\" : \"user\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "suggest": {
- "my-suggest-1": {
- "text": "tring out Elasticsearch",
- "term": {
- "field": "message"
- }
- },
- "my-suggest-2": {
- "text": "kmichy",
- "term": {
- "field": "user"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters.asciidoc",
- "line": 80
- },
- "digest": "b53648eccf39f999e69495a1ef4b8a43",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"hits\": ...\n \"took\": 2,\n \"timed_out\": false,\n \"suggest\": {\n \"my-suggest-1\": [ {\n \"text\": \"tring\",\n \"offset\": 0,\n \"length\": 5,\n \"options\": [ {\"text\": \"trying\", \"score\": 0.8, \"freq\": 1 } ]\n }, {\n \"text\": \"out\",\n \"offset\": 6,\n \"length\": 3,\n \"options\": []\n }, {\n \"text\": \"elasticsearch\",\n \"offset\": 10,\n \"length\": 13,\n \"options\": []\n } ],\n \"my-suggest-2\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters.asciidoc",
- "line": 127
- },
- "digest": "5275842787967b6db876025f4a1c6942",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"suggest\": {\n \"text\" : \"tring out Elasticsearch\",\n \"my-suggest-1\" : {\n \"term\" : {\n \"field\" : \"message\"\n }\n },\n \"my-suggest-2\" : {\n \"term\" : {\n \"field\" : \"user\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "tring out Elasticsearch",
- "my-suggest-1": {
- "term": {
- "field": "message"
- }
- },
- "my-suggest-2": {
- "term": {
- "field": "user"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 25
- },
- "digest": "5566cff431570f522e1fc5475b2ed875",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"settings\": {\n \"index\": {\n \"number_of_shards\": 1,\n \"analysis\": {\n \"analyzer\": {\n \"trigram\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\"lowercase\",\"shingle\"]\n },\n \"reverse\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\"lowercase\",\"reverse\"]\n }\n },\n \"filter\": {\n \"shingle\": {\n \"type\": \"shingle\",\n \"min_shingle_size\": 2,\n \"max_shingle_size\": 3\n }\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"fields\": {\n \"trigram\": {\n \"type\": \"text\",\n \"analyzer\": \"trigram\"\n },\n \"reverse\": {\n \"type\": \"text\",\n \"analyzer\": \"reverse\"\n }\n }\n }\n }\n }\n}\nPOST test/_doc?refresh=true\n{\"title\": \"noble warriors\"}\nPOST test/_doc?refresh=true\n{\"title\": \"nobel prize\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "number_of_shards": 1,
- "analysis": {
- "analyzer": {
- "trigram": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "shingle"
- ]
- },
- "reverse": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "reverse"
- ]
- }
- },
- "filter": {
- "shingle": {
- "type": "shingle",
- "min_shingle_size": 2,
- "max_shingle_size": 3
- }
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "fields": {
- "trigram": {
- "type": "text",
- "analyzer": "trigram"
- },
- "reverse": {
- "type": "text",
- "analyzer": "reverse"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/test/_doc",
- "query": {
- "refresh": "true"
- },
- "body": {
- "title": "noble warriors"
- },
- "params": {
- "index": "test"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_doc",
- "query": {
- "refresh": "true"
- },
- "body": {
- "title": "nobel prize"
- },
- "params": {
- "index": "test"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 83
- },
- "digest": "3b162509ed14eda44a9681cd1108fa39",
- "lang": "console",
- "found": [],
- "source": "POST test/_search\n{\n \"suggest\": {\n \"text\": \"noble prize\",\n \"simple_phrase\": {\n \"phrase\": {\n \"field\": \"title.trigram\",\n \"size\": 1,\n \"gram_size\": 3,\n \"direct_generator\": [ {\n \"field\": \"title.trigram\",\n \"suggest_mode\": \"always\"\n } ],\n \"highlight\": {\n \"pre_tag\": \"\",\n \"post_tag\": \"\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "noble prize",
- "simple_phrase": {
- "phrase": {
- "field": "title.trigram",
- "size": 1,
- "gram_size": 3,
- "direct_generator": [
- {
- "field": "title.trigram",
- "suggest_mode": "always"
- }
- ],
- "highlight": {
- "pre_tag": "",
- "post_tag": ""
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 110
- },
- "digest": "3af632e3611008f1290293e8cb653e4f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"hits\": ...\n \"timed_out\": false,\n \"took\": 3,\n \"suggest\": {\n \"simple_phrase\" : [\n {\n \"text\" : \"noble prize\",\n \"offset\" : 0,\n \"length\" : 11,\n \"options\" : [ {\n \"text\" : \"nobel prize\",\n \"highlighted\": \"nobel prize\",\n \"score\" : 0.48614594\n }]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 224
- },
- "digest": "89a6b24618cafd60de1702a5b9f28a8d",
- "lang": "console",
- "found": [],
- "source": "POST test/_search\n{\n \"suggest\": {\n \"text\" : \"noble prize\",\n \"simple_phrase\" : {\n \"phrase\" : {\n \"field\" : \"title.trigram\",\n \"size\" : 1,\n \"direct_generator\" : [ {\n \"field\" : \"title.trigram\",\n \"suggest_mode\" : \"always\",\n \"min_word_length\" : 1\n } ],\n \"collate\": {\n \"query\": { <1>\n \"source\" : {\n \"match\": {\n \"{{field_name}}\" : \"{{suggestion}}\" <2>\n }\n }\n },\n \"params\": {\"field_name\" : \"title\"}, <3>\n \"prune\": true <4>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "noble prize",
- "simple_phrase": {
- "phrase": {
- "field": "title.trigram",
- "size": 1,
- "direct_generator": [
- {
- "field": "title.trigram",
- "suggest_mode": "always",
- "min_word_length": 1
- }
- ],
- "collate": {
- "query": {
- "source": {
- "match": {
- "{{field_name}}": "{{suggestion}}"
- }
- }
- },
- "params": {
- "field_name": "title"
- },
- "prune": true
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 293
- },
- "digest": "203c3bb334384bdfb11ff1101ccfba25",
- "lang": "console",
- "found": [],
- "source": "POST test/_search\n{\n \"suggest\": {\n \"text\" : \"obel prize\",\n \"simple_phrase\" : {\n \"phrase\" : {\n \"field\" : \"title.trigram\",\n \"size\" : 1,\n \"smoothing\" : {\n \"laplace\" : {\n \"alpha\" : 0.7\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "obel prize",
- "simple_phrase": {
- "phrase": {
- "field": "title.trigram",
- "size": 1,
- "smoothing": {
- "laplace": {
- "alpha": 0.7
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 413
- },
- "digest": "eb6d62f1d855a8e8fe9eab2656d47504",
- "lang": "console",
- "found": [],
- "source": "POST test/_search\n{\n \"suggest\": {\n \"text\" : \"obel prize\",\n \"simple_phrase\" : {\n \"phrase\" : {\n \"field\" : \"title.trigram\",\n \"size\" : 1,\n \"direct_generator\" : [ {\n \"field\" : \"title.trigram\",\n \"suggest_mode\" : \"always\"\n }, {\n \"field\" : \"title.reverse\",\n \"suggest_mode\" : \"always\",\n \"pre_filter\" : \"reverse\",\n \"post_filter\" : \"reverse\"\n } ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "obel prize",
- "simple_phrase": {
- "phrase": {
- "field": "title.trigram",
- "size": 1,
- "direct_generator": [
- {
- "field": "title.trigram",
- "suggest_mode": "always"
- },
- {
- "field": "title.reverse",
- "suggest_mode": "always",
- "pre_filter": "reverse",
- "post_filter": "reverse"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 28
- },
- "digest": "b8718ca915bbb848925a5fb593a03e70",
- "lang": "console",
- "found": [],
- "source": "PUT music\n{\n \"mappings\": {\n \"properties\" : {\n \"suggest\" : {\n \"type\" : \"completion\"\n },\n \"title\" : {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/music",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "suggest": {
- "type": "completion"
- },
- "title": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 84
- },
- "digest": "223787a2b80e132a22548768ccf7052d",
- "lang": "console",
- "found": [],
- "source": "PUT music/_doc/1?refresh\n{\n \"suggest\" : {\n \"input\": [ \"Nevermind\", \"Nirvana\" ],\n \"weight\" : 34\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/music/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "suggest": {
- "input": [
- "Nevermind",
- "Nirvana"
- ],
- "weight": 34
- }
- },
- "params": {
- "index": "music",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 120
- },
- "digest": "5e9f3b7246f4549624fa5b9dd3719d75",
- "lang": "console",
- "found": [],
- "source": "PUT music/_doc/1?refresh\n{\n \"suggest\" : [\n {\n \"input\": \"Nevermind\",\n \"weight\" : 10\n },\n {\n \"input\": \"Nirvana\",\n \"weight\" : 3\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/music/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "suggest": [
- {
- "input": "Nevermind",
- "weight": 10
- },
- {
- "input": "Nirvana",
- "weight": 3
- }
- ]
- },
- "params": {
- "index": "music",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 141
- },
- "digest": "7c3414279d47e9c29105d061ed316ef8",
- "lang": "console",
- "found": [],
- "source": "PUT music/_doc/1?refresh\n{\n \"suggest\" : [ \"Nevermind\", \"Nirvana\" ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/music/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "suggest": [
- "Nevermind",
- "Nirvana"
- ]
- },
- "params": {
- "index": "music",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 158
- },
- "digest": "7f951981bd8ed09e56aebeb13adb96ce",
- "lang": "console",
- "found": [],
- "source": "POST music/_search?pretty\n{\n \"suggest\": {\n \"song-suggest\" : {\n \"prefix\" : \"nir\", <1>\n \"completion\" : { <2>\n \"field\" : \"suggest\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "song-suggest": {
- "prefix": "nir",
- "completion": {
- "field": "suggest"
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 180
- },
- "digest": "92c5e36c94d3f183766862498044ec16",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\": ...\n \"took\": 2,\n \"timed_out\": false,\n \"suggest\": {\n \"song-suggest\" : [ {\n \"text\" : \"nir\",\n \"offset\" : 0,\n \"length\" : 3,\n \"options\" : [ {\n \"text\" : \"Nirvana\",\n \"_index\": \"music\",\n \"_id\": \"1\",\n \"_score\": 1.0,\n \"_source\": {\n \"suggest\": [\"Nevermind\", \"Nirvana\"]\n }\n } ]\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 226
- },
- "digest": "565ef4aad0c7765879325cc5d2e3c530",
- "lang": "console",
- "found": [],
- "source": "POST music/_search\n{\n \"_source\": \"suggest\", <1>\n \"suggest\": {\n \"song-suggest\" : {\n \"prefix\" : \"nir\",\n \"completion\" : {\n \"field\" : \"suggest\", <2>\n \"size\" : 5 <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": null,
- "body": {
- "_source": "suggest",
- "suggest": {
- "song-suggest": {
- "prefix": "nir",
- "completion": {
- "field": "suggest",
- "size": 5
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 250
- },
- "digest": "af0f6a4645a4b938f4fa892935cb1f26",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 6,\n \"timed_out\": false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : null,\n \"hits\" : []\n },\n \"suggest\": {\n \"song-suggest\" : [ {\n \"text\" : \"nir\",\n \"offset\" : 0,\n \"length\" : 3,\n \"options\" : [ {\n \"text\" : \"Nirvana\",\n \"_index\": \"music\",\n \"_id\": \"1\",\n \"_score\": 1.0,\n \"_source\": {\n \"suggest\": [\"Nevermind\", \"Nirvana\"]\n }\n } ]\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 316
- },
- "digest": "b2a6fb1a94dd10bf594dafe727647e1d",
- "lang": "console",
- "found": [],
- "source": "POST music/_search?pretty\n{\n \"suggest\": {\n \"song-suggest\" : {\n \"prefix\" : \"nor\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"skip_duplicates\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "song-suggest": {
- "prefix": "nor",
- "completion": {
- "field": "suggest",
- "skip_duplicates": true
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 341
- },
- "digest": "a4eac3c0bac550247e8c7d3f9bcaac1c",
- "lang": "console",
- "found": [],
- "source": "POST music/_search?pretty\n{\n \"suggest\": {\n \"song-suggest\" : {\n \"prefix\" : \"nor\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"fuzzy\" : {\n \"fuzziness\" : 2\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "song-suggest": {
- "prefix": "nor",
- "completion": {
- "field": "suggest",
- "fuzzy": {
- "fuzziness": 2
- }
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 399
- },
- "digest": "62280b8a1ec0c214b3110a2c42a55fce",
- "lang": "console",
- "found": [],
- "source": "POST music/_search?pretty\n{\n \"suggest\": {\n \"song-suggest\" : {\n \"regex\" : \"n[ever|i]r\",\n \"completion\" : {\n \"field\" : \"suggest\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "song-suggest": {
- "regex": "n[ever|i]r",
- "completion": {
- "field": "suggest"
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 25
- },
- "digest": "46b3154afd9a05f1aadd726efdd9cf98",
- "lang": "console",
- "found": [],
- "source": "PUT place\n{\n \"mappings\": {\n \"properties\" : {\n \"suggest\" : {\n \"type\" : \"completion\",\n \"contexts\": [\n { <1>\n \"name\": \"place_type\",\n \"type\": \"category\"\n },\n { <2>\n \"name\": \"location\",\n \"type\": \"geo\",\n \"precision\": 4\n }\n ]\n }\n }\n }\n}\nPUT place_path_category\n{\n \"mappings\": {\n \"properties\" : {\n \"suggest\" : {\n \"type\" : \"completion\",\n \"contexts\": [\n { <3>\n \"name\": \"place_type\",\n \"type\": \"category\",\n \"path\": \"cat\"\n },\n { <4>\n \"name\": \"location\",\n \"type\": \"geo\",\n \"precision\": 4,\n \"path\": \"loc\"\n }\n ]\n },\n \"loc\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/place",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "suggest": {
- "type": "completion",
- "contexts": [
- {
- "name": "place_type",
- "type": "category"
- },
- {
- "name": "location",
- "type": "geo",
- "precision": 4
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/place_path_category",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "suggest": {
- "type": "completion",
- "contexts": [
- {
- "name": "place_type",
- "type": "category",
- "path": "cat"
- },
- {
- "name": "location",
- "type": "geo",
- "precision": 4,
- "path": "loc"
- }
- ]
- },
- "loc": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "place_path_category"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 100
- },
- "digest": "2e59a0f8721e27dd537566f4af7a568f",
- "lang": "console",
- "found": [],
- "source": "PUT place/_doc/1\n{\n \"suggest\": {\n \"input\": [\"timmy's\", \"starbucks\", \"dunkin donuts\"],\n \"contexts\": {\n \"place_type\": [\"cafe\", \"food\"] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/place/_doc/1",
- "query": null,
- "body": {
- "suggest": {
- "input": [
- "timmy's",
- "starbucks",
- "dunkin donuts"
- ],
- "contexts": {
- "place_type": [
- "cafe",
- "food"
- ]
- }
- }
- },
- "params": {
- "index": "place",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 118
- },
- "digest": "d2a53c6c16ff2305830f64a3efd5f61d",
- "lang": "console",
- "found": [],
- "source": "PUT place_path_category/_doc/1\n{\n \"suggest\": [\"timmy's\", \"starbucks\", \"dunkin donuts\"],\n \"cat\": [\"cafe\", \"food\"] <1>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/place_path_category/_doc/1",
- "query": null,
- "body": {
- "suggest": [
- "timmy's",
- "starbucks",
- "dunkin donuts"
- ],
- "cat": [
- "cafe",
- "food"
- ]
- },
- "params": {
- "index": "place_path_category",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 140
- },
- "digest": "8c3e9da5f412261477c032b33f36a3e9",
- "lang": "console",
- "found": [],
- "source": "POST place/_search?pretty\n{\n \"suggest\": {\n \"place_suggestion\" : {\n \"prefix\" : \"tim\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"size\": 10,\n \"contexts\": {\n \"place_type\": [ \"cafe\", \"restaurants\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/place/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "place_suggestion": {
- "prefix": "tim",
- "completion": {
- "field": "suggest",
- "size": 10,
- "contexts": {
- "place_type": [
- "cafe",
- "restaurants"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 168
- },
- "digest": "8ac73762800c9db1ae418bfc0bcfa65a",
- "lang": "console",
- "found": [],
- "source": "POST place/_search?pretty\n{\n \"suggest\": {\n \"place_suggestion\" : {\n \"prefix\" : \"tim\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"size\": 10,\n \"contexts\": {\n \"place_type\": [ <1>\n { \"context\" : \"cafe\" },\n { \"context\" : \"restaurants\", \"boost\": 2 }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/place/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "place_suggestion": {
- "prefix": "tim",
- "completion": {
- "field": "suggest",
- "size": 10,
- "contexts": {
- "place_type": [
- {
- "context": "cafe"
- },
- {
- "context": "restaurants",
- "boost": 2
- }
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 253
- },
- "digest": "182162241e42f16f5860ea26fdc52c7e",
- "lang": "console",
- "found": [],
- "source": "PUT place/_doc/1\n{\n \"suggest\": {\n \"input\": \"timmy's\",\n \"contexts\": {\n \"location\": [\n {\n \"lat\": 43.6624803,\n \"lon\": -79.3863353\n },\n {\n \"lat\": 43.6624718,\n \"lon\": -79.3873227\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/place/_doc/1",
- "query": null,
- "body": {
- "suggest": {
- "input": "timmy's",
- "contexts": {
- "location": [
- {
- "lat": 43.6624803,
- "lon": -79.3863353
- },
- {
- "lat": 43.6624718,
- "lon": -79.3873227
- }
- ]
- }
- }
- },
- "params": {
- "index": "place",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 282
- },
- "digest": "bc79a8936474faf7de6d3c9872678176",
- "lang": "console",
- "found": [],
- "source": "POST place/_search\n{\n \"suggest\": {\n \"place_suggestion\" : {\n \"prefix\" : \"tim\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"size\": 10,\n \"contexts\": {\n \"location\": {\n \"lat\": 43.662,\n \"lon\": -79.380\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/place/_search",
- "query": null,
- "body": {
- "suggest": {
- "place_suggestion": {
- "prefix": "tim",
- "completion": {
- "field": "suggest",
- "size": 10,
- "contexts": {
- "location": {
- "lat": 43.662,
- "lon": -79.38
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 315
- },
- "digest": "837c765a38fa0fd5f01b1559138469be",
- "lang": "console",
- "found": [],
- "source": "POST place/_search?pretty\n{\n \"suggest\": {\n \"place_suggestion\" : {\n \"prefix\" : \"tim\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"size\": 10,\n \"contexts\": {\n \"location\": [ <1>\n {\n \"lat\": 43.6624803,\n \"lon\": -79.3863353,\n \"precision\": 2\n },\n {\n \"context\": {\n \"lat\": 43.6624803,\n \"lon\": -79.3863353\n },\n \"boost\": 2\n }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/place/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "place_suggestion": {
- "prefix": "tim",
- "completion": {
- "field": "suggest",
- "size": 10,
- "contexts": {
- "location": [
- {
- "lat": 43.6624803,
- "lon": -79.3863353,
- "precision": 2
- },
- {
- "context": {
- "lat": 43.6624803,
- "lon": -79.3863353
- },
- "boost": 2
- }
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/misc.asciidoc",
- "line": 10
- },
- "digest": "e194e9cbe3eb2305f4f7cdda0cf529bd",
- "lang": "console",
- "found": [],
- "source": "POST _search?typed_keys\n{\n \"suggest\": {\n \"text\" : \"some test mssage\",\n \"my-first-suggester\" : {\n \"term\" : {\n \"field\" : \"message\"\n }\n },\n \"my-second-suggester\" : {\n \"phrase\" : {\n \"field\" : \"message\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": {
- "typed_keys": true
- },
- "body": {
- "suggest": {
- "text": "some test mssage",
- "my-first-suggester": {
- "term": {
- "field": "message"
- }
- },
- "my-second-suggester": {
- "phrase": {
- "field": "message"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/misc.asciidoc",
- "line": 34
- },
- "digest": "e271c47fe54d36c6e09791d1a50ce314",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"suggest\": {\n \"term#my-first-suggester\": [ <1>\n {\n \"text\": \"some\",\n \"offset\": 0,\n \"length\": 4,\n \"options\": []\n },\n {\n \"text\": \"test\",\n \"offset\": 5,\n \"length\": 4,\n \"options\": []\n },\n {\n \"text\": \"mssage\",\n \"offset\": 10,\n \"length\": 6,\n \"options\": [\n {\n \"text\": \"message\",\n \"score\": 0.8333333,\n \"freq\": 4\n }\n ]\n }\n ],\n \"phrase#my-second-suggester\": [ <2>\n {\n \"text\": \"some test mssage\",\n \"offset\": 0,\n \"length\": 16,\n \"options\": [\n {\n \"text\": \"some test message\",\n \"score\": 0.030227963\n }\n ]\n }\n ]\n },\n ...\n}"
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 7
- },
- "digest": "58a2a71be35e770b50914753740ec91e",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_msearch\n{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"twitter2\"}\n{\"query\" : {\"match_all\" : {}}}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_msearch",
- "query": null,
- "body": [
- {},
- {
- "query": {
- "match": {
- "message": "this is a test"
- }
- }
- },
- {
- "index": "twitter2"
- },
- {
- "query": {
- "match_all": {}
- }
- }
- ],
- "params": {
- "index": "twitter"
- },
- "api": "msearch"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 282
- },
- "digest": "05af5eab63bf98d0078dfe661cd81124",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_msearch\n{}\n{\"query\" : {\"match_all\" : {}}, \"from\" : 0, \"size\" : 10}\n{}\n{\"query\" : {\"match_all\" : {}}}\n{\"index\" : \"twitter2\"}\n{\"query\" : {\"match_all\" : {}}}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_msearch",
- "query": null,
- "body": [
- {},
- {
- "query": {
- "match_all": {}
- },
- "from": 0,
- "size": 10
- },
- {},
- {
- "query": {
- "match_all": {}
- }
- },
- {
- "index": "twitter2"
- },
- {
- "query": {
- "match_all": {}
- }
- }
- ],
- "params": {
- "index": "twitter"
- },
- "api": "msearch"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 315
- },
- "digest": "a914be2ff7dd0cbdec0257f0ad50b625",
- "lang": "console",
- "found": [],
- "source": "GET _msearch/template\n{\"index\" : \"twitter\"}\n{ \"source\" : \"{ \\\"query\\\": { \\\"match\\\": { \\\"message\\\" : \\\"{{keywords}}\\\" } } } }\", \"params\": { \"query_type\": \"match\", \"keywords\": \"some message\" } }\n{\"index\" : \"twitter\"}\n{ \"source\" : \"{ \\\"query\\\": { \\\"match_{{template}}\\\": {} } }\", \"params\": { \"template\": \"all\" } }",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_msearch/template",
- "query": null,
- "body": [
- {
- "index": "twitter"
- },
- {
- "source": "{ \"query\": { \"match\": { \"message\" : \"{{keywords}}\" } } } }",
- "params": {
- "query_type": "match",
- "keywords": "some message"
- }
- },
- {
- "index": "twitter"
- },
- {
- "source": "{ \"query\": { \"match_{{template}}\": {} } }",
- "params": {
- "template": "all"
- }
- }
- ],
- "params": null,
- "api": "msearch_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 328
- },
- "digest": "28e66ff0ecdd71cb1426880115eab5dd",
- "lang": "console",
- "found": [],
- "source": "POST /_scripts/my_template_1\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/my_template_1",
- "query": null,
- "body": {
- "script": {
- "lang": "mustache",
- "source": {
- "query": {
- "match": {
- "message": "{{query_string}}"
- }
- }
- }
- }
- },
- "params": {
- "id": "my_template_1"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 347
- },
- "digest": "72e72cb3aa1b10b903d8cadcaddf7d10",
- "lang": "console",
- "found": [],
- "source": "POST /_scripts/my_template_2\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"term\": {\n \"{{field}}\": \"{{value}}\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/my_template_2",
- "query": null,
- "body": {
- "script": {
- "lang": "mustache",
- "source": {
- "query": {
- "term": {
- "{{field}}": "{{value}}"
- }
- }
- }
- }
- },
- "params": {
- "id": "my_template_2"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 367
- },
- "digest": "8b4c8f395c0a6f952a42051a0d357154",
- "lang": "console",
- "found": [],
- "source": "GET _msearch/template\n{\"index\" : \"main\"}\n{ \"id\": \"my_template_1\", \"params\": { \"query_string\": \"some message\" } }\n{\"index\" : \"main\"}\n{ \"id\": \"my_template_2\", \"params\": { \"field\": \"user\", \"value\": \"test\" } }",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_msearch/template",
- "query": null,
- "body": [
- {
- "index": "main"
- },
- {
- "id": "my_template_1",
- "params": {
- "query_string": "some message"
- }
- },
- {
- "index": "main"
- },
- {
- "id": "my_template_2",
- "params": {
- "field": "user",
- "value": "test"
- }
- }
- ],
- "params": null,
- "api": "msearch_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/count.asciidoc",
- "line": 7
- },
- "digest": "1b542e3ea87a742f95641d64dcfb1bdb",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_count?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_count",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "count"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/count.asciidoc",
- "line": 92
- },
- "digest": "8f0511f8a5cb176ff2afdd4311799a33",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_doc/1?refresh\n{\n \"user\": \"kimchy\"\n}\n\nGET /twitter/_count?q=user:kimchy\n\nGET /twitter/_count\n{\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "user": "kimchy"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/twitter/_count",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "count"
- },
- {
- "method": "GET",
- "url": "/twitter/_count",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "count"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/count.asciidoc",
- "line": 112
- },
- "digest": "ff7c62cdac9ce9ba27890ff93c28e805",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n }\n}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 7
- },
- "digest": "6bdf94c025faf346013a70e3473d5f87",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?q=user:foo",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "q": "user:foo"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 75
- },
- "digest": "a0a6e4abbf0a5d064d06d06ddc585f4c",
- "lang": "console",
- "found": [],
- "source": "PUT twitter/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"user\" : \"kimchy\", \"post_date\" : \"2009-11-15T14:12:12\", \"message\" : \"trying out Elasticsearch\"}\n{\"index\":{\"_id\":2}}\n{\"user\" : \"kimchi\", \"post_date\" : \"2009-11-15T14:12:13\", \"message\" : \"My username is similar to @kimchy!\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "user": "kimchi",
- "post_date": "2009-11-15T14:12:13",
- "message": "My username is similar to @kimchy!"
- }
- ],
- "params": {
- "index": "twitter"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 87
- },
- "digest": "6bdf94c025faf346013a70e3473d5f87",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?q=user:foo",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "q": "user:foo"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 96
- },
- "digest": "dde3105cdd6190eb8c8c392f5fcfcce5",
- "lang": "console-result",
- "found": [],
- "source": "{\"valid\":true,\"_shards\":{\"total\":1,\"successful\":1,\"failed\":0}}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 104
- },
- "digest": "1a0ce57a5e6d73765601de98a5d60d80",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query\n{\n \"query\" : {\n \"bool\" : {\n \"must\" : {\n \"query_string\" : {\n \"query\" : \"*:*\"\n }\n },\n \"filter\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "query_string": {
- "query": "*:*"
- }
- },
- "filter": {
- "term": {
- "user": "kimchy"
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 131
- },
- "digest": "9989c7860423519c7357936a73c2a5ce",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"post_date:foo\",\n \"lenient\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "post_date:foo",
- "lenient": false
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 145
- },
- "digest": "bda06f3e3031f6ef16990d18c6e261d7",
- "lang": "console-result",
- "found": [],
- "source": "{\"valid\":false,\"_shards\":{\"total\":1,\"successful\":1,\"failed\":0}}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 155
- },
- "digest": "b5cd0cc45db5f2fba30ac310630ad172",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?explain=true\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"post_date:foo\",\n \"lenient\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "explain": "true"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "post_date:foo",
- "lenient": false
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 172
- },
- "digest": "98f290a4192fd07d63b1d072fbe56cb9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"valid\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0\n },\n \"explanations\" : [ {\n \"index\" : \"twitter\",\n \"valid\" : false,\n \"error\" : \"twitter/IAEc2nIXSSunQA_suI0MLw] QueryShardException[failed to create query:...failed to parse date field [foo]\"\n } ]\n}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 196
- },
- "digest": "fd74d7518bab5f1dbc1fed588b9bc2a6",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?rewrite=true\n{\n \"query\": {\n \"more_like_this\": {\n \"like\": {\n \"_id\": \"2\"\n },\n \"boost_terms\": 1\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "rewrite": "true"
- },
- "body": {
- "query": {
- "more_like_this": {
- "like": {
- "_id": "2"
- },
- "boost_terms": 1
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 215
- },
- "digest": "d62feb691bcd5e6a52c5e3a845b6d613",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"valid\": true,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"explanations\": [\n {\n \"index\": \"twitter\",\n \"valid\": true,\n \"explanation\": \"((user:terminator^3.71334 plot:future^2.763601 plot:human^2.8415773 plot:sarah^3.4193945 plot:kyle^3.8244398 plot:cyborg^3.9177752 plot:connor^4.040236 plot:reese^4.7133346 ... )~6) -ConstantScore(_id:2)) #(ConstantScore(_type:_doc))^0.0\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 254
- },
- "digest": "d253135ac0a4b3b04531b1a5d2a19279",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?rewrite=true&all_shards=true\n{\n \"query\": {\n \"match\": {\n \"user\": {\n \"query\": \"kimchy\",\n \"fuzziness\": \"auto\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "rewrite": "true",
- "all_shards": "true"
- },
- "body": {
- "query": {
- "match": {
- "user": {
- "query": "kimchy",
- "fuzziness": "auto"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 272
- },
- "digest": "76f99d22c1a295f11ade1d073ef25da7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"valid\": true,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"explanations\": [\n {\n \"index\": \"twitter\",\n \"shard\": 0,\n \"valid\": true,\n \"explanation\": \"(user:kimchi)^0.8333333 user:kimchy\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "search/explain.asciidoc",
- "line": 8
- },
- "digest": "abfec22fbe7d571711cc65661ca887ee",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_explain/0\n{\n \"query\" : {\n \"match\" : { \"message\" : \"elasticsearch\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_explain/0",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/explain.asciidoc",
- "line": 89
- },
- "digest": "abfec22fbe7d571711cc65661ca887ee",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_explain/0\n{\n \"query\" : {\n \"match\" : { \"message\" : \"elasticsearch\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_explain/0",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/explain.asciidoc",
- "line": 103
- },
- "digest": "d7b94ea9b12e159f417deba419272791",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\":\"twitter\",\n \"_id\":\"0\",\n \"matched\":true,\n \"explanation\":{\n \"value\":1.6943598,\n \"description\":\"weight(message:elasticsearch in 0) [PerFieldSimilarity], result of:\",\n \"details\":[\n {\n \"value\":1.6943598,\n \"description\":\"score(freq=1.0), computed as boost * idf * tf from:\",\n \"details\":[\n {\n \"value\":2.2,\n \"description\":\"boost\",\n \"details\":[]\n },\n {\n \"value\":1.3862944,\n \"description\":\"idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\",\n \"details\":[\n {\n \"value\":1,\n \"description\":\"n, number of documents containing term\",\n \"details\":[]\n },\n {\n \"value\":5,\n \"description\":\"N, total number of documents with field\",\n \"details\":[]\n }\n ]\n },\n {\n \"value\":0.5555556,\n \"description\":\"tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:\",\n \"details\":[\n {\n \"value\":1.0,\n \"description\":\"freq, occurrences of term within document\",\n \"details\":[]\n },\n {\n \"value\":1.2,\n \"description\":\"k1, term saturation parameter\",\n \"details\":[]\n },\n {\n \"value\":0.75,\n \"description\":\"b, length normalization parameter\",\n \"details\":[]\n },\n {\n \"value\":3.0,\n \"description\":\"dl, length of field\",\n \"details\":[]\n },\n {\n \"value\":5.4,\n \"description\":\"avgdl, average length of field\",\n \"details\":[]\n }\n ]\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/explain.asciidoc",
- "line": 182
- },
- "digest": "5032518611d928d1f802e215cf79c550",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_explain/0?q=message:search",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_explain/0",
- "query": {
- "q": "message:search"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 32
- },
- "digest": "f6e300010478e5cbbeb2e589bc16fce7",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"profile\": true,<1>\n \"query\" : {\n \"match\" : { \"message\" : \"some number\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "profile": true,
- "query": {
- "match": {
- "message": "some number"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 50
- },
- "digest": "8ef02d4ca4e1c06fcd7d81ed52c8848d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 25,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 4,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.5093388,\n \"hits\": [...] <1>\n },\n \"profile\": {\n \"shards\": [\n {\n \"id\": \"[2aE02wS1R8q_QFnYu6vDVQ][twitter][0]\",\n \"searches\": [\n {\n \"query\": [\n {\n \"type\": \"BooleanQuery\",\n \"description\": \"message:some message:number\",\n \"time_in_nanos\": \"1873811\",\n \"breakdown\": {\n \"score\": 51306,\n \"score_count\": 4,\n \"build_scorer\": 2935582,\n \"build_scorer_count\": 1,\n \"match\": 0,\n \"match_count\": 0,\n \"create_weight\": 919297,\n \"create_weight_count\": 1,\n \"next_doc\": 53876,\n \"next_doc_count\": 5,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n },\n \"children\": [\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:some\",\n \"time_in_nanos\": \"391943\",\n \"breakdown\": {\n \"score\": 28776,\n \"score_count\": 4,\n \"build_scorer\": 784451,\n \"build_scorer_count\": 1,\n \"match\": 0,\n \"match_count\": 0,\n \"create_weight\": 1669564,\n \"create_weight_count\": 1,\n \"next_doc\": 10111,\n \"next_doc_count\": 5,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n }\n },\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:number\",\n \"time_in_nanos\": \"210682\",\n \"breakdown\": {\n \"score\": 4552,\n \"score_count\": 4,\n \"build_scorer\": 42602,\n \"build_scorer_count\": 1,\n \"match\": 0,\n \"match_count\": 0,\n \"create_weight\": 89323,\n \"create_weight_count\": 1,\n \"next_doc\": 2852,\n \"next_doc_count\": 5,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n }\n }\n ]\n }\n ],\n \"rewrite_time\": 51443,\n \"collector\": [\n {\n \"name\": \"SimpleTopScoreDocCollector\",\n \"reason\": \"search_top_hits\",\n \"time_in_nanos\": \"32273\"\n }\n ]\n }\n ],\n \"aggregations\": []\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 183
- },
- "digest": "0bc2dcf8d456b6f751f87ea2ac991bdb",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"profile\": {\n \"shards\": [\n {\n \"id\": \"[2aE02wS1R8q_QFnYu6vDVQ][twitter][0]\", <1>\n \"searches\": [\n {\n \"query\": [...], <2>\n \"rewrite_time\": 51443, <3>\n \"collector\": [...] <4>\n }\n ],\n \"aggregations\": [...] <5>\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 270
- },
- "digest": "b32f9ae3eabdac3c080746da78b17c07",
- "lang": "console-result",
- "found": [],
- "source": "\"query\": [\n {\n \"type\": \"BooleanQuery\",\n \"description\": \"message:some message:number\",\n \"time_in_nanos\": \"1873811\",\n \"breakdown\": {...}, <1>\n \"children\": [\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:some\",\n \"time_in_nanos\": \"391943\",\n \"breakdown\": {...}\n },\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:number\",\n \"time_in_nanos\": \"210682\",\n \"breakdown\": {...}\n }\n ]\n }\n]"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 324
- },
- "digest": "d6e15d48186be56cbf86a10b7e5b606e",
- "lang": "console-result",
- "found": [],
- "source": "\"breakdown\": {\n \"score\": 51306,\n \"score_count\": 4,\n \"build_scorer\": 2935582,\n \"build_scorer_count\": 1,\n \"match\": 0,\n \"match_count\": 0,\n \"create_weight\": 919297,\n \"create_weight_count\": 1,\n \"next_doc\": 53876,\n \"next_doc_count\": 5,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n}"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 438
- },
- "digest": "0d40216bed29737d0bf4bed3d211e14a",
- "lang": "console-result",
- "found": [],
- "source": "\"collector\": [\n {\n \"name\": \"SimpleTopScoreDocCollector\",\n \"reason\": \"search_top_hits\",\n \"time_in_nanos\": \"32273\"\n }\n]"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 533
- },
- "digest": "d8621790a416f05557c8df037a3722ac",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"profile\": true,\n \"query\": {\n \"term\": {\n \"user\": {\n \"value\": \"test\"\n }\n }\n },\n \"aggs\": {\n \"my_scoped_agg\": {\n \"terms\": {\n \"field\": \"likes\"\n }\n },\n \"my_global_agg\": {\n \"global\": {},\n \"aggs\": {\n \"my_level_agg\": {\n \"terms\": {\n \"field\": \"likes\"\n }\n }\n }\n }\n },\n \"post_filter\": {\n \"match\": {\n \"message\": \"some\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "profile": true,
- "query": {
- "term": {
- "user": {
- "value": "test"
- }
- }
- },
- "aggs": {
- "my_scoped_agg": {
- "terms": {
- "field": "likes"
- }
- },
- "my_global_agg": {
- "global": {},
- "aggs": {
- "my_level_agg": {
- "terms": {
- "field": "likes"
- }
- }
- }
- }
- },
- "post_filter": {
- "match": {
- "message": "some"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 582
- },
- "digest": "7eaffb4a19c19aa24533f76be06327b0",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"profile\": {\n \"shards\": [\n {\n \"id\": \"[P6-vulHtQRWuD4YnubWb7A][test][0]\",\n \"searches\": [\n {\n \"query\": [\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:some\",\n \"time_in_nanos\": \"409456\",\n \"breakdown\": {\n \"score\": 0,\n \"build_scorer_count\": 1,\n \"match_count\": 0,\n \"create_weight\": 31584,\n \"next_doc\": 0,\n \"match\": 0,\n \"create_weight_count\": 1,\n \"next_doc_count\": 2,\n \"score_count\": 1,\n \"build_scorer\": 377872,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n }\n },\n {\n \"type\": \"TermQuery\",\n \"description\": \"user:test\",\n \"time_in_nanos\": \"303702\",\n \"breakdown\": {\n \"score\": 0,\n \"build_scorer_count\": 1,\n \"match_count\": 0,\n \"create_weight\": 185215,\n \"next_doc\": 5936,\n \"match\": 0,\n \"create_weight_count\": 1,\n \"next_doc_count\": 2,\n \"score_count\": 1,\n \"build_scorer\": 112551,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n }\n }\n ],\n \"rewrite_time\": 7208,\n \"collector\": [\n {\n \"name\": \"MultiCollector\",\n \"reason\": \"search_multi\",\n \"time_in_nanos\": 1820,\n \"children\": [\n {\n \"name\": \"FilteredCollector\",\n \"reason\": \"search_post_filter\",\n \"time_in_nanos\": 7735,\n \"children\": [\n {\n \"name\": \"SimpleTopScoreDocCollector\",\n \"reason\": \"search_top_hits\",\n \"time_in_nanos\": 1328\n }\n ]\n },\n {\n \"name\": \"MultiBucketCollector: [[my_scoped_agg, my_global_agg]]\",\n \"reason\": \"aggregation\",\n \"time_in_nanos\": 8273\n }\n ]\n }\n ]\n }\n ],\n \"aggregations\": [...] <1>\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 736
- },
- "digest": "d8621790a416f05557c8df037a3722ac",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"profile\": true,\n \"query\": {\n \"term\": {\n \"user\": {\n \"value\": \"test\"\n }\n }\n },\n \"aggs\": {\n \"my_scoped_agg\": {\n \"terms\": {\n \"field\": \"likes\"\n }\n },\n \"my_global_agg\": {\n \"global\": {},\n \"aggs\": {\n \"my_level_agg\": {\n \"terms\": {\n \"field\": \"likes\"\n }\n }\n }\n }\n },\n \"post_filter\": {\n \"match\": {\n \"message\": \"some\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "profile": true,
- "query": {
- "term": {
- "user": {
- "value": "test"
- }
- }
- },
- "aggs": {
- "my_scoped_agg": {
- "terms": {
- "field": "likes"
- }
- },
- "my_global_agg": {
- "global": {},
- "aggs": {
- "my_level_agg": {
- "terms": {
- "field": "likes"
- }
- }
- }
- }
- },
- "post_filter": {
- "match": {
- "message": "some"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 778
- },
- "digest": "7d93d12c40644381df1c9a19839f6ff2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"profile\" : {\n \"shards\" : [\n {\n \"aggregations\" : [\n {\n \"type\" : \"LongTermsAggregator\",\n \"description\" : \"my_scoped_agg\",\n \"time_in_nanos\" : 195386,\n \"breakdown\" : {\n \"reduce\" : 0,\n \"build_aggregation\" : 81171,\n \"build_aggregation_count\" : 1,\n \"initialize\" : 22753,\n \"initialize_count\" : 1,\n \"reduce_count\" : 0,\n \"collect\" : 91456,\n \"collect_count\" : 4\n }\n },\n {\n \"type\" : \"GlobalAggregator\",\n \"description\" : \"my_global_agg\",\n \"time_in_nanos\" : 190430,\n \"breakdown\" : {\n \"reduce\" : 0,\n \"build_aggregation\" : 59990,\n \"build_aggregation_count\" : 1,\n \"initialize\" : 29619,\n \"initialize_count\" : 1,\n \"reduce_count\" : 0,\n \"collect\" : 100815,\n \"collect_count\" : 4\n },\n \"children\" : [\n {\n \"type\" : \"LongTermsAggregator\",\n \"description\" : \"my_level_agg\",\n \"time_in_nanos\" : 160329,\n \"breakdown\" : {\n \"reduce\" : 0,\n \"build_aggregation\" : 55712,\n \"build_aggregation_count\" : 1,\n \"initialize\" : 10559,\n \"initialize_count\" : 1,\n \"reduce_count\" : 0,\n \"collect\" : 94052,\n \"collect_count\" : 4\n }\n }\n ]\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 7
- },
- "digest": "38f7739f750f1411bccf511a0abaaea3",
- "lang": "console",
- "found": [],
- "source": "GET /_field_caps?fields=rating",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_field_caps",
- "query": {
- "fields": "rating"
- },
- "body": null,
- "params": null,
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 97
- },
- "digest": "614bd49400b6ebf47c5b12839dd1ecb8",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_field_caps?fields=rating",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_field_caps",
- "query": {
- "fields": "rating"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 107
- },
- "digest": "a985e6b7b2ead9c3f30a9bc97d8b598e",
- "lang": "console",
- "found": [],
- "source": "GET _field_caps?fields=rating,title",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_field_caps",
- "query": {
- "fields": "rating,title"
- },
- "body": null,
- "params": null,
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 114
- },
- "digest": "54f2c3b8888f8924a7ecb1f55e2d480a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": [\"index1\", \"index2\", \"index3\", \"index4\", \"index5\"],\n \"fields\": {\n \"rating\": { <1>\n \"long\": {\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [\"index1\", \"index2\"],\n \"non_aggregatable_indices\": [\"index1\"] <2>\n },\n \"keyword\": {\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [\"index3\", \"index4\"],\n \"non_searchable_indices\": [\"index4\"] <3>\n }\n },\n \"title\": { <4>\n \"text\": {\n \"searchable\": true,\n \"aggregatable\": false\n\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 155
- },
- "digest": "4e931cfac74e46e221cf4a9ab88a182d",
- "lang": "console",
- "found": [],
- "source": "GET _field_caps?fields=rating,title&include_unmapped",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_field_caps",
- "query": {
- "fields": "rating,title",
- "include_unmapped": true
- },
- "body": null,
- "params": null,
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 163
- },
- "digest": "21a1680f14093b44b20a674c3f4991a8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": [\"index1\", \"index2\", \"index3\"],\n \"fields\": {\n \"rating\": {\n \"long\": {\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [\"index1\", \"index2\"],\n \"non_aggregatable_indices\": [\"index1\"]\n },\n \"keyword\": {\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [\"index3\", \"index4\"],\n \"non_searchable_indices\": [\"index4\"]\n },\n \"unmapped\": { <1>\n \"indices\": [\"index5\"],\n \"searchable\": false,\n \"aggregatable\": false\n }\n },\n \"title\": {\n \"text\": {\n \"indices\": [\"index1\", \"index2\", \"index3\", \"index4\"],\n \"searchable\": true,\n \"aggregatable\": false\n },\n \"unmapped\": { <2>\n \"indices\": [\"index5\"]\n \"searchable\": false,\n \"aggregatable\": false\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/rank-eval.asciidoc",
- "line": 222
- },
- "digest": "2a989679e4b71569e17e02db8865b685",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {}}},\n \"ratings\": []\n }],\n \"metric\": {\n \"precision\": {\n \"k\" : 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_rank_eval",
- "query": null,
- "body": {
- "requests": [
- {
- "id": "JFK query",
- "request": {
- "query": {
- "match_all": {}
- }
- },
- "ratings": []
- }
- ],
- "metric": {
- "precision": {
- "k": 20,
- "relevant_rating_threshold": 1,
- "ignore_unlabeled": false
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "rank_eval"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/rank-eval.asciidoc",
- "line": 266
- },
- "digest": "351775a1f73e47025463bd937948f7b4",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {}}},\n \"ratings\": []\n }],\n \"metric\": {\n \"mean_reciprocal_rank\": {\n \"k\" : 20,\n \"relevant_rating_threshold\" : 1\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_rank_eval",
- "query": null,
- "body": {
- "requests": [
- {
- "id": "JFK query",
- "request": {
- "query": {
- "match_all": {}
- }
- },
- "ratings": []
- }
- ],
- "metric": {
- "mean_reciprocal_rank": {
- "k": 20,
- "relevant_rating_threshold": 1
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "rank_eval"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/rank-eval.asciidoc",
- "line": 310
- },
- "digest": "c4f013ff1a8b80c87c0265a91ed12648",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {}}},\n \"ratings\": []\n }],\n \"metric\": {\n \"dcg\": {\n \"k\" : 20,\n \"normalize\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_rank_eval",
- "query": null,
- "body": {
- "requests": [
- {
- "id": "JFK query",
- "request": {
- "query": {
- "match_all": {}
- }
- },
- "ratings": []
- }
- ],
- "metric": {
- "dcg": {
- "k": 20,
- "normalize": false
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "rank_eval"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/rank-eval.asciidoc",
- "line": 366
- },
- "digest": "12c4a9be9ffc26cdc0e9343d53c1fd5d",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {}}},\n \"ratings\": []\n }],\n \"metric\": {\n \"expected_reciprocal_rank\": {\n \"maximum_relevance\" : 3,\n \"k\" : 20\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_rank_eval",
- "query": null,
- "body": {
- "requests": [
- {
- "id": "JFK query",
- "request": {
- "query": {
- "match_all": {}
- }
- },
- "ratings": []
- }
- ],
- "metric": {
- "expected_reciprocal_rank": {
- "maximum_relevance": 3,
- "k": 20
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "rank_eval"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/authenticate.asciidoc",
- "line": 35
- },
- "digest": "55f4a15b84b724b9fbf2efd29a4da120",
- "lang": "console",
- "found": [],
- "source": "GET /_security/_authenticate",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/_authenticate",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.authenticate"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/authenticate.asciidoc",
- "line": 42
- },
- "digest": "693ee6047801b0a7dce3f2560baa1a13",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"username\": \"rdeniro\",\n \"roles\": [\n \"admin\"\n ],\n \"full_name\": null,\n \"email\": null,\n \"metadata\": { },\n \"enabled\": true,\n \"authentication_realm\": {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"lookup_realm\": {\n \"name\" : \"file\",\n \"type\" : \"file\"\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/change-password.asciidoc",
- "line": 55
- },
- "digest": "a2d14f8f1ea3efe970887f7892fdb268",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/jacknich/_password\n{\n \"password\" : \"s3cr3t\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/jacknich/_password",
- "query": null,
- "body": {
- "password": "s3cr3t"
- },
- "params": {
- "username": "jacknich"
- },
- "api": "security.change_password"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/change-password.asciidoc",
- "line": 66
- },
- "digest": "782a8820be17669905206e46d2c25178",
- "lang": "console-result",
- "found": [],
- "source": "{}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/clear-cache.asciidoc",
- "line": 48
- },
- "digest": "a5e2b3588258430f2e595abda98e3943",
- "lang": "console",
- "found": [],
- "source": "POST /_security/realm/default_file/_clear_cache",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/realm/default_file/_clear_cache",
- "query": null,
- "body": null,
- "params": {
- "realms": "default_file"
- },
- "api": "security.clear_cached_realms"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/clear-cache.asciidoc",
- "line": 55
- },
- "digest": "c1409f591a01589638d9b00436ce42c0",
- "lang": "console",
- "found": [],
- "source": "POST /_security/realm/default_file/_clear_cache?usernames=rdeniro,alpacino",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/realm/default_file/_clear_cache",
- "query": {
- "usernames": "rdeniro,alpacino"
- },
- "body": null,
- "params": {
- "realms": "default_file"
- },
- "api": "security.clear_cached_realms"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/clear-cache.asciidoc",
- "line": 63
- },
- "digest": "00272f75a6afea91f8554ef7cda0c1f2",
- "lang": "console",
- "found": [],
- "source": "POST /_security/realm/default_file,ldap1/_clear_cache",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/realm/default_file,ldap1/_clear_cache",
- "query": null,
- "body": null,
- "params": {
- "realms": "default_file,ldap1"
- },
- "api": "security.clear_cached_realms"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/clear-roles-cache.asciidoc",
- "line": 40
- },
- "digest": "ee577c4c7cc723e99569ea2d1137adba",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/my_admin_role/_clear_cache",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/my_admin_role/_clear_cache",
- "query": null,
- "body": null,
- "params": {
- "name": "my_admin_role"
- },
- "api": "security.clear_cached_roles"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-api-keys.asciidoc",
- "line": 70
- },
- "digest": "0c8f24166d0ce7b8792781b268b544a9",
- "lang": "console",
- "found": [],
- "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\", <1>\n \"role_descriptors\": { <2>\n \"role-a\": {\n \"cluster\": [\"all\"],\n \"index\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"index\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key",
- "expiration": "1d",
- "role_descriptors": {
- "role-a": {
- "cluster": [
- "all"
- ],
- "index": [
- {
- "names": [
- "index-a*"
- ],
- "privileges": [
- "read"
- ]
- }
- ]
- },
- "role-b": {
- "cluster": [
- "all"
- ],
- "index": [
- {
- "names": [
- "index-b*"
- ],
- "privileges": [
- "all"
- ]
- }
- ]
- }
- }
- },
- "params": null,
- "api": "security.create_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-api-keys.asciidoc",
- "line": 106
- },
- "digest": "761e883344dbbbd26bdb50d1b7de257c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\":\"VuaCfGcBCdbkQm-e5aOx\", <1>\n \"name\":\"my-api-key\",\n \"expiration\":1544068612110, <2>\n \"api_key\":\"ui2lp2axTNmsyakw9tvNnw\" <3>\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/put-app-privileges.asciidoc",
- "line": 88
- },
- "digest": "4ee31fd4ea6d18f32ec28b7fa433441d",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/privilege\n{\n \"myapp\": {\n \"read\": {\n \"actions\": [ <1>\n \"data:read/*\" , <2>\n \"action:login\" ],\n \"metadata\": { <3>\n \"description\": \"Read access to myapp\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/privilege",
- "query": null,
- "body": {
- "myapp": {
- "read": {
- "actions": [
- "data:read/*",
- "action:login"
- ],
- "metadata": {
- "description": "Read access to myapp"
- }
- }
- }
- },
- "params": null,
- "api": "security.put_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/put-app-privileges.asciidoc",
- "line": 114
- },
- "digest": "81a9dd74f26c4b89341cac7ebeb4c0e6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"myapp\": {\n \"read\": {\n \"created\": true <1>\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/put-app-privileges.asciidoc",
- "line": 130
- },
- "digest": "ee90d1fb22b59d30da339d825303b912",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/privilege\n{\n \"app01\": {\n \"read\": {\n \"actions\": [ \"action:login\", \"data:read/*\" ]\n },\n \"write\": {\n \"actions\": [ \"action:login\", \"data:write/*\" ]\n }\n },\n \"app02\": {\n \"all\": {\n \"actions\": [ \"*\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/privilege",
- "query": null,
- "body": {
- "app01": {
- "read": {
- "actions": [
- "action:login",
- "data:read/*"
- ]
- },
- "write": {
- "actions": [
- "action:login",
- "data:write/*"
- ]
- }
- },
- "app02": {
- "all": {
- "actions": [
- "*"
- ]
- }
- }
- },
- "params": null,
- "api": "security.put_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/put-app-privileges.asciidoc",
- "line": 153
- },
- "digest": "7269308683a9eb4ef6420e918391b791",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"app02\": {\n \"all\": {\n \"created\": true\n }\n },\n \"app01\": {\n \"read\": {\n \"created\": true\n },\n \"write\": {\n \"created\": true\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 112
- },
- "digest": "23b062c157235246d7c347b9047b2435",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping1\n{\n \"roles\": [ \"user\"],\n \"enabled\": true, <1>\n \"rules\": {\n \"field\" : { \"username\" : \"*\" }\n },\n \"metadata\" : { <2>\n \"version\" : 1\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping1",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "username": "*"
- }
- },
- "metadata": {
- "version": 1
- }
- },
- "params": {
- "name": "mapping1"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 133
- },
- "digest": "cf8cff0fb254f0e1009a01651b1526e9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"role_mapping\" : {\n \"created\" : true <1>\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 146
- },
- "digest": "b176e0d428726705298184ef39ad5cb2",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping2\n{\n \"roles\": [ \"user\", \"admin\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"username\" : [ \"esadmin01\", \"esadmin02\" ] }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping2",
- "query": null,
- "body": {
- "roles": [
- "user",
- "admin"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "username": [
- "esadmin01",
- "esadmin02"
- ]
- }
- }
- },
- "params": {
- "name": "mapping2"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 159
- },
- "digest": "e60b7f75ca806f2c74927c3d9409a986",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping3\n{\n \"roles\": [ \"ldap-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"realm.name\" : \"ldap1\" }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping3",
- "query": null,
- "body": {
- "roles": [
- "ldap-user"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "realm.name": "ldap1"
- }
- }
- },
- "params": {
- "name": "mapping3"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 174
- },
- "digest": "7a23a385a63c87cab58fd494870450fd",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping4\n{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"any\": [\n {\n \"field\": {\n \"username\": \"esadmin\"\n }\n },\n {\n \"field\": {\n \"groups\": \"cn=admins,dc=example,dc=com\"\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping4",
- "query": null,
- "body": {
- "roles": [
- "superuser"
- ],
- "enabled": true,
- "rules": {
- "any": [
- {
- "field": {
- "username": "esadmin"
- }
- },
- {
- "field": {
- "groups": "cn=admins,dc=example,dc=com"
- }
- }
- ]
- }
- },
- "params": {
- "name": "mapping4"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 216
- },
- "digest": "5ad365ed9e1a3c26093a0f09666c133a",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping5\n{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, <1>\n \"format\" : \"json\" <2>\n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping5",
- "query": null,
- "body": {
- "role_templates": [
- {
- "template": {
- "source": "{{#tojson}}groups{{/tojson}}"
- },
- "format": "json"
- }
- ],
- "rules": {
- "field": {
- "realm.name": "saml1"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "mapping5"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 239
- },
- "digest": "7e5faa551f2c95ffd627da352563d450",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping6\n{\n \"roles\": [ \"example-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"dn\" : \"*,ou=subtree,dc=example,dc=com\" }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping6",
- "query": null,
- "body": {
- "roles": [
- "example-user"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "dn": "*,ou=subtree,dc=example,dc=com"
- }
- }
- },
- "params": {
- "name": "mapping6"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 254
- },
- "digest": "b80e1f5b26bae4f3c2f8a604b7caaf17",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping7\n{\n \"roles\": [ \"ldap-example-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n { \"field\" : { \"dn\" : \"*,ou=subtree,dc=example,dc=com\" } },\n { \"field\" : { \"realm.name\" : \"ldap1\" } }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping7",
- "query": null,
- "body": {
- "roles": [
- "ldap-example-user"
- ],
- "enabled": true,
- "rules": {
- "all": [
- {
- "field": {
- "dn": "*,ou=subtree,dc=example,dc=com"
- }
- },
- {
- "field": {
- "realm.name": "ldap1"
- }
- }
- ]
- }
- },
- "params": {
- "name": "mapping7"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 278
- },
- "digest": "0d94d76b7f00d0459d1f8c962c144dcd",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping8\n{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n {\n \"any\": [\n {\n \"field\": {\n \"dn\": \"*,ou=admin,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"username\": [ \"es-admin\", \"es-system\" ]\n }\n }\n ]\n },\n {\n \"field\": {\n \"groups\": \"cn=people,dc=example,dc=com\"\n }\n },\n {\n \"except\": {\n \"field\": {\n \"metadata.terminated_date\": null\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping8",
- "query": null,
- "body": {
- "roles": [
- "superuser"
- ],
- "enabled": true,
- "rules": {
- "all": [
- {
- "any": [
- {
- "field": {
- "dn": "*,ou=admin,dc=example,dc=com"
- }
- },
- {
- "field": {
- "username": [
- "es-admin",
- "es-system"
- ]
- }
- }
- ]
- },
- {
- "field": {
- "groups": "cn=people,dc=example,dc=com"
- }
- },
- {
- "except": {
- "field": {
- "metadata.terminated_date": null
- }
- }
- }
- ]
- }
- },
- "params": {
- "name": "mapping8"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 328
- },
- "digest": "50dc35d3d8705bd62aed20a15209476c",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping9\n{\n \"rules\": { \"field\": { \"realm.name\": \"cloud-saml\" } },\n \"role_templates\": [\n { \"template\": { \"source\" : \"saml_user\" } }, <1>\n { \"template\": { \"source\" : \"_user_{{username}}\" } }\n ],\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping9",
- "query": null,
- "body": {
- "rules": {
- "field": {
- "realm.name": "cloud-saml"
- }
- },
- "role_templates": [
- {
- "template": {
- "source": "saml_user"
- }
- },
- {
- "template": {
- "source": "_user_{{username}}"
- }
- }
- ],
- "enabled": true
- },
- "params": {
- "name": "mapping9"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-roles.asciidoc",
- "line": 85
- },
- "digest": "850a6d4aaf112ec1279260a2b7400a89",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/my_admin_role\n{\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [ \"index1\", \"index2\" ],\n \"privileges\": [\"all\"],\n \"field_security\" : { // optional\n \"grant\" : [ \"title\", \"body\" ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\" // optional\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [ \"admin\", \"read\" ],\n \"resources\": [ \"*\" ]\n }\n ],\n \"run_as\": [ \"other_user\" ], // optional\n \"metadata\" : { // optional\n \"version\" : 1\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/my_admin_role",
- "query": null,
- "body": {
- "cluster": [
- "all"
- ],
- "indices": [
- {
- "names": [
- "index1",
- "index2"
- ],
- "privileges": [
- "all"
- ],
- "field_security": {
- "grant": [
- "title",
- "body"
- ]
- },
- "query": "{\"match\": {\"title\": \"foo\"}}"
- }
- ],
- "applications": [
- {
- "application": "myapp",
- "privileges": [
- "admin",
- "read"
- ],
- "resources": [
- "*"
- ]
- }
- ],
- "run_as": [
- "other_user"
- ],
- "metadata": {
- "version": 1
- }
- },
- "params": {
- "name": "my_admin_role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-roles.asciidoc",
- "line": 117
- },
- "digest": "99fbe9dc648835eb750e963f3b5ea9ab",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"role\": {\n \"created\": true <1>\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-users.asciidoc",
- "line": 108
- },
- "digest": "4c514b787945952a223cde8a4a09e826",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/jacknich\n{\n \"password\" : \"j@rV1s\",\n \"roles\" : [ \"admin\", \"other_role1\" ],\n \"full_name\" : \"Jack Nicholson\",\n \"email\" : \"jacknich@example.com\",\n \"metadata\" : {\n \"intelligence\" : 7\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/jacknich",
- "query": null,
- "body": {
- "password": "j@rV1s",
- "roles": [
- "admin",
- "other_role1"
- ],
- "full_name": "Jack Nicholson",
- "email": "jacknich@example.com",
- "metadata": {
- "intelligence": 7
- }
- },
- "params": {
- "username": "jacknich"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-users.asciidoc",
- "line": 125
- },
- "digest": "2f6cf7203c981928aa739a504f3589b1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"created\": true <1>\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delegate-pki-authentication.asciidoc",
- "line": 77
- },
- "digest": "964f522091306634794ff544c867f002",
- "lang": "console",
- "found": [],
- "source": "POST /_security/delegate_pki\n{\n \"x509_certificate_chain\": [\"MIIDbTCCAlWgAwIBAgIJAIxTS7Qdho9jMA0GCSqGSIb3DQEBCwUAMFMxKzApBgNVBAMTIkVsYXN0aWNzZWFyY2ggVGVzdCBJbnRlcm1lZGlhdGUgQ0ExFjAUBgNVBAsTDUVsYXN0aWNzZWFyY2gxDDAKBgNVBAoTA29yZzAeFw0xOTA3MTkxMzMzNDFaFw0yMzA3MTgxMzMzNDFaMEoxIjAgBgNVBAMTGUVsYXN0aWNzZWFyY2ggVGVzdCBDbGllbnQxFjAUBgNVBAsTDUVsYXN0aWNzZWFyY2gxDDAKBgNVBAoTA29yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANHgMX2aX8t0nj4sGLNuKISmmXIYCj9RwRqS7L03l9Nng7kOKnhHu/nXDt7zMRJyHj+q6FAt5khlavYSVCQyrDybRuA5z31gOdqXerrjs2OXS5HSHNvoDAnHFsaYX/5geMewVTtc/vqpd7Ph/QtaKfmG2FK0JNQo0k24tcgCIcyMtBh6BA70yGBM0OT8GdOgd/d/mA7mRhaxIUMNYQzRYRsp4hMnnWoOTkR5Q8KSO3MKw9dPSpPe8EnwtJE10S3s5aXmgytru/xQqrFycPBNj4KbKVmqMP0G60CzXik5pr2LNvOFz3Qb6sYJtqeZF+JKgGWdaTC89m63+TEnUHqk0lcCAwEAAaNNMEswCQYDVR0TBAIwADAdBgNVHQ4EFgQU/+aAD6Q4mFq1vpHorC25/OY5zjcwHwYDVR0jBBgwFoAU8siFCiMiYZZm/95qFC75AG/LRE0wDQYJKoZIhvcNAQELBQADggEBAIRpCgDLpvXcgDHUk10uhxev21mlIbU+VP46ANnCuj0UELhTrdTuWvO1PAI4z+WbDUxryQfOOXO9R6D0dE5yR56L/J7d+KayW34zU7yRDZM7+rXpocdQ1Ex8mjP9HJ/Bf56YZTBQJpXeDrKow4FvtkI3bcIMkqmbG16LHQXeG3RS4ds4S4wCnE2nA6vIn9y+4R999q6y1VSBORrYULcDWxS54plHLEdiMr1vVallg82AGobS9GMcTL2U4Nx5IYZG7sbTk3LrDxVpVg/S2wLofEdOEwqCeHug/iOihNLJBabEW6z4TDLJAVW5KCY1DfhkYlBfHn7vxKkfKoCUK/yLWWI=\"] <1>\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delegate-pki-authentication.asciidoc",
- "line": 88
- },
- "digest": "da2bb6894d95489812b653be2feeeb5b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-app-privileges.asciidoc",
- "line": 41
- },
- "digest": "ebd76a45e153c4656c5871e23b7b5508",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/privilege/myapp/read",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/privilege/myapp/read",
- "query": null,
- "body": null,
- "params": {
- "application": "myapp",
- "name": "read"
- },
- "api": "security.delete_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-app-privileges.asciidoc",
- "line": 50
- },
- "digest": "b8ac8a2f22ee5934b077a82245fa3398",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"myapp\": {\n \"read\": {\n \"found\" : true\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-role-mappings.asciidoc",
- "line": 46
- },
- "digest": "261480571394632db40e88fbb6c59c2f",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/role_mapping/mapping1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/role_mapping/mapping1",
- "query": null,
- "body": null,
- "params": {
- "name": "mapping1"
- },
- "api": "security.delete_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-role-mappings.asciidoc",
- "line": 55
- },
- "digest": "5b5daa97b53b478943b50082703a323a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\" : true\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-roles.asciidoc",
- "line": 40
- },
- "digest": "cffce059425d3d21e7f9571500d63524",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/role/my_admin_role",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/role/my_admin_role",
- "query": null,
- "body": null,
- "params": {
- "name": "my_admin_role"
- },
- "api": "security.delete_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-roles.asciidoc",
- "line": 49
- },
- "digest": "5b5daa97b53b478943b50082703a323a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\" : true\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-users.asciidoc",
- "line": 39
- },
- "digest": "ffd63dd186ab81b893faec3b3358fa09",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/user/jacknich",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/user/jacknich",
- "query": null,
- "body": null,
- "params": {
- "username": "jacknich"
- },
- "api": "security.delete_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-users.asciidoc",
- "line": 48
- },
- "digest": "5b5daa97b53b478943b50082703a323a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\" : true\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/disable-users.asciidoc",
- "line": 45
- },
- "digest": "bb293e1bdf0c6f6d9069eeb7edc9d399",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/user/jacknich/_disable",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/user/jacknich/_disable",
- "query": null,
- "body": null,
- "params": {
- "username": "jacknich"
- },
- "api": "security.disable_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/enable-users.asciidoc",
- "line": 44
- },
- "digest": "adf36e2d8fc05c3719c91912481c4e19",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/user/jacknich/_enable",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/user/jacknich/_enable",
- "query": null,
- "body": null,
- "params": {
- "username": "jacknich"
- },
- "api": "security.enable_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 65
- },
- "digest": "8d3be5482270921111754772479f8676",
- "lang": "console",
- "found": [],
- "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key\",\n \"role_descriptors\": {}\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key",
- "role_descriptors": {}
- },
- "params": null,
- "api": "security.create_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 77
- },
- "digest": "30c7faeb8f339772d309800170df9f92",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\":\"VuaCfGcBCdbkQm-e5aOx\",\n \"name\":\"my-api-key\",\n \"api_key\":\"ui2lp2axTNmsyakw9tvNnw\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 90
- },
- "digest": "701f1fffc65e9e51c96aa60261e2eae3",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?id=VuaCfGcBCdbkQm-e5aOx",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "id": "VuaCfGcBCdbkQm-e5aOx"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 99
- },
- "digest": "7b864d61767ab283cfd5f9b9ba784b1f",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?name=my-api-key",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "name": "my-api-key"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 107
- },
- "digest": "10d9da8a3b7061479be908c8c5c76cfb",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?realm_name=native1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "realm_name": "native1"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 115
- },
- "digest": "62eafc5b3ab75cc67314d5a8567d6077",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?username=myuser",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "username": "myuser"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 123
- },
- "digest": "9608820dbeac261ba53fb89bb9400560",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?owner=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "owner": "true"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 130
- },
- "digest": "ca5ae0eb7709f3807bc6239cd4bd9141",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 138
- },
- "digest": "fffaa7ecef94e1404ebec2f9069448e3",
- "lang": "console",
- "found": [],
- "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key-1\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key-1"
- },
- "params": null,
- "api": "security.create_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 149
- },
- "digest": "dffbbdc4025e5777c647d8818847b960",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?id=VuaCfGcBCdbkQm-e5aOx&owner=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "id": "VuaCfGcBCdbkQm-e5aOx",
- "owner": "true"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 159
- },
- "digest": "30abc76a39e551f4b52c65002bb6405d",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?username=myuser&realm_name=native1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "username": "myuser",
- "realm_name": "native1"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-app-privileges.asciidoc",
- "line": 58
- },
- "digest": "cd8006165ac64f1ef99af48e5a35a25b",
- "lang": "console",
- "found": [],
- "source": "GET /_security/privilege/myapp/read",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/privilege/myapp/read",
- "query": null,
- "body": null,
- "params": {
- "application": "myapp",
- "name": "read"
- },
- "api": "security.get_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-app-privileges.asciidoc",
- "line": 67
- },
- "digest": "86e449e6a7c3d64f0965b316b9780fad",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"myapp\": {\n \"read\": {\n \"application\": \"myapp\",\n \"name\": \"read\",\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-app-privileges.asciidoc",
- "line": 88
- },
- "digest": "3b18e9de638ff0b1c7a1f1f6bf1c24f3",
- "lang": "console",
- "found": [],
- "source": "GET /_security/privilege/myapp/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/privilege/myapp/",
- "query": null,
- "body": null,
- "params": {
- "application": "myapp"
- },
- "api": "security.get_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-app-privileges.asciidoc",
- "line": 95
- },
- "digest": "0ddf705317d9c5095b4a1419a2e3bace",
- "lang": "console",
- "found": [],
- "source": "GET /_security/privilege/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/privilege/",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-builtin-privileges.asciidoc",
- "line": 54
- },
- "digest": "2623eb122cc0299b42fc9eca6e7f5e56",
- "lang": "console",
- "found": [],
- "source": "GET /_security/privilege/_builtin",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/privilege/_builtin",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_builtin_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-builtin-privileges.asciidoc",
- "line": 61
- },
- "digest": "10b0450f9d5abbf3295817ad2759de47",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"cluster\" : [\n \"all\",\n \"create_snapshot\",\n \"delegate_pki\",\n \"manage\",\n \"manage_api_key\",\n \"manage_autoscaling\",\n \"manage_ccr\",\n \"manage_data_frame_transforms\",\n \"manage_enrich\",\n \"manage_ilm\",\n \"manage_index_templates\",\n \"manage_ingest_pipelines\",\n \"manage_ml\",\n \"manage_oidc\",\n \"manage_own_api_key\",\n \"manage_pipeline\",\n \"manage_rollup\",\n \"manage_saml\",\n \"manage_security\",\n \"manage_slm\",\n \"manage_token\",\n \"manage_transform\",\n \"manage_watcher\",\n \"monitor\",\n \"monitor_data_frame_transforms\",\n \"monitor_ml\",\n \"monitor_rollup\",\n \"monitor_snapshot\",\n \"monitor_transform\",\n \"monitor_watcher\",\n \"none\",\n \"read_ccr\",\n \"read_ilm\",\n \"read_slm\",\n \"transport_client\"\n ],\n \"index\" : [\n \"all\",\n \"create\",\n \"create_doc\",\n \"create_index\",\n \"delete\",\n \"delete_index\",\n \"index\",\n \"maintenance\",\n \"manage\",\n \"manage_follow_index\",\n \"manage_ilm\",\n \"manage_leader_index\",\n \"monitor\",\n \"none\",\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\",\n \"write\"\n ]\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-role-mappings.asciidoc",
- "line": 64
- },
- "digest": "8b3a94495127efd9d56b2cd7f3eecdca",
- "lang": "console",
- "found": [],
- "source": "GET /_security/role_mapping/mapping1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/role_mapping/mapping1",
- "query": null,
- "body": null,
- "params": {
- "name": "mapping1"
- },
- "api": "security.get_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-role-mappings.asciidoc",
- "line": 71
- },
- "digest": "5658fa03086f1969f2e1fbc0215eed77",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"mapping1\": {\n \"enabled\": true,\n \"roles\": [\n \"user\"\n ],\n \"rules\": {\n \"field\": {\n \"username\": \"*\"\n }\n },\n \"metadata\": {}\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-roles.asciidoc",
- "line": 56
- },
- "digest": "115529722ba30b0b0d51a7ff87e59198",
- "lang": "console",
- "found": [],
- "source": "GET /_security/role/my_admin_role",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/role/my_admin_role",
- "query": null,
- "body": null,
- "params": {
- "name": "my_admin_role"
- },
- "api": "security.get_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-roles.asciidoc",
- "line": 62
- },
- "digest": "ee90e8a3645501f252777737b7466061",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_admin_role\": {\n \"cluster\" : [ \"all\" ],\n \"indices\" : [\n {\n \"names\" : [ \"index1\", \"index2\" ],\n \"privileges\" : [ \"all\" ],\n \"allow_restricted_indices\" : false,\n \"field_security\" : {\n \"grant\" : [ \"title\", \"body\" ]}\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ \"other_user\" ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-roles.asciidoc",
- "line": 90
- },
- "digest": "128283698535116931dca9d16a16dca2",
- "lang": "console",
- "found": [],
- "source": "GET /_security/role",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/role",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 111
- },
- "digest": "cee591c1fc70d4f180c623a3a6d07755",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\" : \"client_credentials\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "client_credentials"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 122
- },
- "digest": "da2bb6894d95489812b653be2feeeb5b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 146
- },
- "digest": "e1337c6b76defd5a46d05220f9d9c9fc",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\" : \"password\",\n \"username\" : \"test_admin\",\n \"password\" : \"x-pack-test-password\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "password",
- "username": "test_admin",
- "password": "x-pack-test-password"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 159
- },
- "digest": "774740abbecda50b03d75dbff8cbe60f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 176
- },
- "digest": "1873f8a8a291e6fcd6c1c83ea6928759",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\": \"refresh_token\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "refresh_token",
- "refresh_token": "vLBPvmAB6KvwvJZr27cS"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 190
- },
- "digest": "774740abbecda50b03d75dbff8cbe60f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-users.asciidoc",
- "line": 56
- },
- "digest": "3924ee252581ebb96ac0e60046125ae8",
- "lang": "console",
- "found": [],
- "source": "GET /_security/user/jacknich",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/user/jacknich",
- "query": null,
- "body": null,
- "params": {
- "username": "jacknich"
- },
- "api": "security.get_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-users.asciidoc",
- "line": 62
- },
- "digest": "bac6203259754d2f09c1ebeecc9ded5d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"jacknich\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": { \"intelligence\" : 7 },\n \"enabled\": true\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-users.asciidoc",
- "line": 80
- },
- "digest": "abdbc81e799e28c833556b1c29f03ba6",
- "lang": "console",
- "found": [],
- "source": "GET /_security/user",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/user",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/has-privileges.asciidoc",
- "line": 68
- },
- "digest": "9684e5fa8c22a07a372feb6fc1f5f7c0",
- "lang": "console",
- "found": [],
- "source": "GET /_security/user/_has_privileges\n{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/user/_has_privileges",
- "query": null,
- "body": {
- "cluster": [
- "monitor",
- "manage"
- ],
- "index": [
- {
- "names": [
- "suppliers",
- "products"
- ],
- "privileges": [
- "read"
- ]
- },
- {
- "names": [
- "inventory"
- ],
- "privileges": [
- "read",
- "write"
- ]
- }
- ],
- "application": [
- {
- "application": "inventory_manager",
- "privileges": [
- "read",
- "data:write/inventory"
- ],
- "resources": [
- "product/1852563"
- ]
- }
- ]
- },
- "params": null,
- "api": "security.has_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/has-privileges.asciidoc",
- "line": 95
- },
- "digest": "099336bd3e681efc691078a0300781a5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"username\": \"rdeniro\",\n \"has_all_requested\" : false,\n \"cluster\" : {\n \"monitor\" : true,\n \"manage\" : false\n },\n \"index\" : {\n \"suppliers\" : {\n \"read\" : true\n },\n \"products\" : {\n \"read\" : true\n },\n \"inventory\" : {\n \"read\" : true,\n \"write\" : false\n }\n },\n \"application\" : {\n \"inventory_manager\" : {\n \"product/1852563\" : {\n \"read\": false,\n \"data:write/inventory\": false\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 72
- },
- "digest": "0aff04881be21eea45375ec4f4f50e66",
- "lang": "console",
- "found": [],
- "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key"
- },
- "params": null,
- "api": "security.create_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 83
- },
- "digest": "30c7faeb8f339772d309800170df9f92",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\":\"VuaCfGcBCdbkQm-e5aOx\",\n \"name\":\"my-api-key\",\n \"api_key\":\"ui2lp2axTNmsyakw9tvNnw\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 97
- },
- "digest": "01cc9dac719f2612a48cc1b23db7cd54",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"id\" : \"VuaCfGcBCdbkQm-e5aOx\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "id": "VuaCfGcBCdbkQm-e5aOx"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 110
- },
- "digest": "f388e571224dd6850f8c9f9f08fca3da",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"name\" : \"my-api-key\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 121
- },
- "digest": "dde283eab92608e7bfbfa09c6482a12e",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"realm_name\" : \"native1\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "realm_name": "native1"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 132
- },
- "digest": "e7d819634d765cde269e2669e2dc677f",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"username\" : \"myuser\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "username": "myuser"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 143
- },
- "digest": "0ad8aa0d684b09500aa30b4c4d6f29c8",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"id\" : \"VuaCfGcBCdbkQm-e5aOx\",\n \"owner\" : \"true\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "id": "VuaCfGcBCdbkQm-e5aOx",
- "owner": "true"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 155
- },
- "digest": "cfad3631be0634ee49c424f9ccec62d9",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"owner\" : \"true\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "owner": "true"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 166
- },
- "digest": "6c927313867647e0ef3cd3a37cb410cc",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"username\" : \"myuser\",\n \"realm_name\" : \"native1\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "username": "myuser",
- "realm_name": "native1"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 72
- },
- "digest": "cee591c1fc70d4f180c623a3a6d07755",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\" : \"client_credentials\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "client_credentials"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 82
- },
- "digest": "da2bb6894d95489812b653be2feeeb5b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 95
- },
- "digest": "dbf9abc37899352751dab0ede62af2fd",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "token": "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ=="
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 108
- },
- "digest": "e1337c6b76defd5a46d05220f9d9c9fc",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\" : \"password\",\n \"username\" : \"test_admin\",\n \"password\" : \"x-pack-test-password\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "password",
- "username": "test_admin",
- "password": "x-pack-test-password"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 120
- },
- "digest": "774740abbecda50b03d75dbff8cbe60f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 135
- },
- "digest": "0c6f9c9da75293fae69659ac1d6329de",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"refresh_token\" : \"vLBPvmAB6KvwvJZr27cS\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "refresh_token": "vLBPvmAB6KvwvJZr27cS"
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 148
- },
- "digest": "4bc4db44b8c74610b73f21a421099a13",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"realm_name\" : \"saml1\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "realm_name": "saml1"
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 159
- },
- "digest": "0280247e0cf2e561c548f22c9fb31163",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"username\" : \"myuser\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "username": "myuser"
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 170
- },
- "digest": "6dd2a107bc64fd6f058fb17c21640649",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"username\" : \"myuser\",\n \"realm_name\" : \"saml1\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "username": "myuser",
- "realm_name": "saml1"
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 69
- },
- "digest": "e3019fd5f23458ae49ad9854c97d321c",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/prepare\n{\n \"realm\" : \"oidc1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 80
- },
- "digest": "7177f0f96dc5fbcf6c707a964707327f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"redirect\" : \"http://127.0.0.1:8080/c2id-login?scope=openid&response_type=id_token&redirect_uri=https%3A%2F%2Fmy.fantastic.rp%2Fcb&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I&nonce=WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM&client_id=elasticsearch-rp\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 95
- },
- "digest": "57dc15e5ad663c342fd5c1d86fcd1b29",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/prepare\n{\n \"realm\" : \"oidc1\",\n \"state\" : \"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n \"nonce\" : \"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 108
- },
- "digest": "99f7cf54f4e1ea0929678f876202bacc",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"redirect\" : \"http://127.0.0.1:8080/c2id-login?scope=openid&response_type=id_token&redirect_uri=https%3A%2F%2Fmy.fantastic.rp%2Fcb&state=lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO&nonce=zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5&client_id=elasticsearch-rp\",\n \"state\" : \"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n \"nonce\" : \"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 121
- },
- "digest": "d35c8cf7a98b3f112e1de8797ec6689d",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/prepare\n{\n \"iss\" : \"http://127.0.0.1:8080\",\n \"login_hint\": \"this_is_an_opaque_string\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 133
- },
- "digest": "50153ed0f17ea3c4d2392d1ae80a438a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"redirect\" : \"http://127.0.0.1:8080/c2id-login?login_hint=this_is_an_opaque_string&scope=openid&response_type=id_token&redirect_uri=https%3A%2F%2Fmy.fantastic.rp%2Fcb&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I&nonce=WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM&client_id=elasticsearch-rp\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-authenticate-api.asciidoc",
- "line": 65
- },
- "digest": "9e5d5a6c9adcba75b906e81c1496bd01",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/authenticate\n{\n \"redirect_uri\" : \"https://oidc-kibana.elastic.co:5603/api/security/v1/oidc?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" : \"oidc1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-logout-api.asciidoc",
- "line": 44
- },
- "digest": "2a1eece9a59ac1773edcf0a932c26de0",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/logout\n{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-prepare-authentication-api.asciidoc",
- "line": 70
- },
- "digest": "a5dfcfd1cfb3558e7912456669c92eee",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/prepare\n{\n \"realm\" : \"saml1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-prepare-authentication-api.asciidoc",
- "line": 81
- },
- "digest": "da3f280bc65b581fb3097be768061bee",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/prepare\n{\n \"acs\" : \"https://kibana.org/api/security/saml/callback\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-authenticate-api.asciidoc",
- "line": 79
- },
- "digest": "8e208098a0156c4c92afe0a06960b230",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/authenticate\n{\n \"content\" : \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" : [\"4fee3b046395c4e751011e97f8900b5273d56685\"]\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-logout-api.asciidoc",
- "line": 62
- },
- "digest": "8d4dda5d988d568f4f4210a6387e026f",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/logout\n{\n \"token\" : \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\" : \"mJdXLtmvTUSpoLwMvdBt_w\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-invalidate-api.asciidoc",
- "line": 74
- },
- "digest": "49718ad4ff0ae0468c44a7aa35aeee69",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/invalidate\n{\n \"queryString\" : \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\" : \"saml1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/ssl.asciidoc",
- "line": 84
- },
- "digest": "05f6049c677a156bdf9b83e71a3b87ed",
- "lang": "console",
- "found": [],
- "source": "GET /_ssl/certificates",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ssl/certificates",
- "query": null,
- "body": null,
- "params": null,
- "api": "ssl.certificates"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-put.asciidoc",
- "line": 151
- },
- "digest": "aa7cf5df36b867aee5e3314ac4b4fa68",
- "lang": "console",
- "found": [],
- "source": "PUT /_slm/policy/daily-snapshots\n{\n \"schedule\": \"0 30 1 * * ?\", <1>\n \"name\": \"\", <2>\n \"repository\": \"my_repository\", <3>\n \"config\": { <4>\n \"indices\": [\"data-*\", \"important\"], <5>\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": { <6>\n \"expire_after\": \"30d\", <7>\n \"min_count\": 5, <8>\n \"max_count\": 50 <9>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_slm/policy/daily-snapshots",
- "query": null,
- "body": {
- "schedule": "0 30 1 * * ?",
- "name": "",
- "repository": "my_repository",
- "config": {
- "indices": [
- "data-*",
- "important"
- ],
- "ignore_unavailable": false,
- "include_global_state": false
- },
- "retention": {
- "expire_after": "30d",
- "min_count": 5,
- "max_count": 50
- }
- },
- "params": {
- "policy_id": "daily-snapshots"
- },
- "api": "slm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get.asciidoc",
- "line": 72
- },
- "digest": "b4f9fe8808cb27a210b162e7aaba261d",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/policy/daily-snapshots?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/policy/daily-snapshots",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "policy_id": "daily-snapshots"
- },
- "api": "slm.get_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get.asciidoc",
- "line": 80
- },
- "digest": "42757e819c51fc2fb12932b05a18fd98",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"daily-snapshots\" : {\n \"version\": 1, <1>\n \"modified_date\": \"2019-04-23T01:30:00.000Z\", <2>\n \"modified_date_millis\": 1556048137314,\n \"policy\" : {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n },\n \"stats\": {\n \"policy\": \"daily-snapshots\",\n \"snapshots_taken\": 0,\n \"snapshots_failed\": 0,\n \"snapshots_deleted\": 0,\n \"snapshot_deletion_failures\": 0\n },\n \"next_execution\": \"2019-04-24T01:30:00.000Z\", <3>\n \"next_execution_millis\": 1556048160000\n }\n}"
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get.asciidoc",
- "line": 123
- },
- "digest": "bc2dd9e5ed37f98016ecf53f968d2211",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/policy",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.get_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-delete.asciidoc",
- "line": 66
- },
- "digest": "1a1f3421717ff744ed83232729289bb0",
- "lang": "console",
- "found": [],
- "source": "DELETE /_slm/policy/daily-snapshots",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_slm/policy/daily-snapshots",
- "query": null,
- "body": null,
- "params": {
- "policy_id": "daily-snapshots"
- },
- "api": "slm.delete_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-execute.asciidoc",
- "line": 45
- },
- "digest": "0ab002c6618af75e1041a23c692327ad",
- "lang": "console",
- "found": [],
- "source": "POST /_slm/policy/daily-snapshots/_execute",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "slm/apis/slm-execute.asciidoc",
- "line": 53
- },
- "digest": "80e9cf8fc73f6f5c65db578752235391",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"snapshot_name\": \"daily-snap-2019.04.24-gwrqoo2xtea3q57vvg0uea\"\n}"
- },
- {
- "source_location": {
- "file": "slm/apis/slm-execute-retention.asciidoc",
- "line": 35
- },
- "digest": "e71d300cd87f09a9527cf45395dd7eb1",
- "lang": "console",
- "found": [],
- "source": "POST /_slm/_execute_retention",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_slm/_execute_retention",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.execute_retention"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get-status.asciidoc",
- "line": 43
- },
- "digest": "cde4104a29dfe942d55863cdd8718627",
- "lang": "console",
- "found": [],
- "source": "GET _slm/status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/status",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.get_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get-status.asciidoc",
- "line": 50
- },
- "digest": "99e0bec31e49636bc0053ac66bc29352",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"RUNNING\"\n}"
- },
- {
- "source_location": {
- "file": "slm/apis/slm-stats.asciidoc",
- "line": 27
- },
- "digest": "55e8ddf643726dec51531ada0bec7143",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.get_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-start.asciidoc",
- "line": 42
- },
- "digest": "371962cf63e65c10026177c6a1bad0b6",
- "lang": "console",
- "found": [],
- "source": "POST _slm/start",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "slm/apis/slm-start.asciidoc",
- "line": 49
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "slm/apis/slm-stop.asciidoc",
- "line": 48
- },
- "digest": "41195ef13af0465cdee1ae18f6c00fde",
- "lang": "console",
- "found": [],
- "source": "POST _slm/stop",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "transform/apis/put-transform.asciidoc",
- "line": 153
- },
- "digest": "23994a14e6b0681cd279b427324945db",
- "lang": "console",
- "found": [],
- "source": "PUT _transform/ecommerce_transform\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_transform/ecommerce_transform",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce",
- "query": {
- "term": {
- "geoip.continent_name": {
- "value": "Asia"
- }
- }
- }
- },
- "pivot": {
- "group_by": {
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "max_price": {
- "max": {
- "field": "taxful_total_price"
- }
- }
- }
- },
- "description": "Maximum priced ecommerce data by customer_id in Asia",
- "dest": {
- "index": "kibana_sample_data_ecommerce_transform",
- "pipeline": "add_timestamp_pipeline"
- },
- "frequency": "5m",
- "sync": {
- "time": {
- "field": "order_date",
- "delay": "60s"
- }
- }
- },
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.put_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/put-transform.asciidoc",
- "line": 201
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/delete-transform.asciidoc",
- "line": 47
- },
- "digest": "70c736ecb3746dbe839af0e468712805",
- "lang": "console",
- "found": [],
- "source": "DELETE _transform/ecommerce_transform",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_transform/ecommerce_transform",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.delete_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/delete-transform.asciidoc",
- "line": 55
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform.asciidoc",
- "line": 92
- },
- "digest": "c65b00a285f510dcd2865aa3539b4e03",
- "lang": "console",
- "found": [],
- "source": "GET _transform?size=10",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_transform",
- "query": {
- "size": "10"
- },
- "body": null,
- "params": null,
- "api": "transform.get_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform.asciidoc",
- "line": 101
- },
- "digest": "c8ebbecc372bcfa5f4a6e7242395ab5e",
- "lang": "console",
- "found": [],
- "source": "GET _transform/ecommerce_transform",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_transform/ecommerce_transform",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.get_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform.asciidoc",
- "line": 109
- },
- "digest": "5b3a36c933194a6e9b0c43096e094ce4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"transforms\" : [\n {\n \"id\" : \"ecommerce_transform\",\n \"source\" : {\n \"index\" : [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\" : {\n \"term\" : {\n \"geoip.continent_name\" : {\n \"value\" : \"Asia\"\n }\n }\n }\n },\n \"dest\" : {\n \"index\" : \"kibana_sample_data_ecommerce_transform\"\n },\n \"frequency\": \"1m\",\n \"pivot\" : {\n \"group_by\" : {\n \"customer_id\" : {\n \"terms\" : {\n \"field\" : \"customer_id\"\n }\n }\n },\n \"aggregations\" : {\n \"max_price\" : {\n \"max\" : {\n \"field\" : \"taxful_total_price\"\n }\n }\n }\n },\n \"description\" : \"Maximum priced ecommerce data by customer_id in Asia\",\n \"version\" : \"7.5.0\",\n \"create_time\" : 1576094542936\n }\n ]\n}\n"
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform-stats.asciidoc",
- "line": 191
- },
- "digest": "53c6256295111524d5ff2885bdcb99a9",
- "lang": "console",
- "found": [],
- "source": "GET _transform/_stats?from=5&size=10",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_transform/_stats",
- "query": {
- "from": "5",
- "size": "10"
- },
- "body": null,
- "params": {
- "transform_id": "_stats"
- },
- "api": "transform.get_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform-stats.asciidoc",
- "line": 200
- },
- "digest": "5db14291fd57c9cd780c969ae26dfaba",
- "lang": "console",
- "found": [],
- "source": "GET _transform/ecommerce_transform/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_transform/ecommerce_transform/_stats",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.get_transform_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform-stats.asciidoc",
- "line": 208
- },
- "digest": "4a625f74fbfc2929dc611f0481ccf282",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"transforms\" : [\n {\n \"id\" : \"ecommerce_transform\",\n \"state\" : \"indexing\",\n \"stats\" : {\n \"pages_processed\" : 2,\n \"documents_processed\" : 1220,\n \"documents_indexed\" : 13,\n \"trigger_count\" : 1,\n \"index_time_in_ms\" : 19,\n \"index_total\" : 1,\n \"index_failures\" : 0,\n \"search_time_in_ms\" : 52,\n \"search_total\" : 2,\n \"search_failures\" : 0,\n \"exponential_avg_checkpoint_duration_ms\" : 77,\n \"exponential_avg_documents_indexed\" : 2,\n \"exponential_avg_documents_processed\" : 12\n },\n \"checkpointing\" : {\n \"last\" : {\n \"checkpoint\" : 100,\n \"timestamp_millis\" : 1561740252497,\n \"time_upper_bound_millis\" : 1561740192497\n },\n \"next\" : {\n \"checkpoint\" : 101,\n \"position\" : {\n \"indexer_position\" : {\n \"hashtag\" : \"abcd1234\"\n },\n \"buckets_position\" : {\n \"hashtag\" : \"abcd5678\"\n }\n },\n \"checkpoint_progress\" : {\n \"documents_processed\": 100,\n \"documents_indexed\": 1\n },\n \"changes_last_detected_at\": 1561740629170,\n \"timestamp_millis\" : 1561740629172,\n \"time_upper_bound_millis\" : 1561740569172\n },\n \"operations_behind\": 27000\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/preview-transform.asciidoc",
- "line": 114
- },
- "digest": "a5ee3f40c34bd913a12e0069b6e42611",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce"
- },
- "pivot": {
- "group_by": {
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "max_price": {
- "max": {
- "field": "taxful_total_price"
- }
- }
- }
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/start-transform.asciidoc",
- "line": 60
- },
- "digest": "01bc0f2ed30eb3dd23511d01ce0ac6e1",
- "lang": "console",
- "found": [],
- "source": "POST _transform/ecommerce_transform/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/ecommerce_transform/_start",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.start_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/start-transform.asciidoc",
- "line": 68
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/stop-transform.asciidoc",
- "line": 91
- },
- "digest": "654882f545eca8d7047695f867c63072",
- "lang": "console",
- "found": [],
- "source": "POST _transform/ecommerce_transform/_stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/ecommerce_transform/_stop",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.stop_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/stop-transform.asciidoc",
- "line": 99
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/update-transform.asciidoc",
- "line": 132
- },
- "digest": "27384266370152add76471dd0332a2f1",
- "lang": "console",
- "found": [],
- "source": "POST _transform/simple-kibana-ecomm-pivot/_update\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/simple-kibana-ecomm-pivot/_update",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce",
- "query": {
- "term": {
- "geoip.continent_name": {
- "value": "Asia"
- }
- }
- }
- },
- "description": "Maximum priced ecommerce data by customer_id in Asia",
- "dest": {
- "index": "kibana_sample_data_ecommerce_transform_v2",
- "pipeline": "add_timestamp_pipeline"
- },
- "frequency": "15m",
- "sync": {
- "time": {
- "field": "order_date",
- "delay": "120s"
- }
- }
- },
- "params": {
- "transform_id": "simple-kibana-ecomm-pivot"
- },
- "api": "transform.update_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/update-transform.asciidoc",
- "line": 164
- },
- "digest": "1bc0493d9bfb39c9f2a1e46010beaf87",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\": \"simple-kibana-ecomm-pivot\",\n \"source\": {\n \"index\": [\"kibana_sample_data_ecommerce\"],\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n },\n \"version\": \"7.5.0\",\n \"create_time\": 1518808660505\n}"
- },
- {
- "source_location": {
- "file": "rest-api/usage.asciidoc",
- "line": 32
- },
- "digest": "43fe75fa9f3fca846598fdad58fd98cb",
- "lang": "console",
- "found": [],
- "source": "GET /_xpack/usage",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_xpack/usage",
- "query": null,
- "body": null,
- "params": null,
- "api": "xpack.usage"
- }
- ]
- },
- {
- "source_location": {
- "file": "rest-api/usage.asciidoc",
- "line": 37
- },
- "digest": "6ace38fe6532affe735b0c808aa948f1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"security\" : {\n \"available\" : true,\n \"enabled\" : false,\n \"ssl\" : {\n \"http\" : {\n \"enabled\" : false\n },\n \"transport\" : {\n \"enabled\" : false\n }\n }\n },\n \"monitoring\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"collection_enabled\" : false,\n \"enabled_exporters\" : {\n \"local\" : 1\n }\n },\n \"watcher\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"execution\" : {\n \"actions\" : {\n \"_all\" : {\n \"total\" : 0,\n \"total_time_in_ms\" : 0\n }\n }\n },\n \"watch\" : {\n \"input\" : {\n \"_all\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n },\n \"trigger\" : {\n \"_all\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n }\n },\n \"count\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n },\n \"graph\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ml\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"jobs\" : {\n \"_all\" : {\n \"count\" : 0,\n \"detectors\" : {\n ...\n },\n \"created_by\" : { },\n \"model_size\" : {\n ...\n },\n \"forecasts\" : {\n \"total\" : 0,\n \"forecasted_jobs\" : 0\n }\n }\n },\n \"datafeeds\" : {\n \"_all\" : {\n \"count\" : 0\n }\n },\n \"data_frame_analytics_jobs\" : {\n \"_all\" : {\n \"count\" : 0\n }\n },\n \"inference\" : {\n \"ingest_processors\" : {\n \"_all\" : {\n \"num_docs_processed\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n },\n \"pipelines\" : {\n \"count\" : 0\n },\n \"num_failures\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n },\n \"time_ms\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n }\n }\n },\n \"trained_models\" : {\n \"_all\" : {\n \"count\" : 0\n }\n }\n },\n \"node_count\" : 1\n },\n \"logstash\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"eql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"sql\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"features\" : {\n \"having\" : 0,\n \"subselect\" : 0,\n \"limit\" : 0,\n \"orderby\" : 0,\n \"where\" : 0,\n \"join\" : 0,\n \"groupby\" : 0,\n \"command\" : 0,\n \"local\" : 0\n },\n \"queries\" : {\n \"rest\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"cli\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"canvas\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"jdbc\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc32\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc64\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"_all\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"translate\" : {\n \"count\" : 0\n }\n }\n },\n \"rollup\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ilm\" : {\n \"policy_count\" : 3,\n \"policy_stats\" : [\n ...\n ]\n },\n \"slm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ccr\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"follower_indices_count\" : 0,\n \"auto_follow_patterns_count\" : 0\n },\n \"transform\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"flattened\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"field_count\" : 0\n },\n \"vectors\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"dense_vector_fields_count\" : 0,\n \"dense_vector_dims_avg_count\" : 0\n },\n \"voting_only\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"frozen_indices\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"indices_count\" : 0\n },\n \"spatial\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"analytics\" : {\n \"available\" : true,\n \"enabled\" : true\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 62
- },
- "digest": "7a1b94de1cbb90b0f06ff8631a70236a",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my_watch\n{\n \"trigger\": {\n \"schedule\": {\n \"hourly\": {\n \"minute\": [ 0, 5 ]\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"actions\": {\n \"test_index\": {\n \"throttle_period\": \"15m\",\n \"index\": {\n \"index\": \"test\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "hourly": {
- "minute": [
- 0,
- 5
- ]
- }
- }
- },
- "input": {
- "simple": {
- "payload": {
- "send": "yes"
- }
- }
- },
- "condition": {
- "always": {}
- },
- "actions": {
- "test_index": {
- "throttle_period": "15m",
- "index": {
- "index": "test"
- }
- }
- }
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 98
- },
- "digest": "e827a9040e137410d62d10bb3b3cbb71",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 105
- },
- "digest": "e2d293db79f536e0cd31d3a6871a2642",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"_version\": 1,\n \"_id\": \"my_watch\",\n \"status\": {\n \"version\": 1,\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:04:27.723Z\",\n \"state\": \"awaits_successful_execution\"\n }\n }\n },\n \"state\": ...\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 136
- },
- "digest": "bdc1afd2181154bb78797360f9dbb1a0",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute\n{\n \"record_execution\" : true\n}\n\nGET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": {
- "record_execution": true
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- },
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 149
- },
- "digest": "97c12a82b244e88ca1b3b3c707401b96",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 1,\n \"_primary_term\": 1,\n \"_version\": 2,\n \"status\": {\n \"version\": 2,\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:04:27.723Z\",\n \"state\": \"ackable\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.723Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.723Z\",\n \"successful\": true\n }\n }\n },\n \"state\": ...,\n \"execution_state\": \"executed\",\n \"last_checked\": ...,\n \"last_met_condition\": ...\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 192
- },
- "digest": "1b0dc9d076bbb58c6a2953ef4323d2fc",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my_watch/_ack/test_index\nGET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my_watch/_ack/test_index",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch",
- "action_id": "test_index"
- },
- "api": "watcher.ack_watch"
- },
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 199
- },
- "digest": "1cfe00b731a1fdf0b2add0688c43a1c2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 2,\n \"_primary_term\": 1,\n \"_version\": 3,\n \"status\": {\n \"version\": 3,\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:04:27.723Z\",\n \"state\": \"acked\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.723Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.723Z\",\n \"successful\": true\n }\n }\n },\n \"state\": ...,\n \"execution_state\": \"executed\",\n \"last_checked\": ...,\n \"last_met_condition\": ...\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 247
- },
- "digest": "8051766cadded0892290bc2cc06e145c",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_ack/action1,action2",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_ack/action1,action2",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch",
- "action_id": "action1,action2"
- },
- "api": "watcher.ack_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 255
- },
- "digest": "df7dbac966b67404b8bfa9cdda5ef480",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_ack",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_ack",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch"
- },
- "api": "watcher.ack_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 264
- },
- "digest": "545a911f3f261e048a8affc77fa29a5d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:04:27.723Z\"\n },\n \"last_checked\": \"2015-05-26T18:04:27.753Z\",\n \"last_met_condition\": \"2015-05-26T18:04:27.763Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\" : {\n \"timestamp\": \"2015-05-26T18:04:27.713Z\",\n \"state\": \"acked\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.733Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.773Z\",\n \"successful\": true\n }\n }\n },\n \"execution_state\": \"executed\",\n \"version\": 2\n }\n}\n"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc",
- "line": 50
- },
- "digest": "e827a9040e137410d62d10bb3b3cbb71",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc",
- "line": 56
- },
- "digest": "6ab4f67649c21d637ec8a0ce72fd0d7c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"_version\": 1,\n \"status\": {\n \"state\" : {\n \"active\" : false,\n \"timestamp\" : \"2015-08-20T12:21:32.734Z\"\n },\n \"actions\": ...,\n \"version\": 1\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc",
- "line": 82
- },
- "digest": "3477a89d869b1f7f72d50c2ca86c4679",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my_watch/_activate",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my_watch/_activate",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch"
- },
- "api": "watcher.activate_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc",
- "line": 90
- },
- "digest": "67f8c67c5dce82121a87f60160071133",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"status\": {\n \"state\" : {\n \"active\" : true,\n \"timestamp\" : \"2015-09-04T08:39:46.816Z\"\n },\n \"actions\": ...,\n \"version\": 1\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc",
- "line": 50
- },
- "digest": "e827a9040e137410d62d10bb3b3cbb71",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc",
- "line": 56
- },
- "digest": "c924b17f4d746145e67e12ddcc126a6f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"status\": {\n \"state\" : {\n \"active\" : true,\n \"timestamp\" : \"2015-08-20T12:21:32.734Z\"\n },\n \"actions\": ...,\n \"version\": 1\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc",
- "line": 82
- },
- "digest": "f63f6343e74bd5c844854272e746de14",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my_watch/_deactivate",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my_watch/_deactivate",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch"
- },
- "api": "watcher.deactivate_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc",
- "line": 90
- },
- "digest": "6a25b3650607fe28bab83484ddf9a98c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"status\": {\n \"state\" : {\n \"active\" : false,\n \"timestamp\" : \"2015-09-04T08:39:46.816Z\"\n },\n \"actions\": ...,\n \"version\": 1\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/delete-watch.asciidoc",
- "line": 60
- },
- "digest": "2aa548b692fc2fe7b6f0d90eb8b2ae29",
- "lang": "console",
- "found": [],
- "source": "DELETE _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.delete_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/delete-watch.asciidoc",
- "line": 68
- },
- "digest": "83597138e92b7b938bddf80b550eeed9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_version\": 2\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 147
- },
- "digest": "01dc7bdc223bd651574ed2d3954a5b1c",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 155
- },
- "digest": "f6eff830fb0fad200ebfb1e3e46f6f0e",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute\n{\n \"trigger_data\" : { <1>\n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { <2>\n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, <3>\n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" <4>\n },\n \"record_execution\" : true <5>\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": {
- "trigger_data": {
- "triggered_time": "now",
- "scheduled_time": "now"
- },
- "alternative_input": {
- "foo": "bar"
- },
- "ignore_condition": true,
- "action_modes": {
- "my-action": "force_simulate"
- },
- "record_execution": true
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 188
- },
- "digest": "c017830af8d4720a5f60c0f142ed348b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_id\": \"my_watch_0-2015-06-02T23:17:55.124Z\", <1>\n \"watch_record\": { <2>\n \"watch_id\": \"my_watch\",\n \"node\": \"my_node\",\n \"messages\": [],\n \"trigger_event\": {\n \"type\": \"manual\",\n \"triggered_time\": \"2015-06-02T23:17:55.124Z\",\n \"manual\": {\n \"schedule\": {\n \"scheduled_time\": \"2015-06-02T23:17:55.124Z\"\n }\n }\n },\n \"state\": \"executed\",\n \"status\": {\n \"version\": 1,\n \"execution_state\": \"executed\",\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-06-02T23:17:55.111Z\"\n },\n \"last_checked\": \"2015-06-02T23:17:55.124Z\",\n \"last_met_condition\": \"2015-06-02T23:17:55.124Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"state\": \"ackable\"\n },\n \"last_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n },\n \"last_successful_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n }\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"result\": { <3>\n \"execution_time\": \"2015-06-02T23:17:55.124Z\",\n \"execution_duration\": 12608,\n \"input\": {\n \"type\": \"simple\",\n \"payload\": {\n \"foo\": \"bar\"\n },\n \"status\": \"success\"\n },\n \"condition\": {\n \"type\": \"always\",\n \"met\": true,\n \"status\": \"success\"\n },\n \"actions\": [\n {\n \"id\": \"test_index\",\n \"index\": {\n \"response\": {\n \"index\": \"test\",\n \"version\": 1,\n \"created\": true,\n \"result\": \"created\",\n \"id\": \"AVSHKzPa9zx62AzUzFXY\"\n }\n },\n \"status\": \"success\",\n \"type\": \"index\"\n }\n ]\n },\n \"user\": \"test_admin\" <4>\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 297
- },
- "digest": "7f37031fb40b68a61255b7c71d7eed0b",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute\n{\n \"action_modes\" : {\n \"action1\" : \"force_simulate\",\n \"action2\" : \"skip\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": {
- "action_modes": {
- "action1": "force_simulate",
- "action2": "skip"
- }
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 312
- },
- "digest": "9cf6c7012a4f2bb562bc256aa28c3409",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute\n{\n \"action_modes\" : {\n \"_all\" : \"force_execute\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": {
- "action_modes": {
- "_all": "force_execute"
- }
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 325
- },
- "digest": "9cd37d0ccbc66ad47ddb626564b27cc8",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/_execute\n{\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/_execute",
- "query": null,
- "body": {
- "watch": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "log_error": {
- "logging": {
- "text": "Found {{ctx.payload.hits.total}} errors in the logs"
- }
- }
- }
- }
- },
- "params": null,
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 361
- },
- "digest": "10b924bf6298aa6157ed00ce12f8edc1",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/_execute\n{\n \"ignore_condition\" : true,\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/_execute",
- "query": null,
- "body": {
- "ignore_condition": true,
- "watch": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "log_error": {
- "logging": {
- "text": "Found {{ctx.payload.hits.total}} errors in the logs"
- }
- }
- }
- }
- },
- "params": null,
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/get-watch.asciidoc",
- "line": 49
- },
- "digest": "e827a9040e137410d62d10bb3b3cbb71",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/get-watch.asciidoc",
- "line": 57
- },
- "digest": "b27af4671721924c2e449cf6f1e73158",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"_version\": 1,\n \"status\": { <1>\n \"version\": 1,\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:21:08.630Z\"\n },\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:21:08.630Z\",\n \"state\": \"awaits_successful_execution\"\n }\n }\n }\n },\n \"watch\": {\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"trigger\": {\n \"schedule\": {\n \"hourly\": {\n \"minute\": [0, 5]\n }\n }\n },\n \"actions\": {\n \"test_index\": {\n \"index\": {\n \"index\": \"test\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stats.asciidoc",
- "line": 84
- },
- "digest": "17266cee5eaaddf08e5534bf580a1910",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "watcher.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stats.asciidoc",
- "line": 112
- },
- "digest": "3ed79871d956bfb2d6d2721d7272520c",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/stats?metric=current_watches",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/stats",
- "query": {
- "metric": "current_watches"
- },
- "body": null,
- "params": null,
- "api": "watcher.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stats.asciidoc",
- "line": 119
- },
- "digest": "56b6b50b174a935d368301ebd717231d",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/stats/current_watches",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/stats/current_watches",
- "query": null,
- "body": null,
- "params": {
- "metric": "current_watches"
- },
- "api": "watcher.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stats.asciidoc",
- "line": 163
- },
- "digest": "6244204213f60edf2f23295f9059f2c9",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/stats/queued_watches",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/stats/queued_watches",
- "query": null,
- "body": null,
- "params": {
- "metric": "queued_watches"
- },
- "api": "watcher.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/put-watch.asciidoc",
- "line": 117
- },
- "digest": "3a12feb0de224bfaaf518d95b9f516ff",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my-watch\n{\n \"trigger\" : {\n \"schedule\" : { \"cron\" : \"0 0/1 * * * ?\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [\n \"logstash*\"\n ],\n \"body\" : {\n \"query\" : {\n \"bool\" : {\n \"must\" : {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\" : {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"email_admin\" : {\n \"email\" : {\n \"to\" : \"admin@domain.host.com\",\n \"subject\" : \"404 recently encountered\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my-watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "cron": "0 0/1 * * * ?"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logstash*"
- ],
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "response": 404
- }
- },
- "filter": {
- "range": {
- "@timestamp": {
- "from": "{{ctx.trigger.scheduled_time}}||-5m",
- "to": "{{ctx.trigger.triggered_time}}"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "email_admin": {
- "email": {
- "to": "admin@domain.host.com",
- "subject": "404 recently encountered"
- }
- }
- }
- },
- "params": {
- "id": "my-watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/start.asciidoc",
- "line": 43
- },
- "digest": "97ea5ab17213cb1faaf6f3ea13607098",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/_start",
- "query": null,
- "body": null,
- "params": null,
- "api": "watcher.start"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/start.asciidoc",
- "line": 50
- },
- "digest": "647803854da1f06200d471a2937e105c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stop.asciidoc",
- "line": 43
- },
- "digest": "6b1336ff477f91d4a0db0b06db546ff0",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/_stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/_stop",
- "query": null,
- "body": null,
- "params": null,
- "api": "watcher.stop"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stop.asciidoc",
- "line": 50
- },
- "digest": "647803854da1f06200d471a2937e105c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "migration/migrate_8_0/snapshots.asciidoc",
- "line": 20
- },
- "digest": "6458a2377155ecbdd2d3ebd0e1529201",
- "lang": "console",
- "found": [],
- "source": "GET _snapshot/repo1/snap1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/repo1/snap1",
- "query": null,
- "body": null,
- "params": {
- "repository": "repo1",
- "snapshot": "snap1"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "migration/migrate_8_0/snapshots.asciidoc",
- "line": 28
- },
- "digest": "97eab207747d5ad2e1f6d3b84971d74b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"responses\": [\n {\n \"repository\": \"repo1\",\n \"snapshots\": [\n {\n \"snapshot\": \"snap1\",\n \"uuid\": \"cEzdqUKxQ5G6MyrJAcYwmA\",\n \"version_id\": 8000099,\n \"version\": \"8.0.0\",\n \"indices\": [],\n \"include_global_state\": true,\n \"state\": \"SUCCESS\",\n \"start_time\": \"2019-05-10T17:01:57.868Z\",\n \"start_time_in_millis\": 1557507717868,\n \"end_time\": \"2019-05-10T17:01:57.909Z\",\n \"end_time_in_millis\": 1557507717909,\n \"duration_in_millis\": 41,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n ]\n }\n ]\n}"
- }
-]
\ No newline at end of file
diff --git a/util/build_tests.php b/util/build_tests.php
index 0be9a83a6..0ae710eea 100644
--- a/util/build_tests.php
+++ b/util/build_tests.php
@@ -14,9 +14,9 @@
*/
declare(strict_types = 1);
-use Elasticsearch\Common\Exceptions\NoNodesAvailableException;
-use Elasticsearch\Util\YamlTests;
-use Elasticsearch\Tests\Utility;
+use Elastic\Transport\Exception\NoNodeAvailableException;
+use Elastic\Elasticsearch\Util\YamlTests;
+use Elastic\Elasticsearch\Tests\Utility;
require dirname(__DIR__) . '/vendor/autoload.php';
@@ -29,7 +29,7 @@
try {
$serverInfo = $client->info();
-} catch (NoNodesAvailableException $e) {
+} catch (NoNodeAvailableException $e) {
printf ("ERROR: Host %s is offline\n", Utility::getHost());
exit(1);
}
diff --git a/util/clean_es_docker.sh b/util/clean_es_docker.sh
deleted file mode 100755
index 498c48beb..000000000
--- a/util/clean_es_docker.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-docker container rm --force --volumes elasticsearch > /dev/null 2>&1 || true
-docker network rm esnet > /dev/null
diff --git a/util/parsed-alternative-report.json b/util/parsed-alternative-report.json
deleted file mode 100644
index e6a96927f..000000000
--- a/util/parsed-alternative-report.json
+++ /dev/null
@@ -1,87086 +0,0 @@
-[
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 167
- },
- "digest": "f8cc4b331a19ff4df8e4a490f906ee69",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cat/health?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 251
- },
- "digest": "311c4b632a29b9ead63b02d01f10096b",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /customer/_doc/1\n{\n \"name\": \"John Doe\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/customer/_doc/1",
- "query": null,
- "body": {
- "name": "John Doe"
- },
- "params": {
- "index": "customer",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 266
- },
- "digest": "2f3590ba3141cbe0c766bd6e7c1bf5f1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"customer\",\n \"_id\" : \"1\",\n \"_version\" : 1,\n \"result\" : \"created\",\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 2,\n \"failed\" : 0\n },\n \"_seq_no\" : 26,\n \"_primary_term\" : 4\n}"
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 290
- },
- "digest": "3f3b3e207f79303ce6f86e03e928e062",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /customer/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/customer/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "customer",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 299
- },
- "digest": "6e62b5dec4c82e5dfb37df8473c84998",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"customer\",\n \"_id\" : \"1\",\n \"_version\" : 1,\n \"_seq_no\" : 26,\n \"_primary_term\" : 4,\n \"found\" : true,\n \"_source\" : {\n \"name\": \"John Doe\"\n }\n}"
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 392
- },
- "digest": "506844befdc5691d835771bcbb1c1a60",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": { \"match_all\": {} },\n \"sort\": [\n { \"account_number\": \"asc\" }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "sort": [
- {
- "account_number": "asc"
- }
- ]
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 407
- },
- "digest": "d12b87347bfd1270258ed9bafb232842",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 63,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 5,\n \"successful\" : 5,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\": 1000,\n \"relation\": \"eq\"\n },\n \"max_score\" : null,\n \"hits\" : [ {\n \"_index\" : \"bank\",\n \"_id\" : \"0\",\n \"sort\": [0],\n \"_score\" : null,\n \"_source\" : {\"account_number\":0,\"balance\":16623,\"firstname\":\"Bradshaw\",\"lastname\":\"Mckenzie\",\"age\":29,\"gender\":\"F\",\"address\":\"244 Columbus Place\",\"employer\":\"Euron\",\"email\":\"bradshawmckenzie@euron.com\",\"city\":\"Hobucken\",\"state\":\"CO\"}\n }, {\n \"_index\" : \"bank\",\n \"_id\" : \"1\",\n \"sort\": [1],\n \"_score\" : null,\n \"_source\" : {\"account_number\":1,\"balance\":39225,\"firstname\":\"Amber\",\"lastname\":\"Duke\",\"age\":32,\"gender\":\"M\",\"address\":\"880 Holmes Lane\",\"employer\":\"Pyrami\",\"email\":\"amberduke@pyrami.com\",\"city\":\"Brogan\",\"state\":\"IL\"}\n }, ...\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 461
- },
- "digest": "4b90feb9d5d3dbfce424dac0341320b7",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": { \"match_all\": {} },\n \"sort\": [\n { \"account_number\": \"asc\" }\n ],\n \"from\": 10,\n \"size\": 10\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "sort": [
- {
- "account_number": "asc"
- }
- ],
- "from": 10,
- "size": 10
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 482
- },
- "digest": "cd247f267968aa0927bfdad56852f8f5",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": { \"match\": { \"address\": \"mill lane\" } }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "address": "mill lane"
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 495
- },
- "digest": "231aa0bb39c35fe199d28fe0e4a62b2e",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": { \"match_phrase\": { \"address\": \"mill lane\" } }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "address": "mill lane"
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 512
- },
- "digest": "47bb632c6091ad0cd94bc660bdd309a5",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": [\n { \"match\": { \"age\": \"40\" } }\n ],\n \"must_not\": [\n { \"match\": { \"state\": \"ID\" } }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "age": "40"
- }
- }
- ],
- "must_not": [
- {
- "match": {
- "state": "ID"
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 544
- },
- "digest": "251ea12c1248385ab409906ac64d9ee9",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": { \"match_all\": {} },\n \"filter\": {\n \"range\": {\n \"balance\": {\n \"gte\": 20000,\n \"lte\": 30000\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "range": {
- "balance": {
- "gte": 20000,
- "lte": 30000
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 578
- },
- "digest": "feefeb68144002fd1fff57b77b95b85e",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"group_by_state\": {\n \"terms\": {\n \"field\": \"state.keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "group_by_state": {
- "terms": {
- "field": "state.keyword"
- }
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 599
- },
- "digest": "741af8f842967afbb493f133e34a3b0d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 29,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 5,\n \"successful\": 5,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\": 1000,\n \"relation\": \"eq\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"group_by_state\" : {\n \"doc_count_error_upper_bound\": 20,\n \"sum_other_doc_count\": 770,\n \"buckets\" : [ {\n \"key\" : \"ID\",\n \"doc_count\" : 27\n }, {\n \"key\" : \"TX\",\n \"doc_count\" : 27\n }, {\n \"key\" : \"AL\",\n \"doc_count\" : 25\n }, {\n \"key\" : \"MD\",\n \"doc_count\" : 25\n }, {\n \"key\" : \"TN\",\n \"doc_count\" : 23\n }, {\n \"key\" : \"MA\",\n \"doc_count\" : 21\n }, {\n \"key\" : \"NC\",\n \"doc_count\" : 21\n }, {\n \"key\" : \"ND\",\n \"doc_count\" : 21\n }, {\n \"key\" : \"ME\",\n \"doc_count\" : 20\n }, {\n \"key\" : \"MO\",\n \"doc_count\" : 20\n } ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 665
- },
- "digest": "cfbaea6f0df045c5d940bbb6a9c69cd8",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"group_by_state\": {\n \"terms\": {\n \"field\": \"state.keyword\"\n },\n \"aggs\": {\n \"average_balance\": {\n \"avg\": {\n \"field\": \"balance\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "group_by_state": {
- "terms": {
- "field": "state.keyword"
- },
- "aggs": {
- "average_balance": {
- "avg": {
- "field": "balance"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "getting-started.asciidoc",
- "line": 691
- },
- "digest": "645796e8047967ca4a7635a22a876f4c",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /bank/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"group_by_state\": {\n \"terms\": {\n \"field\": \"state.keyword\",\n \"order\": {\n \"average_balance\": \"desc\"\n }\n },\n \"aggs\": {\n \"average_balance\": {\n \"avg\": {\n \"field\": \"balance\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bank/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "group_by_state": {
- "terms": {
- "field": "state.keyword",
- "order": {
- "average_balance": "desc"
- }
- },
- "aggs": {
- "average_balance": {
- "avg": {
- "field": "balance"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "bank"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/install/check-running.asciidoc",
- "line": 7
- },
- "digest": "3d1ff6097e2359f927c88c2ccdb36252",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/",
- "query": null,
- "body": null,
- "params": null,
- "api": "info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/secure-settings.asciidoc",
- "line": 35
- },
- "digest": "eb7e3aaed0c8f3f8e3462bf3df9a7a5c",
- "lang": "console",
- "found": [],
- "source": "POST _nodes/reload_secure_settings\n{\n \"secure_settings_password\": \"s3cr3t\" <1>\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_nodes/reload_secure_settings",
- "query": null,
- "body": {
- "secure_settings_password": "s3cr3t"
- },
- "params": null,
- "api": "nodes.reload_secure_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/disk_allocator.asciidoc",
- "line": 57
- },
- "digest": "aaaa9a186db96077879ddfcfbd625fdb",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index.blocks.read_only_allow_delete\": null\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index.blocks.read_only_allow_delete": null
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/disk_allocator.asciidoc",
- "line": 82
- },
- "digest": "4fe5a9e99dc9400d67a5a2f6f6752c07",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\": {\n \"cluster.routing.allocation.disk.watermark.low\": \"100gb\",\n \"cluster.routing.allocation.disk.watermark.high\": \"50gb\",\n \"cluster.routing.allocation.disk.watermark.flood_stage\": \"10gb\",\n \"cluster.info.update.interval\": \"1m\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "cluster.routing.allocation.disk.watermark.low": "100gb",
- "cluster.routing.allocation.disk.watermark.high": "50gb",
- "cluster.routing.allocation.disk.watermark.flood_stage": "10gb",
- "cluster.info.update.interval": "1m"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/allocation_filtering.asciidoc",
- "line": 22
- },
- "digest": "281ae12918af10b6377ec760eaa844ce",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"cluster.routing.allocation.exclude._ip\" : \"10.0.0.1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "cluster.routing.allocation.exclude._ip": "10.0.0.1"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/allocation_filtering.asciidoc",
- "line": 64
- },
- "digest": "07474768b8f9d532b524c15e512736f4",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\": {\n \"cluster.routing.allocation.exclude._ip\": \"192.168.2.*\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "cluster.routing.allocation.exclude._ip": "192.168.2.*"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/misc.asciidoc",
- "line": 78
- },
- "digest": "4207219a892339e8f3abe0df8723dd27",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\": {\n \"cluster.metadata.administrator\": \"sysadmin@example.com\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.metadata.administrator": "sysadmin@example.com"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cluster/misc.asciidoc",
- "line": 122
- },
- "digest": "c3fa14da3d0b0f93fb59bb5386b7e776",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"transient\": {\n \"logger.org.elasticsearch.indices.recovery\": \"DEBUG\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "logger.org.elasticsearch.indices.recovery": "DEBUG"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/http.asciidoc",
- "line": 137
- },
- "digest": "45df8177c5f8a3cc4e36867742e8250c",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"logger.org.elasticsearch.http.HttpTracer\" : \"TRACE\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "logger.org.elasticsearch.http.HttpTracer": "TRACE"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/http.asciidoc",
- "line": 150
- },
- "digest": "fa4e5b5cd144dd03cd507ffa9dec5b7e",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"http.tracer.include\" : \"*\",\n \"http.tracer.exclude\" : \"\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "http.tracer.include": "*",
- "http.tracer.exclude": ""
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/logging-config.asciidoc",
- "line": 155
- },
- "digest": "8e6bfb4441ffa15c86d5dc20fa083571",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /_cluster/settings\n{\n \"transient\": {\n \"logger.org.elasticsearch.transport\": \"trace\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "logger.org.elasticsearch.transport": "trace"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 47
- },
- "digest": "00629ea43db6ee1704183170df085495",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_cache/clear?request=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_cache/clear",
- "query": {
- "request": "true"
- },
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 59
- },
- "digest": "adebfecf7485326e9f7fae9de9169abc",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"index.requests.cache.enable\": false\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.requests.cache.enable": false
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 72
- },
- "digest": "f22e069bc0c6f9dae57e084c662a86fd",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index/_settings\n{ \"index.requests.cache.enable\": true }",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_settings",
- "query": null,
- "body": {
- "index.requests.cache.enable": true
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 86
- },
- "digest": "13e9c7cdd43161f1336c94fd70a0db0c",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_search?request_cache=true\n{\n \"size\": 0,\n \"aggs\": {\n \"popular_colors\": {\n \"terms\": {\n \"field\": \"colors\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "request_cache": "true"
- },
- "body": {
- "size": 0,
- "aggs": {
- "popular_colors": {
- "terms": {
- "field": "colors"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 139
- },
- "digest": "36da9668fef56910370f16bfb772cc40",
- "lang": "console",
- "found": [],
- "source": "GET /_stats/request_cache?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats/request_cache",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "metric": "request_cache"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/indices/request_cache.asciidoc",
- "line": 146
- },
- "digest": "90631797c7fbda43902abf2cc0ea8304",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/stats/indices/request_cache?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/request_cache",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "request_cache"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/transport.asciidoc",
- "line": 155
- },
- "digest": "939e79dee613238f9512fb9cbf0be816",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"logger.org.elasticsearch.transport.TransportService.tracer\" : \"TRACE\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "logger.org.elasticsearch.transport.TransportService.tracer": "TRACE"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/transport.asciidoc",
- "line": 168
- },
- "digest": "cecbbd7b4ec1bf82fd84ae96099febcc",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\" : {\n \"transport.tracer.include\" : \"*\",\n \"transport.tracer.exclude\" : \"internal:coordination/fault_detection/*\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "transport.tracer.include": "*",
- "transport.tracer.exclude": "internal:coordination/fault_detection/*"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/sysconfig/swap.asciidoc",
- "line": 71
- },
- "digest": "ed250b74bc77c15bb794f55a12d762c3",
- "lang": "console",
- "found": [],
- "source": "GET _nodes?filter_path=**.mlockall",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes",
- "query": {
- "filter_path": "**.mlockall"
- },
- "body": null,
- "params": null,
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/sysconfig/file-descriptors.asciidoc",
- "line": 29
- },
- "digest": "c5bc577ff92f889225b0d2617adcb48c",
- "lang": "console",
- "found": [],
- "source": "GET _nodes/stats/process?filter_path=**.max_file_descriptors",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/process",
- "query": {
- "filter_path": "**.max_file_descriptors"
- },
- "body": null,
- "params": {
- "metric": "process"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/discovery/voting.asciidoc",
- "line": 31
- },
- "digest": "1605be45a5711d1929d6ad2d1ae0f797",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "metadata.cluster_coordination.last_committed_config"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/add-nodes.asciidoc",
- "line": 111
- },
- "digest": "4e1f02928ef243bf07fd425754b7642b",
- "lang": "console",
- "found": [],
- "source": "# Add node to voting configuration exclusions list and wait for the system\n# to auto-reconfigure the node out of the voting configuration up to the\n# default timeout of 30 seconds\nPOST /_cluster/voting_config_exclusions?node_names=node_name\n\n# Add node to voting configuration exclusions list and wait for\n# auto-reconfiguration up to one minute\nPOST /_cluster/voting_config_exclusions?node_names=node_name&timeout=1m",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "setup/add-nodes.asciidoc",
- "line": 154
- },
- "digest": "92f073762634a4b2274f71002494192e",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state?filter_path=metadata.cluster_coordination.voting_config_exclusions",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "metadata.cluster_coordination.voting_config_exclusions"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/add-nodes.asciidoc",
- "line": 172
- },
- "digest": "ead4d875877d618594d0cdbdd9b7998b",
- "lang": "console",
- "found": [],
- "source": "# Wait for all the nodes with voting configuration exclusions to be removed from\n# the cluster and then remove all the exclusions, allowing any node to return to\n# the voting configuration in the future.\nDELETE /_cluster/voting_config_exclusions\n\n# Immediately remove all the voting configuration exclusions, allowing any node\n# to return to the voting configuration in the future.\nDELETE /_cluster/voting_config_exclusions?wait_for_removal=false",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 30
- },
- "digest": "1cd3b9d65576a9212eef898eb3105758",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": \"primaries\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": "primaries"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 30
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 49
- },
- "digest": "a21a7bf052b41f5b996dc58f7b69770f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 88
- },
- "digest": "c0a4b0c1c6eff14da8b152ceb19c1c31",
- "lang": "console",
- "found": [],
- "source": "GET _cat/health\n\nGET _cat/nodes",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.health"
- },
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 122
- },
- "digest": "45ef5156dbd2d3fd4fd22b8d99f7aad4",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 142
- },
- "digest": "2d9b30acd6b5683f39d53494c0dd779c",
- "lang": "console",
- "found": [],
- "source": "GET _cat/health\n\nGET _cat/recovery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.health"
- },
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 157
- },
- "digest": "3c5d5a5c34a62724942329658c688f5e",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 30
- },
- "digest": "1cd3b9d65576a9212eef898eb3105758",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": \"primaries\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": "primaries"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 30
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 49
- },
- "digest": "a21a7bf052b41f5b996dc58f7b69770f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 203
- },
- "digest": "7e49705769c42895fb7b1e2ca028ff47",
- "lang": "console",
- "found": [],
- "source": "GET _cat/nodes",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 217
- },
- "digest": "45ef5156dbd2d3fd4fd22b8d99f7aad4",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "setup/restart-cluster.asciidoc",
- "line": 157
- },
- "digest": "3c5d5a5c34a62724942329658c688f5e",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/remote-clusters.asciidoc",
- "line": 133
- },
- "digest": "318d8096ad47c1c939776c2ce12758f9",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"cluster_one\": {\n \"seeds\": [\n \"127.0.0.1:9300\"\n ],\n \"transport.ping_schedule\": \"30s\"\n },\n \"cluster_two\": {\n \"mode\": \"sniff\",\n \"seeds\": [\n \"127.0.0.1:9301\"\n ],\n \"transport.compress\": true,\n \"skip_unavailable\": true\n },\n \"cluster_three\": {\n \"mode\": \"proxy\",\n \"proxy_address\": \"127.0.0.1:9302\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "cluster_one": {
- "seeds": [
- "127.0.0.1:9300"
- ],
- "transport.ping_schedule": "30s"
- },
- "cluster_two": {
- "mode": "sniff",
- "seeds": [
- "127.0.0.1:9301"
- ],
- "transport.compress": true,
- "skip_unavailable": true
- },
- "cluster_three": {
- "mode": "proxy",
- "proxy_address": "127.0.0.1:9302"
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/remote-clusters.asciidoc",
- "line": 170
- },
- "digest": "0b1aad9e990ae831f392f816dfbd4528",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"cluster_one\": {\n \"seeds\": [\n \"127.0.0.1:9300\"\n ],\n \"transport.ping_schedule\": \"60s\"\n },\n \"cluster_two\": {\n \"mode\": \"sniff\",\n \"seeds\": [\n \"127.0.0.1:9301\"\n ],\n \"transport.compress\": false\n },\n \"cluster_three\": {\n \"mode\": \"proxy\",\n \"proxy_address\": \"127.0.0.1:9302\",\n \"transport.compress\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "cluster_one": {
- "seeds": [
- "127.0.0.1:9300"
- ],
- "transport.ping_schedule": "60s"
- },
- "cluster_two": {
- "mode": "sniff",
- "seeds": [
- "127.0.0.1:9301"
- ],
- "transport.compress": false
- },
- "cluster_three": {
- "mode": "proxy",
- "proxy_address": "127.0.0.1:9302",
- "transport.compress": true
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/remote-clusters.asciidoc",
- "line": 208
- },
- "digest": "466bb2bc027f33a611e32fd7a9540eef",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"cluster_two\": { <1>\n \"mode\": null,\n \"seeds\": null,\n \"skip_unavailable\": null,\n \"transport\": {\n \"compress\": null\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "cluster_two": {
- "mode": null,
- "seeds": null,
- "skip_unavailable": null,
- "transport": {
- "compress": null
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 65
- },
- "digest": "1cd3b9d65576a9212eef898eb3105758",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": \"primaries\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": "primaries"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 66
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 101
- },
- "digest": "a21a7bf052b41f5b996dc58f7b69770f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 116
- },
- "digest": "7e49705769c42895fb7b1e2ca028ff47",
- "lang": "console",
- "found": [],
- "source": "GET _cat/nodes",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 129
- },
- "digest": "45ef5156dbd2d3fd4fd22b8d99f7aad4",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 147
- },
- "digest": "5c53944aec2ce3e55854e315f0482029",
- "lang": "console",
- "found": [],
- "source": "GET _cat/health?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 177
- },
- "digest": "6b74ff6df5d7583add837b34a6c80a43",
- "lang": "console",
- "found": [],
- "source": "GET _cat/recovery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 194
- },
- "digest": "f8cc4b331a19ff4df8e4a490f906ee69",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cat/health?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 201
- },
- "digest": "c4270d3851c76898fc8b112c6c597444",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodes?h=ip,name,version&v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "h": "ip,name,version",
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/rolling_upgrade.asciidoc",
- "line": 216
- },
- "digest": "3c5d5a5c34a62724942329658c688f5e",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 32
- },
- "digest": "1cd3b9d65576a9212eef898eb3105758",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": \"primaries\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": "primaries"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 31
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 66
- },
- "digest": "a21a7bf052b41f5b996dc58f7b69770f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 91
- },
- "digest": "c0a4b0c1c6eff14da8b152ceb19c1c31",
- "lang": "console",
- "found": [],
- "source": "GET _cat/health\n\nGET _cat/nodes",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.health"
- },
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 124
- },
- "digest": "45ef5156dbd2d3fd4fd22b8d99f7aad4",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.routing.allocation.enable": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 143
- },
- "digest": "2d9b30acd6b5683f39d53494c0dd779c",
- "lang": "console",
- "found": [],
- "source": "GET _cat/health\n\nGET _cat/recovery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.health"
- },
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/cluster_restart.asciidoc",
- "line": 159
- },
- "digest": "3c5d5a5c34a62724942329658c688f5e",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "upgrade/reindex_upgrade.asciidoc",
- "line": 160
- },
- "digest": "acd65c045139fef38ef5cd20c8c1cfc1",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"remote\": {\n \"host\": \"http://oldhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "remote": {
- "host": "http://oldhost:9200",
- "username": "user",
- "password": "pass"
- },
- "index": "source",
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "dest": {
- "index": "dest"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 67
- },
- "digest": "f9be1f5f76008daf901192c86b45c02c",
- "lang": "console",
- "found": [],
- "source": "PUT /_ilm/policy/logs_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"25GB\"\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/logs_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "25GB"
- }
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "logs_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 116
- },
- "digest": "aa747d8125e5326384a29e346d4ff851",
- "lang": "console",
- "found": [],
- "source": "GET /_resolve/index/logs*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_resolve/index/logs*",
- "query": null,
- "body": null,
- "params": {
- "name": "logs*"
- },
- "api": "indices.resolve_index"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 125
- },
- "digest": "c0e49c54fab32435e388fc5591a52718",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\" : [ ],\n \"aliases\" : [ ],\n \"data_streams\" : [ ]\n}"
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 170
- },
- "digest": "949ecbf063163b26c99871f20987b9ff",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/logs_data_stream\n{\n \"index_patterns\": [ \"logs*\" ],\n \"data_stream\": {},\n \"template\": {\n \"settings\": {\n \"index.lifecycle.name\": \"logs_policy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/logs_data_stream",
- "query": null,
- "body": {
- "index_patterns": [
- "logs*"
- ],
- "data_stream": {},
- "template": {
- "settings": {
- "index.lifecycle.name": "logs_policy"
- }
- }
- },
- "params": {
- "name": "logs_data_stream"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 216
- },
- "digest": "1ce0576497abe7e1a9d6ca7fbcf3e910",
- "lang": "console",
- "found": [],
- "source": "POST /logs/_doc/\n{\n \"@timestamp\": \"2020-12-06T11:04:05.000Z\",\n \"user\": {\n \"id\": \"vlb44hny\"\n },\n \"message\": \"Login attempt failed\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs/_doc/",
- "query": null,
- "body": {
- "@timestamp": "2020-12-06T11:04:05.000Z",
- "user": {
- "id": "vlb44hny"
- },
- "message": "Login attempt failed"
- },
- "params": {
- "index": "logs"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 233
- },
- "digest": "8bbd21e8d49f8af8d1ece3b581c225c8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \".ds-logs-000001\",\n \"_id\": \"qecQmXIBT4jB8tq1nG0j\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}"
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 266
- },
- "digest": "ef335d1d0b71879ea1b07be1d20a2a1c",
- "lang": "console",
- "found": [],
- "source": "PUT /_data_stream/logs_alt",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_data_stream/logs_alt",
- "query": null,
- "body": null,
- "params": {
- "name": "logs_alt"
- },
- "api": "indices.create_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 306
- },
- "digest": "7e8438023b41733747a2f9976c634f68",
- "lang": "console",
- "found": [],
- "source": "GET /_data_stream/logs",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_data_stream/logs",
- "query": null,
- "body": null,
- "params": {
- "name": "logs"
- },
- "api": "indices.get_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 316
- },
- "digest": "d3d611395787b2952c3d7ee4b30413b3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"data_streams\": [\n {\n \"name\": \"logs\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-logs-000001\",\n \"index_uuid\": \"krR78LfvTOe6gr5dj2_1xQ\"\n },\n {\n \"index_name\": \".ds-logs-000002\", <1>\n \"index_uuid\": \"C6LWyNJHQWmA08aQGvqRkA\"\n }\n ],\n \"generation\": 2,\n \"status\": \"GREEN\",\n \"template\": \"logs_data_stream\",\n \"ilm_policy\": \"logs_policy\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "data-streams/set-up-a-data-stream.asciidoc",
- "line": 371
- },
- "digest": "9c863e1f9c2e91f78b6486ccb9cb42e7",
- "lang": "console",
- "found": [],
- "source": "DELETE /_data_stream/logs",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_data_stream/logs",
- "query": null,
- "body": null,
- "params": {
- "name": "logs"
- },
- "api": "indices.delete_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 82
- },
- "digest": "69f6dfecb8e11bb215d88557af15a1c9",
- "lang": "console",
- "found": [],
- "source": "POST /logs/_doc/\n{\n \"@timestamp\": \"2020-12-07T11:06:07.000Z\",\n \"user\": {\n \"id\": \"8a4f500d\"\n },\n \"message\": \"Login successful\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs/_doc/",
- "query": null,
- "body": {
- "@timestamp": "2020-12-07T11:06:07.000Z",
- "user": {
- "id": "8a4f500d"
- },
- "message": "Login successful"
- },
- "params": {
- "index": "logs"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 112
- },
- "digest": "6bd19ade0029740347386b0705535c19",
- "lang": "console",
- "found": [],
- "source": "PUT /logs/_bulk?refresh\n{\"create\":{ }}\n{ \"@timestamp\": \"2020-12-08T11:04:05.000Z\", \"user\": { \"id\": \"vlb44hny\" }, \"message\": \"Login attempt failed\" }\n{\"create\":{ }}\n{ \"@timestamp\": \"2020-12-08T11:06:07.000Z\", \"user\": { \"id\": \"8a4f500d\" }, \"message\": \"Login successful\" }\n{\"create\":{ }}\n{ \"@timestamp\": \"2020-12-09T11:07:08.000Z\", \"user\": { \"id\": \"l7gk7f82\" }, \"message\": \"Logout successful\" }",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "create": {}
- },
- {
- "@timestamp": "2020-12-08T11:04:05.000Z",
- "user": {
- "id": "vlb44hny"
- },
- "message": "Login attempt failed"
- },
- {
- "create": {}
- },
- {
- "@timestamp": "2020-12-08T11:06:07.000Z",
- "user": {
- "id": "8a4f500d"
- },
- "message": "Login successful"
- },
- {
- "create": {}
- },
- {
- "@timestamp": "2020-12-09T11:07:08.000Z",
- "user": {
- "id": "l7gk7f82"
- },
- "message": "Logout successful"
- }
- ],
- "params": {
- "index": "logs"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 136
- },
- "digest": "25354d8957c8b2dea338f1fd3093a8ef",
- "lang": "console",
- "found": [],
- "source": "PUT /_ingest/pipeline/lowercase_message_field\n{\n \"description\" : \"Lowercases the message field value\",\n \"processors\" : [\n {\n \"lowercase\" : {\n \"field\" : \"message\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/lowercase_message_field",
- "query": null,
- "body": {
- "description": "Lowercases the message field value",
- "processors": [
- {
- "lowercase": {
- "field": "message"
- }
- }
- ]
- },
- "params": {
- "id": "lowercase_message_field"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 161
- },
- "digest": "effffb3ef22c1e5cdfd38260d8578871",
- "lang": "console",
- "found": [],
- "source": "POST /logs/_doc?pipeline=lowercase_message_field\n{\n \"@timestamp\": \"2020-12-08T11:12:01.000Z\",\n \"user\": {\n \"id\": \"I1YBEOxJ\"\n },\n \"message\": \"LOGIN Successful\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs/_doc",
- "query": {
- "pipeline": "lowercase_message_field"
- },
- "body": {
- "@timestamp": "2020-12-08T11:12:01.000Z",
- "user": {
- "id": "I1YBEOxJ"
- },
- "message": "LOGIN Successful"
- },
- "params": {
- "index": "logs"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 204
- },
- "digest": "fe6d566ed541950cb273729eac3eced5",
- "lang": "console",
- "found": [],
- "source": "GET /logs/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n \"should\": {\n \"match\": {\n \"message\": \"login successful\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "range": {
- "@timestamp": {
- "gte": "now-1d/d",
- "lt": "now/d"
- }
- }
- },
- "should": {
- "match": {
- "message": "login successful"
- }
- }
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 238
- },
- "digest": "e86ae61a4574076cbdbcc003650f6929",
- "lang": "console",
- "found": [],
- "source": "GET /logs,logs_alt/_search\n{\n \"query\": {\n \"match\": {\n \"user.id\": \"8a4f500d\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logs,logs_alt/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user.id": "8a4f500d"
- }
- }
- },
- "params": {
- "index": "logs,logs_alt"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 252
- },
- "digest": "58a1c65842b90f2be6261507705852b5",
- "lang": "console",
- "found": [],
- "source": "GET /logs*/_search\n{\n \"query\": {\n \"match\": {\n \"user.id\": \"vlb44hny\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logs*/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user.id": "vlb44hny"
- }
- }
- },
- "params": {
- "index": "logs*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 267
- },
- "digest": "b03da9937ba8d9b354479e24bbb0268d",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match\": {\n \"user.id\": \"l7gk7f82\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user.id": "l7gk7f82"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 304
- },
- "digest": "1311af3d6ce524cf7bf6bbc6438e6632",
- "lang": "console",
- "found": [],
- "source": "POST /logs/_rollover/",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs/_rollover/",
- "query": null,
- "body": null,
- "params": {
- "alias": "logs"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 339
- },
- "digest": "6a5043d1d046a30a35409e8892b43fca",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/indices/logs?v&s=index&h=index,status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/indices/logs",
- "query": {
- "v": true,
- "s": "index",
- "h": "index,status"
- },
- "body": null,
- "params": {
- "index": "logs"
- },
- "api": "cat.indices"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 362
- },
- "digest": "f2c8bff4454dc5302ba98791295e845c",
- "lang": "console",
- "found": [],
- "source": "POST /logs/_open/",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs/_open/",
- "query": null,
- "body": null,
- "params": {
- "index": "logs"
- },
- "api": "indices.open"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 371
- },
- "digest": "6a5043d1d046a30a35409e8892b43fca",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/indices/logs?v&s=index&h=index,status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/indices/logs",
- "query": {
- "v": true,
- "s": "index",
- "h": "index,status"
- },
- "body": null,
- "params": {
- "index": "logs"
- },
- "api": "cat.indices"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 451
- },
- "digest": "37df24537144741d90033446aad57c54",
- "lang": "console",
- "found": [],
- "source": "POST /_reindex\n{\n \"source\": {\n \"index\": \"archive\"\n },\n \"dest\": {\n \"index\": \"logs\",\n \"op_type\": \"create\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "archive"
- },
- "dest": {
- "index": "logs",
- "op_type": "create"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 477
- },
- "digest": "d473d961c65d13ca7cfc3e29c6ad8445",
- "lang": "console",
- "found": [],
- "source": "POST /_reindex\n{\n \"source\": {\n \"index\": \"logs\"\n },\n \"dest\": {\n \"index\": \"archive\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "logs"
- },
- "dest": {
- "index": "archive"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 509
- },
- "digest": "3c2e8bca9ab0e87c259dffb6e4b8112f",
- "lang": "console",
- "found": [],
- "source": "POST /logs/_update_by_query\n{\n \"query\": {\n \"match\": {\n \"user.id\": \"l7gk7f82\"\n }\n },\n \"script\": {\n \"source\": \"ctx._source.user.id = params.new_id\",\n \"params\": {\n \"new_id\": \"XgdX0NoX\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs/_update_by_query",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user.id": "l7gk7f82"
- }
- },
- "script": {
- "source": "ctx._source.user.id = params.new_id",
- "params": {
- "new_id": "XgdX0NoX"
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 536
- },
- "digest": "357f4038f55d8fe06ac868066c8dc143",
- "lang": "console",
- "found": [],
- "source": "POST /logs/_delete_by_query\n{\n \"query\": {\n \"match\": {\n \"user.id\": \"vlb44hny\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs/_delete_by_query",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user.id": "vlb44hny"
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 577
- },
- "digest": "c0fe32f4b64bb6a5775c1dc56f881340",
- "lang": "console",
- "found": [],
- "source": "GET /logs/_search\n{\n \"seq_no_primary_term\": true,\n \"query\": {\n \"match\": {\n \"user.id\": \"yWIumJd7\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "seq_no_primary_term": true,
- "query": {
- "match": {
- "user.id": "yWIumJd7"
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 593
- },
- "digest": "cc5845b6fcbd9581f997aa69c741c35f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 20,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 3,\n \"successful\": 3,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.2876821,\n \"hits\": [\n {\n \"_index\": \".ds-logs-000003\", <1>\n \"_id\": \"bfspvnIBr7VVZlfp2lqX\", <2>\n \"_seq_no\": 0, <3>\n \"_primary_term\": 1, <4>\n \"_score\": 0.2876821,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:06:07.000Z\",\n \"user\": {\n \"id\": \"yWIumJd7\"\n },\n \"message\": \"Login successful\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 654
- },
- "digest": "5674aa7a485daf5e9b0e3bc5ff1fe392",
- "lang": "console",
- "found": [],
- "source": "PUT /.ds-logs-000003/_doc/bfspvnIBr7VVZlfp2lqX?if_seq_no=0&if_primary_term=1\n{\n \"@timestamp\": \"2020-12-07T11:06:07.000Z\",\n \"user\": {\n \"id\": \"8a4f500d\"\n },\n \"message\": \"Login successful\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/.ds-logs-000003/_doc/bfspvnIBr7VVZlfp2lqX",
- "query": {
- "if_seq_no": "0",
- "if_primary_term": "1"
- },
- "body": {
- "@timestamp": "2020-12-07T11:06:07.000Z",
- "user": {
- "id": "8a4f500d"
- },
- "message": "Login successful"
- },
- "params": {
- "index": ".ds-logs-000003",
- "id": "bfspvnIBr7VVZlfp2lqX"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 677
- },
- "digest": "24e7b9e87b9aeb221e206b640b6f5cb9",
- "lang": "console",
- "found": [],
- "source": "DELETE /.ds-logs-000003/_doc/bfspvnIBr7VVZlfp2lqX",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/.ds-logs-000003/_doc/bfspvnIBr7VVZlfp2lqX",
- "query": null,
- "body": null,
- "params": {
- "index": ".ds-logs-000003",
- "id": "bfspvnIBr7VVZlfp2lqX"
- },
- "api": "delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/use-a-data-stream.asciidoc",
- "line": 701
- },
- "digest": "6c8bc724b661046efb7b6b24a1d345c3",
- "lang": "console",
- "found": [],
- "source": "PUT /_bulk?refresh\n{ \"index\": { \"_index\": \".ds-logs-000003\", \"_id\": \"bfspvnIBr7VVZlfp2lqX\", \"if_seq_no\": 0, \"if_primary_term\": 1 } }\n{ \"@timestamp\": \"2020-12-07T11:06:07.000Z\", \"user\": { \"id\": \"8a4f500d\" }, \"message\": \"Login successful\" }",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_index": ".ds-logs-000003",
- "_id": "bfspvnIBr7VVZlfp2lqX",
- "if_seq_no": 0,
- "if_primary_term": 1
- }
- },
- {
- "@timestamp": "2020-12-07T11:06:07.000Z",
- "user": {
- "id": "8a4f500d"
- },
- "message": "Login successful"
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 119
- },
- "digest": "9a3c5c15f123944b250f1e116615120e",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/logs_data_stream\n{\n \"index_patterns\": [ \"logs*\" ],\n \"data_stream\": {},\n \"template\": {\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n },\n \"message\": { <1>\n \"type\": \"text\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/logs_data_stream",
- "query": null,
- "body": {
- "index_patterns": [
- "logs*"
- ],
- "data_stream": {},
- "template": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- },
- "message": {
- "type": "text"
- }
- }
- }
- }
- },
- "params": {
- "name": "logs_data_stream"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 152
- },
- "digest": "e13621211b3669c0c053ce93bd01e26a",
- "lang": "console",
- "found": [],
- "source": "PUT /logs/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"text\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs/_mapping",
- "query": null,
- "body": {
- "properties": {
- "message": {
- "type": "text"
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 186
- },
- "digest": "c47d4a47dc602e9af0aed3bc87a974d0",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/logs_data_stream\n{\n \"index_patterns\": [ \"logs*\" ],\n \"data_stream\": {},\n \"template\": {\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n },\n \"host\": {\n \"properties\": {\n \"ip\": {\n \"type\": \"ip\",\n \"ignore_malformed\": true <1>\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/logs_data_stream",
- "query": null,
- "body": {
- "index_patterns": [
- "logs*"
- ],
- "data_stream": {},
- "template": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- },
- "host": {
- "properties": {
- "ip": {
- "type": "ip",
- "ignore_malformed": true
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "name": "logs_data_stream"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 225
- },
- "digest": "3403c1a9cd528ad74464541260dca4c6",
- "lang": "console",
- "found": [],
- "source": "PUT /logs/_mapping\n{\n \"properties\": {\n \"host\": {\n \"properties\": {\n \"ip\": {\n \"type\": \"ip\",\n \"ignore_malformed\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs/_mapping",
- "query": null,
- "body": {
- "properties": {
- "host": {
- "properties": {
- "ip": {
- "type": "ip",
- "ignore_malformed": true
- }
- }
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 270
- },
- "digest": "09159a4b8a1b1ff9fc79e6fa91f4b20b",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/logs_data_stream\n{\n \"index_patterns\": [ \"logs*\" ],\n \"data_stream\": {},\n \"template\": {\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n },\n \"settings\": {\n \"index.refresh_interval\": \"30s\" <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/logs_data_stream",
- "query": null,
- "body": {
- "index_patterns": [
- "logs*"
- ],
- "data_stream": {},
- "template": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- },
- "settings": {
- "index.refresh_interval": "30s"
- }
- }
- },
- "params": {
- "name": "logs_data_stream"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 303
- },
- "digest": "a7efe98baa728421cc3d367ab30ae01f",
- "lang": "console",
- "found": [],
- "source": "PUT /logs/_settings\n{\n \"index\": {\n \"refresh_interval\": \"30s\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs/_settings",
- "query": null,
- "body": {
- "index": {
- "refresh_interval": "30s"
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 334
- },
- "digest": "9640b10c4aca675bd8cdcfdf0c699b54",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/logs_data_stream\n{\n \"index_patterns\": [ \"logs*\" ],\n \"data_stream\": {},\n \"template\": {\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n },\n \"settings\": {\n \"sort.field\": [ \"@timestamp\"], <1>\n \"sort.order\": [ \"desc\"] <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/logs_data_stream",
- "query": null,
- "body": {
- "index_patterns": [
- "logs*"
- ],
- "data_stream": {},
- "template": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- },
- "settings": {
- "sort.field": [
- "@timestamp"
- ],
- "sort.order": [
- "desc"
- ]
- }
- }
- },
- "params": {
- "name": "logs_data_stream"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 399
- },
- "digest": "ee5060d63a1b93aef6a4a879b647b4d4",
- "lang": "console",
- "found": [],
- "source": "GET /_resolve/index/new_logs*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_resolve/index/new_logs*",
- "query": null,
- "body": null,
- "params": {
- "name": "new_logs*"
- },
- "api": "indices.resolve_index"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 407
- },
- "digest": "4a056693dcd998a6b66a73f115d43239",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": [ ],\n \"aliases\": [ ],\n \"data_streams\": [ ]\n}"
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 447
- },
- "digest": "509462b39041e5a733f3350b71dec82b",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/new_logs_data_stream\n{\n \"index_patterns\": [ \"new_logs*\" ],\n \"data_stream\": {},\n \"template\": {\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date_nanos\" <1>\n }\n }\n },\n \"settings\": {\n \"sort.field\": [ \"@timestamp\"], <2>\n \"sort.order\": [ \"desc\"] <3>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/new_logs_data_stream",
- "query": null,
- "body": {
- "index_patterns": [
- "new_logs*"
- ],
- "data_stream": {},
- "template": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date_nanos"
- }
- }
- },
- "settings": {
- "sort.field": [
- "@timestamp"
- ],
- "sort.order": [
- "desc"
- ]
- }
- }
- },
- "params": {
- "name": "new_logs_data_stream"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 500
- },
- "digest": "3ab064461259c1ccc49f719bdbff9d2d",
- "lang": "console",
- "found": [],
- "source": "PUT /_data_stream/new_logs",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_data_stream/new_logs",
- "query": null,
- "body": null,
- "params": {
- "name": "new_logs"
- },
- "api": "indices.create_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 523
- },
- "digest": "a7164a0da5e76e422c6c8252c0699c4d",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"transient\": {\n \"indices.lifecycle.poll_interval\": \"1m\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.lifecycle.poll_interval": "1m"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 554
- },
- "digest": "7e8438023b41733747a2f9976c634f68",
- "lang": "console",
- "found": [],
- "source": "GET /_data_stream/logs",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_data_stream/logs",
- "query": null,
- "body": null,
- "params": {
- "name": "logs"
- },
- "api": "indices.get_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 563
- },
- "digest": "8c783d0d01e81b56dc87cb5e4968723a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"data_streams\": [\n {\n \"name\": \"logs\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-logs-000001\", <1>\n \"index_uuid\": \"Gpdiyq8sRuK9WuthvAdFbw\"\n },\n {\n \"index_name\": \".ds-logs-000002\",\n \"index_uuid\": \"_eEfRrFHS9OyhqWntkgHAQ\"\n }\n ],\n \"generation\": 2,\n \"status\": \"GREEN\",\n \"template\": \"logs_data_stream\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 600
- },
- "digest": "e7ae44963d6adcbbfbe377868cb52b6b",
- "lang": "console",
- "found": [],
- "source": "POST /_reindex\n{\n \"source\": {\n \"index\": \".ds-logs-000001\"\n },\n \"dest\": {\n \"index\": \"new_logs\",\n \"op_type\": \"create\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": ".ds-logs-000001"
- },
- "dest": {
- "index": "new_logs",
- "op_type": "create"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 626
- },
- "digest": "3b6c9619b318fd4ebd8db984faef41b7",
- "lang": "console",
- "found": [],
- "source": "POST /_reindex\n{\n \"source\": {\n \"index\": \"logs\",\n \"query\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-7d/d\",\n \"lte\": \"now/d\"\n }\n }\n }\n },\n \"dest\": {\n \"index\": \"new_logs\",\n \"op_type\": \"create\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "logs",
- "query": {
- "range": {
- "@timestamp": {
- "gte": "now-7d/d",
- "lte": "now/d"
- }
- }
- }
- },
- "dest": {
- "index": "new_logs",
- "op_type": "create"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 659
- },
- "digest": "97d3523e74b9c0121f28907f5545c22c",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"transient\": {\n \"indices.lifecycle.poll_interval\": null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.lifecycle.poll_interval": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "data-streams/change-mappings-and-settings.asciidoc",
- "line": 683
- },
- "digest": "9c863e1f9c2e91f78b6486ccb9cb42e7",
- "lang": "console",
- "found": [],
- "source": "DELETE /_data_stream/logs",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_data_stream/logs",
- "query": null,
- "body": null,
- "params": {
- "name": "logs"
- },
- "api": "indices.delete_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/run-a-search.asciidoc",
- "line": 42
- },
- "digest": "07f136f15a9021d6dcb1e1598a9be91d",
- "lang": "console",
- "found": [],
- "source": "PUT /user_logs_000001/_bulk?refresh\n{\"index\":{\"_index\" : \"user_logs_000001\", \"_id\" : \"1\"}}\n{ \"@timestamp\": \"2020-12-06T11:04:05.000Z\", \"user\": { \"id\": \"vlb44hny\" }, \"message\": \"Login attempt failed\" }\n{\"index\":{\"_index\" : \"user_logs_000001\", \"_id\" : \"2\"}}\n{ \"@timestamp\": \"2020-12-07T11:06:07.000Z\", \"user\": { \"id\": \"8a4f500d\" }, \"message\": \"Login successful\" }\n{\"index\":{\"_index\" : \"user_logs_000001\", \"_id\" : \"3\"}}\n{ \"@timestamp\": \"2020-12-07T11:07:08.000Z\", \"user\": { \"id\": \"l7gk7f82\" }, \"message\": \"Logout successful\" }",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/user_logs_000001/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_index": "user_logs_000001",
- "_id": "1"
- }
- },
- {
- "@timestamp": "2020-12-06T11:04:05.000Z",
- "user": {
- "id": "vlb44hny"
- },
- "message": "Login attempt failed"
- },
- {
- "index": {
- "_index": "user_logs_000001",
- "_id": "2"
- }
- },
- {
- "@timestamp": "2020-12-07T11:06:07.000Z",
- "user": {
- "id": "8a4f500d"
- },
- "message": "Login successful"
- },
- {
- "index": {
- "_index": "user_logs_000001",
- "_id": "3"
- }
- },
- {
- "@timestamp": "2020-12-07T11:07:08.000Z",
- "user": {
- "id": "l7gk7f82"
- },
- "message": "Logout successful"
- }
- ],
- "params": {
- "index": "user_logs_000001"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/run-a-search.asciidoc",
- "line": 58
- },
- "digest": "8d841549879130ec46be9c2a56ab3e8b",
- "lang": "console",
- "found": [],
- "source": "GET /user_logs_000001/_search?q=user.id:8a4f500d",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/user_logs_000001/_search",
- "query": {
- "q": "user.id:8a4f500d"
- },
- "body": null,
- "params": {
- "index": "user_logs_000001"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/run-a-search.asciidoc",
- "line": 67
- },
- "digest": "a5b21915a24a0c4ff94b065b50f06a73",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 2,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.9808291,\n \"hits\": [\n {\n \"_index\": \"user_logs_000001\",\n \"_id\": \"2\",\n \"_score\": 0.9808291,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:06:07.000Z\",\n \"user\": {\n \"id\": \"8a4f500d\"\n },\n \"message\": \"Login successful\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/run-a-search.asciidoc",
- "line": 119
- },
- "digest": "8c711ea9d86aee29cadcf556e3ad1615",
- "lang": "console",
- "found": [],
- "source": "GET /user_logs_000001/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"login successful\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/user_logs_000001/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "login successful"
- }
- }
- },
- "params": {
- "index": "user_logs_000001"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/run-a-search.asciidoc",
- "line": 138
- },
- "digest": "33ebb5c0ddd8217e0619be324325fe27",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 1,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.9983525,\n \"hits\": [\n {\n \"_index\": \"user_logs_000001\",\n \"_id\": \"2\",\n \"_score\": 0.9983525,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:06:07.000Z\",\n \"user\": {\n \"id\": \"8a4f500d\"\n },\n \"message\": \"Login successful\"\n }\n },\n {\n \"_index\": \"user_logs_000001\",\n \"_id\": \"3\",\n \"_score\": 0.49917626,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:07:08.000Z\",\n \"user\": {\n \"id\": \"l7gk7f82\"\n },\n \"message\": \"Logout successful\"\n }\n },\n {\n \"_index\": \"user_logs_000001\",\n \"_id\": \"1\",\n \"_score\": 0.42081726,\n \"_source\": {\n \"@timestamp\": \"2020-12-06T11:04:05.000Z\",\n \"user\": {\n \"id\": \"vlb44hny\"\n },\n \"message\": \"Login attempt failed\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/run-a-search.asciidoc",
- "line": 212
- },
- "digest": "52429c9be200a725ef6a088ebc7d64bc",
- "lang": "console",
- "found": [],
- "source": "GET /user_logs_000001,user_logs_000002/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"login successful\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/user_logs_000001,user_logs_000002/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "login successful"
- }
- }
- },
- "params": {
- "index": "user_logs_000001,user_logs_000002"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/run-a-search.asciidoc",
- "line": 236
- },
- "digest": "efc9883d5b4bb2244487de1089220844",
- "lang": "console",
- "found": [],
- "source": "GET /user_logs*/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"login successful\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/user_logs*/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "login successful"
- }
- }
- },
- "params": {
- "index": "user_logs*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/run-a-search.asciidoc",
- "line": 258
- },
- "digest": "20361b63921d2ac82e1e22c1bcf68de5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"login successful\"\n }\n }\n}\n\nGET /_all/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"login successful\"\n }\n }\n}\n\nGET /*/_search\n{\n \"query\" : {\n \"match\" : { \"message\" : \"login\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "login successful"
- }
- }
- },
- "params": null,
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/_all/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "login successful"
- }
- }
- },
- "params": {
- "index": "_all"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/*/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "login"
- }
- }
- },
- "params": {
- "index": "*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/from-size.asciidoc",
- "line": 22
- },
- "digest": "1e50d993bd6517e6c381e82d09f0389e",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"from\": 5,\n \"size\": 20,\n \"query\": {\n \"term\": {\n \"user.id\": \"8a4f500d\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "from": 5,
- "size": 20,
- "query": {
- "term": {
- "user.id": "8a4f500d"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-fields.asciidoc",
- "line": 49
- },
- "digest": "27e19bcb00dd4a192920eb809f6299e4",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"_source\": false,\n \"query\": {\n \"term\": {\n \"user.id\": \"8a4f500d\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "_source": false,
- "query": {
- "term": {
- "user.id": "8a4f500d"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-fields.asciidoc",
- "line": 66
- },
- "digest": "e12cf31e59a19ee8453909c237809a8f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"_source\": \"obj.*\",\n \"query\": {\n \"term\": {\n \"user.id\": \"8a4f500d\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "_source": "obj.*",
- "query": {
- "term": {
- "user.id": "8a4f500d"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-fields.asciidoc",
- "line": 83
- },
- "digest": "536d54ca973cd7b19b797a4b25c2e404",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"_source\": [ \"obj1.*\", \"obj2.*\" ],\n \"query\": {\n \"term\": {\n \"user.id\": \"8a4f500d\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "_source": [
- "obj1.*",
- "obj2.*"
- ],
- "query": {
- "term": {
- "user.id": "8a4f500d"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-fields.asciidoc",
- "line": 109
- },
- "digest": "85e2c00ea9adf834952a54e69b14cbf5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"_source\": {\n \"includes\": [ \"obj1.*\", \"obj2.*\" ],\n \"excludes\": [ \"*.description\" ]\n },\n \"query\": {\n \"term\": {\n \"user.id\": \"8a4f500d\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "_source": {
- "includes": [
- "obj1.*",
- "obj2.*"
- ],
- "excludes": [
- "*.description"
- ]
- },
- "query": {
- "term": {
- "user.id": "8a4f500d"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-fields.asciidoc",
- "line": 153
- },
- "digest": "e443e6c04bd38e54205f6485e67105d8",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_all\": {}\n },\n \"docvalue_fields\": [\n \"my_ip*\", <1>\n {\n \"field\": \"my_keyword_field\" <2>\n },\n {\n \"field\": \"*_date_field\",\n \"format\": \"epoch_millis\" <3>\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "docvalue_fields": [
- "my_ip*",
- {
- "field": "my_keyword_field"
- },
- {
- "field": "*_date_field",
- "format": "epoch_millis"
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 35
- },
- "digest": "a8d39396d741e768083808bb11443e9b",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"cluster_one\": {\n \"seeds\": [\n \"127.0.0.1:9300\"\n ]\n },\n \"cluster_two\": {\n \"seeds\": [\n \"127.0.0.1:9301\"\n ]\n },\n \"cluster_three\": {\n \"seeds\": [\n \"127.0.0.1:9302\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "cluster_one": {
- "seeds": [
- "127.0.0.1:9300"
- ]
- },
- "cluster_two": {
- "seeds": [
- "127.0.0.1:9301"
- ]
- },
- "cluster_three": {
- "seeds": [
- "127.0.0.1:9302"
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 72
- },
- "digest": "972c0c1b6c0b8327fadd77cc1c71b532",
- "lang": "console",
- "found": [],
- "source": "GET /cluster_one:twitter/_search\n{\n \"query\": {\n \"match\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/cluster_one:twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "cluster_one:twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 88
- },
- "digest": "406b27ffe91927d52e03fd104b58c6d1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 150,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0,\n \"skipped\": 0\n },\n \"_clusters\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1,\n \"hits\": [\n {\n \"_index\": \"cluster_one:twitter\", <1>\n \"_id\": \"0\",\n \"_score\": 1,\n \"_source\": {\n \"user\": \"kimchy\",\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"likes\": 0\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 143
- },
- "digest": "6a570214755e38fd587e406d5b19b371",
- "lang": "console",
- "found": [],
- "source": "GET /twitter,cluster_one:twitter,cluster_two:twitter/_search\n{\n \"query\": {\n \"match\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter,cluster_one:twitter,cluster_two:twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter,cluster_one:twitter,cluster_two:twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 158
- },
- "digest": "995347a8d6d131a9c0a664a357afcf1f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 150,\n \"timed_out\": false,\n \"num_reduce_phases\": 4,\n \"_shards\": {\n \"total\": 3,\n \"successful\": 3,\n \"failed\": 0,\n \"skipped\": 0\n },\n \"_clusters\": {\n \"total\": 3,\n \"successful\": 3,\n \"skipped\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": 1,\n \"hits\": [\n {\n \"_index\": \"twitter\", <1>\n \"_id\": \"0\",\n \"_score\": 2,\n \"_source\": {\n \"user\": \"kimchy\",\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"likes\": 0\n }\n },\n {\n \"_index\": \"cluster_one:twitter\", <2>\n \"_id\": \"0\",\n \"_score\": 1,\n \"_source\": {\n \"user\": \"kimchy\",\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"likes\": 0\n }\n },\n {\n \"_index\": \"cluster_two:twitter\", <3>\n \"_id\": \"0\",\n \"_score\": 1,\n \"_source\": {\n \"user\": \"kimchy\",\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"likes\": 0\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "modules/cross-cluster-search.asciidoc",
- "line": 242
- },
- "digest": "9949bcc64c9cd6f4041819546d7fce78",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.remote.cluster_two.skip_unavailable\": true\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.remote.cluster_two.skip_unavailable": true
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query_filter_context.asciidoc",
- "line": 62
- },
- "digest": "f29a28fffa7ec604a33a838f48f7ea79",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": { <1>\n \"bool\": { <2>\n \"must\": [\n { \"match\": { \"title\": \"Search\" }},\n { \"match\": { \"content\": \"Elasticsearch\" }}\n ],\n \"filter\": [ <3>\n { \"term\": { \"status\": \"published\" }},\n { \"range\": { \"publish_date\": { \"gte\": \"2015-01-01\" }}}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "title": "Search"
- }
- },
- {
- "match": {
- "content": "Elasticsearch"
- }
- }
- ],
- "filter": [
- {
- "term": {
- "status": "published"
- }
- },
- {
- "range": {
- "publish_date": {
- "gte": "2015-01-01"
- }
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/bool-query.asciidoc",
- "line": 36
- },
- "digest": "06afce2955f9094d96d27067ebca32e8",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n },\n \"filter\": {\n \"term\" : { \"tag\" : \"tech\" }\n },\n \"must_not\" : {\n \"range\" : {\n \"age\" : { \"gte\" : 10, \"lte\" : 20 }\n }\n },\n \"should\" : [\n { \"term\" : { \"tag\" : \"wow\" } },\n { \"term\" : { \"tag\" : \"elasticsearch\" } }\n ],\n \"minimum_should_match\" : 1,\n \"boost\" : 1.0\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "term": {
- "user": "kimchy"
- }
- },
- "filter": {
- "term": {
- "tag": "tech"
- }
- },
- "must_not": {
- "range": {
- "age": {
- "gte": 10,
- "lte": 20
- }
- }
- },
- "should": [
- {
- "term": {
- "tag": "wow"
- }
- },
- {
- "term": {
- "tag": "elasticsearch"
- }
- }
- ],
- "minimum_should_match": 1,
- "boost": 1
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/bool-query.asciidoc",
- "line": 88
- },
- "digest": "f70a54cd9a9f4811bf962e469f2ca2ea",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _search\n{\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"term\": {\n \"status\": \"active\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "active"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/bool-query.asciidoc",
- "line": 107
- },
- "digest": "fa88f6f5a7d728ec4f1d05244228cb09",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _search\n{\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match_all\": {}\n },\n \"filter\": {\n \"term\": {\n \"status\": \"active\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "term": {
- "status": "active"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/bool-query.asciidoc",
- "line": 130
- },
- "digest": "162b5b693b713f0bfab1209d59443c46",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _search\n{\n \"query\": {\n \"constant_score\": {\n \"filter\": {\n \"term\": {\n \"status\": \"active\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "term": {
- "status": "active"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/boosting-query.asciidoc",
- "line": 18
- },
- "digest": "292e4c6567378fc7b70033b53b04ce12",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"boosting\" : {\n \"positive\" : {\n \"term\" : {\n \"text\" : \"apple\"\n }\n },\n \"negative\" : {\n \"term\" : {\n \"text\" : \"pie tart fruit crumble tree\"\n }\n },\n \"negative_boost\" : 0.5\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "boosting": {
- "positive": {
- "term": {
- "text": "apple"
- }
- },
- "negative": {
- "term": {
- "text": "pie tart fruit crumble tree"
- }
- },
- "negative_boost": 0.5
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/constant-score-query.asciidoc",
- "line": 12
- },
- "digest": "d59a084640acf2f5c51d3068d38b5fc0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"constant_score\" : {\n \"filter\" : {\n \"term\" : { \"user\" : \"kimchy\"}\n },\n \"boost\" : 1.2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "term": {
- "user": "kimchy"
- }
- },
- "boost": 1.2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/dis-max-query.asciidoc",
- "line": 18
- },
- "digest": "fcf5a593cfe8809d98a5239ad9c82038",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"dis_max\" : {\n \"queries\" : [\n { \"term\" : { \"title\" : \"Quick pets\" }},\n { \"term\" : { \"body\" : \"Quick pets\" }}\n ],\n \"tie_breaker\" : 0.7\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "dis_max": {
- "queries": [
- {
- "term": {
- "title": "Quick pets"
- }
- },
- {
- "term": {
- "body": "Quick pets"
- }
- }
- ],
- "tie_breaker": 0.7
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 19
- },
- "digest": "a42f33e15b0995bb4b6058659bfdea85",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": { \"match_all\": {} },\n \"boost\": \"5\",\n \"random_score\": {}, <1>\n \"boost_mode\":\"multiply\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match_all": {}
- },
- "boost": "5",
- "random_score": {},
- "boost_mode": "multiply"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 41
- },
- "digest": "b4a0d0ed512dffc10ee53bca2feca49b",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": { \"match_all\": {} },\n \"boost\": \"5\", <1>\n \"functions\": [\n {\n \"filter\": { \"match\": { \"test\": \"bar\" } },\n \"random_score\": {}, <2>\n \"weight\": 23\n },\n {\n \"filter\": { \"match\": { \"test\": \"cat\" } },\n \"weight\": 42\n }\n ],\n \"max_boost\": 42,\n \"score_mode\": \"max\",\n \"boost_mode\": \"multiply\",\n \"min_score\" : 42\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match_all": {}
- },
- "boost": "5",
- "functions": [
- {
- "filter": {
- "match": {
- "test": "bar"
- }
- },
- "random_score": {},
- "weight": 23
- },
- {
- "filter": {
- "match": {
- "test": "cat"
- }
- },
- "weight": 42
- }
- ],
- "max_boost": 42,
- "score_mode": "max",
- "boost_mode": "multiply",
- "min_score": 42
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 137
- },
- "digest": "ec473de07fe89bcbac1f8e278617fe46",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": {\n \"match\": { \"message\": \"elasticsearch\" }\n },\n \"script_score\" : {\n \"script\" : {\n \"source\": \"Math.log(2 + doc['likes'].value)\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "script_score": {
- "script": {
- "source": "Math.log(2 + doc['likes'].value)"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 175
- },
- "digest": "b68c85fe1b0d2f264dc0d1cbf530f319",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": {\n \"match\": { \"message\": \"elasticsearch\" }\n },\n \"script_score\" : {\n \"script\" : {\n \"params\": {\n \"a\": 5,\n \"b\": 1.2\n },\n \"source\": \"params.a / Math.pow(params.b, doc['likes'].value)\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "script_score": {
- "script": {
- "params": {
- "a": 5,
- "b": 1.2
- },
- "source": "params.a / Math.pow(params.b, doc['likes'].value)"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 241
- },
- "digest": "645c4c6e209719d3a4d25b1a629cb23b",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"random_score\": {\n \"seed\": 10,\n \"field\": \"_seq_no\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "random_score": {
- "seed": 10,
- "field": "_seq_no"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 269
- },
- "digest": "8eaf4d5dd4ab1335deefa7749fdbbcc3",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"field_value_factor\": {\n \"field\": \"likes\",\n \"factor\": 1.2,\n \"modifier\": \"sqrt\",\n \"missing\": 1\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "field_value_factor": {
- "field": "likes",
- "factor": 1.2,
- "modifier": "sqrt",
- "missing": 1
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 380
- },
- "digest": "ec27afee074001b0e4e393611010842b",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"gauss\": {\n \"date\": {\n \"origin\": \"2013-09-17\", <1>\n \"scale\": \"10d\",\n \"offset\": \"5d\", <2>\n \"decay\" : 0.5 <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "gauss": {
- "date": {
- "origin": "2013-09-17",
- "scale": "10d",
- "offset": "5d",
- "decay": 0.5
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/function-score-query.asciidoc",
- "line": 578
- },
- "digest": "df17f920b0deab3529b98df88b781f55",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"function_score\": {\n \"functions\": [\n {\n \"gauss\": {\n \"price\": {\n \"origin\": \"0\",\n \"scale\": \"20\"\n }\n }\n },\n {\n \"gauss\": {\n \"location\": {\n \"origin\": \"11, 12\",\n \"scale\": \"2km\"\n }\n }\n }\n ],\n \"query\": {\n \"match\": {\n \"properties\": \"balcony\"\n }\n },\n \"score_mode\": \"multiply\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "functions": [
- {
- "gauss": {
- "price": {
- "origin": "0",
- "scale": "20"
- }
- }
- },
- {
- "gauss": {
- "location": {
- "origin": "11, 12",
- "scale": "2km"
- }
- }
- }
- ],
- "query": {
- "match": {
- "properties": "balcony"
- }
- },
- "score_mode": "multiply"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 28
- },
- "digest": "807c0c9763f8c1114b3c8278c2a0cb56",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"all_of\" : {\n \"ordered\" : true,\n \"intervals\" : [\n {\n \"match\" : {\n \"query\" : \"my favorite food\",\n \"max_gaps\" : 0,\n \"ordered\" : true\n }\n },\n {\n \"any_of\" : {\n \"intervals\" : [\n { \"match\" : { \"query\" : \"hot water\" } },\n { \"match\" : { \"query\" : \"cold porridge\" } }\n ]\n }\n }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "all_of": {
- "ordered": true,
- "intervals": [
- {
- "match": {
- "query": "my favorite food",
- "max_gaps": 0,
- "ordered": true
- }
- },
- {
- "any_of": {
- "intervals": [
- {
- "match": {
- "query": "hot water"
- }
- },
- {
- "match": {
- "query": "cold porridge"
- }
- }
- ]
- }
- }
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 312
- },
- "digest": "7471e97aaaf21c3a200abdd89f15c3cc",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"match\" : {\n \"query\" : \"hot porridge\",\n \"max_gaps\" : 10,\n \"filter\" : {\n \"not_containing\" : {\n \"match\" : {\n \"query\" : \"salty\"\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "match": {
- "query": "hot porridge",
- "max_gaps": 10,
- "filter": {
- "not_containing": {
- "match": {
- "query": "salty"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 343
- },
- "digest": "2de6885bacb8769b8f22dce253c96b0c",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"match\" : {\n \"query\" : \"hot porridge\",\n \"filter\" : {\n \"script\" : {\n \"source\" : \"interval.start > 10 && interval.end < 20 && interval.gaps == 0\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "match": {
- "query": "hot porridge",
- "filter": {
- "script": {
- "source": "interval.start > 10 && interval.end < 20 && interval.gaps == 0"
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 374
- },
- "digest": "e2a22c6fd58cc0becf4c383134a08f8b",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"match\" : {\n \"query\" : \"salty\",\n \"filter\" : {\n \"contained_by\" : {\n \"match\" : {\n \"query\" : \"hot porridge\"\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "match": {
- "query": "salty",
- "filter": {
- "contained_by": {
- "match": {
- "query": "hot porridge"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 409
- },
- "digest": "5f79c42b0f74fdf71359cef82843fad3",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"all_of\" : {\n \"intervals\" : [\n { \"match\" : { \"query\" : \"the\" } },\n { \"any_of\" : {\n \"intervals\" : [\n { \"match\" : { \"query\" : \"big\" } },\n { \"match\" : { \"query\" : \"big bad\" } }\n ] } },\n { \"match\" : { \"query\" : \"wolf\" } }\n ],\n \"max_gaps\" : 0,\n \"ordered\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "all_of": {
- "intervals": [
- {
- "match": {
- "query": "the"
- }
- },
- {
- "any_of": {
- "intervals": [
- {
- "match": {
- "query": "big"
- }
- },
- {
- "match": {
- "query": "big bad"
- }
- }
- ]
- }
- },
- {
- "match": {
- "query": "wolf"
- }
- }
- ],
- "max_gaps": 0,
- "ordered": true
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/intervals-query.asciidoc",
- "line": 442
- },
- "digest": "e7811867397b305efbbe8925d8a01c1a",
- "lang": "console",
- "found": [],
- "source": "POST _search\n{\n \"query\": {\n \"intervals\" : {\n \"my_text\" : {\n \"any_of\" : {\n \"intervals\" : [\n { \"match\" : {\n \"query\" : \"the big bad wolf\",\n \"ordered\" : true,\n \"max_gaps\" : 0 } },\n { \"match\" : {\n \"query\" : \"the big wolf\",\n \"ordered\" : true,\n \"max_gaps\" : 0 } }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "intervals": {
- "my_text": {
- "any_of": {
- "intervals": [
- {
- "match": {
- "query": "the big bad wolf",
- "ordered": true,
- "max_gaps": 0
- }
- },
- {
- "match": {
- "query": "the big wolf",
- "ordered": true,
- "max_gaps": 0
- }
- }
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 18
- },
- "digest": "e0d6e02b998bdea99c9c08dcc3630c5e",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : {\n \"query\" : \"this is a test\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "this is a test"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 150
- },
- "digest": "fa2fe60f570bd930d2891778c6efbfe6",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : \"this is a test\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "this is a test"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 175
- },
- "digest": "6138d6919f3cbaaf61e1092f817d295c",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : {\n \"query\" : \"this is a test\",\n \"operator\" : \"and\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "this is a test",
- "operator": "and"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 219
- },
- "digest": "5043b83a89091fa00edb341ddf7ba370",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : {\n \"query\" : \"this is a testt\",\n \"fuzziness\": \"AUTO\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "this is a testt",
- "fuzziness": "AUTO"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 241
- },
- "digest": "0ac9916f47a2483b89c1416684af322a",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\" : {\n \"query\" : \"to be or not to be\",\n \"operator\" : \"and\",\n \"zero_terms_query\": \"all\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "to be or not to be",
- "operator": "and",
- "zero_terms_query": "all"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-query.asciidoc",
- "line": 268
- },
- "digest": "7f56755fb6c42f7e6203339a6d0cb6e6",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match\" : {\n \"message\": {\n \"query\" : \"ny city\",\n \"auto_generate_synonyms_phrase_query\" : false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "ny city",
- "auto_generate_synonyms_phrase_query": false
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-bool-prefix-query.asciidoc",
- "line": 13
- },
- "digest": "79c7e8a98c47fad3e96c654d34aa049a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_bool_prefix\" : {\n \"message\" : \"quick brown f\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_bool_prefix": {
- "message": "quick brown f"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-bool-prefix-query.asciidoc",
- "line": 28
- },
- "digest": "effc6b4784aca12691de5d5782c0384b",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"should\": [\n { \"term\": { \"message\": \"quick\" }},\n { \"term\": { \"message\": \"brown\" }},\n { \"prefix\": { \"message\": \"f\"}}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "term": {
- "message": "quick"
- }
- },
- {
- "term": {
- "message": "brown"
- }
- },
- {
- "prefix": {
- "message": "f"
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-bool-prefix-query.asciidoc",
- "line": 59
- },
- "digest": "953aab6cbd12a4f034cf02bf34d62a72",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_bool_prefix\" : {\n \"message\": {\n \"query\": \"quick brown f\",\n \"analyzer\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_bool_prefix": {
- "message": {
- "query": "quick brown f",
- "analyzer": "keyword"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-phrase-query.asciidoc",
- "line": 11
- },
- "digest": "83f95657beca9bf5d8264c80c7fb463f",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match_phrase\" : {\n \"message\" : \"this is a test\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "message": "this is a test"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-phrase-query.asciidoc",
- "line": 30
- },
- "digest": "72231b7debac60c95b9869a97dafda3a",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match_phrase\" : {\n \"message\" : {\n \"query\" : \"this is a test\",\n \"analyzer\" : \"my_analyzer\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "message": {
- "query": "this is a test",
- "analyzer": "my_analyzer"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-phrase-prefix-query.asciidoc",
- "line": 22
- },
- "digest": "ca0da81281347e33116710efd36697c8",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"match_phrase_prefix\" : {\n \"message\" : {\n \"query\" : \"quick brown f\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase_prefix": {
- "message": {
- "query": "quick brown f"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 11
- },
- "digest": "53b908c3432118c5a6e460f74d32006b",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"this is a test\", <1>\n \"fields\": [ \"subject\", \"message\" ] <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "this is a test",
- "fields": [
- "subject",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 33
- },
- "digest": "6a1702dd50690cae833572e48a0ddf25",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"fields\": [ \"title\", \"*_name\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Will Smith",
- "fields": [
- "title",
- "*_name"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 50
- },
- "digest": "e30ea6e3823a139d7693d8cce1920a06",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\" : \"this is a test\",\n \"fields\" : [ \"subject^3\", \"message\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "this is a test",
- "fields": [
- "subject^3",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 113
- },
- "digest": "5da6efd5b038ada64c9e853c88c1ec47",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"brown fox\",\n \"type\": \"best_fields\",\n \"fields\": [ \"subject\", \"message\" ],\n \"tie_breaker\": 0.3\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "brown fox",
- "type": "best_fields",
- "fields": [
- "subject",
- "message"
- ],
- "tie_breaker": 0.3
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 130
- },
- "digest": "b0eaf67e5cce24ef8889bf20951ccec1",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"dis_max\": {\n \"queries\": [\n { \"match\": { \"subject\": \"brown fox\" }},\n { \"match\": { \"message\": \"brown fox\" }}\n ],\n \"tie_breaker\": 0.3\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "dis_max": {
- "queries": [
- {
- "match": {
- "subject": "brown fox"
- }
- },
- {
- "match": {
- "message": "brown fox"
- }
- }
- ],
- "tie_breaker": 0.3
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 170
- },
- "digest": "e270f3f721a5712cd11a5ca03554f5b0",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"type\": \"best_fields\",\n \"fields\": [ \"first_name\", \"last_name\" ],\n \"operator\": \"and\" <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Will Smith",
- "type": "best_fields",
- "fields": [
- "first_name",
- "last_name"
- ],
- "operator": "and"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 212
- },
- "digest": "7b908b1189f076942de8cd497ff1fa59",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"quick brown fox\",\n \"type\": \"most_fields\",\n \"fields\": [ \"title\", \"title.original\", \"title.shingles\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "quick brown fox",
- "type": "most_fields",
- "fields": [
- "title",
- "title.original",
- "title.shingles"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 228
- },
- "digest": "6bbc613bd4f9aec1bbdbabf5db021d28",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\": {\n \"should\": [\n { \"match\": { \"title\": \"quick brown fox\" }},\n { \"match\": { \"title.original\": \"quick brown fox\" }},\n { \"match\": { \"title.shingles\": \"quick brown fox\" }}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "match": {
- "title": "quick brown fox"
- }
- },
- {
- "match": {
- "title.original": "quick brown fox"
- }
- },
- {
- "match": {
- "title.shingles": "quick brown fox"
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 259
- },
- "digest": "0e118857b815b62118a30c042f079db1",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"quick brown f\",\n \"type\": \"phrase_prefix\",\n \"fields\": [ \"subject\", \"message\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "quick brown f",
- "type": "phrase_prefix",
- "fields": [
- "subject",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 275
- },
- "digest": "33f148e3d8676de6cc52f58749898a13",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"dis_max\": {\n \"queries\": [\n { \"match_phrase_prefix\": { \"subject\": \"quick brown f\" }},\n { \"match_phrase_prefix\": { \"message\": \"quick brown f\" }}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "dis_max": {
- "queries": [
- {
- "match_phrase_prefix": {
- "subject": "quick brown f"
- }
- },
- {
- "match_phrase_prefix": {
- "message": "quick brown f"
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 341
- },
- "digest": "047266b0d20fdb62ebc72d51952c8f6d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"type\": \"cross_fields\",\n \"fields\": [ \"first_name\", \"last_name\" ],\n \"operator\": \"and\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Will Smith",
- "type": "cross_fields",
- "fields": [
- "first_name",
- "last_name"
- ],
- "operator": "and"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 400
- },
- "digest": "ad0dcbc7fc619e952c8825b8f307b7b2",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Jon\",\n \"type\": \"cross_fields\",\n \"fields\": [\n \"first\", \"first.edge\",\n \"last\", \"last.edge\"\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Jon",
- "type": "cross_fields",
- "fields": [
- "first",
- "first.edge",
- "last",
- "last.edge"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 438
- },
- "digest": "3cd50a789b8e1f0ebbbc53a8d7ecf656",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\": {\n \"should\": [\n {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"type\": \"cross_fields\",\n \"fields\": [ \"first\", \"last\" ],\n \"minimum_should_match\": \"50%\" <1>\n }\n },\n {\n \"multi_match\" : {\n \"query\": \"Will Smith\",\n \"type\": \"cross_fields\",\n \"fields\": [ \"*.edge\" ]\n }\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "multi_match": {
- "query": "Will Smith",
- "type": "cross_fields",
- "fields": [
- "first",
- "last"
- ],
- "minimum_should_match": "50%"
- }
- },
- {
- "multi_match": {
- "query": "Will Smith",
- "type": "cross_fields",
- "fields": [
- "*.edge"
- ]
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 472
- },
- "digest": "179f0a3e84ff4bbac18787a018eabf89",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"Jon\",\n \"type\": \"cross_fields\",\n \"analyzer\": \"standard\", <1>\n \"fields\": [ \"first\", \"last\", \"*.edge\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "Jon",
- "type": "cross_fields",
- "analyzer": "standard",
- "fields": [
- "first",
- "last",
- "*.edge"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/multi-match-query.asciidoc",
- "line": 524
- },
- "digest": "68721288dc9ad8aa1b55099b4d303051",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"multi_match\" : {\n \"query\": \"quick brown f\",\n \"type\": \"bool_prefix\",\n \"fields\": [ \"subject\", \"message\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "quick brown f",
- "type": "bool_prefix",
- "fields": [
- "subject",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 42
- },
- "digest": "ad6ea0c1e46712aa1fd6d3bfa0ec979e",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"query\" : \"(new york city) OR (big apple)\",\n \"default_field\" : \"content\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "(new york city) OR (big apple)",
- "default_field": "content"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-syntax.asciidoc",
- "line": 294
- },
- "digest": "8ca595edc1e1f1ae6bc3ee05e0aa1e32",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"query\" : {\n \"query_string\" : {\n \"query\" : \"kimchy\\\\!\",\n \"fields\" : [\"user\"]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "kimchy\\!",
- "fields": [
- "user"
- ]
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 265
- },
- "digest": "f2d68493abd3ca430bd03a7f7f8d18f9",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"fields\" : [\"content\", \"name\"],\n \"query\" : \"this AND that\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "content",
- "name"
- ],
- "query": "this AND that"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 281
- },
- "digest": "e17e8852ec3f31781e1364f4dffeb6d0",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"(content:this OR name:this) AND (content:that OR name:that)\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "(content:this OR name:this) AND (content:that OR name:that)"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 297
- },
- "digest": "a2a25aad1fea9a541b52ac613c78fb64",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"fields\" : [\"content\", \"name^5\"],\n \"query\" : \"this AND that OR thus\",\n \"tie_breaker\" : 0\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "content",
- "name^5"
- ],
- "query": "this AND that OR thus",
- "tie_breaker": 0
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 316
- },
- "digest": "28aad2c5942bfb221c2bf1bbdc01658e",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"fields\" : [\"city.*\"],\n \"query\" : \"this AND that OR thus\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "city.*"
- ],
- "query": "this AND that OR thus"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 333
- },
- "digest": "db6cba451ba562abe953d09ad80cc15c",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"query\" : \"city.\\\\*:(this AND that OR thus)\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "city.\\*:(this AND that OR thus)"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 352
- },
- "digest": "58b5003c0a53a39bf509aa3797aad471",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"fields\" : [\"content\", \"name.*^5\"],\n \"query\" : \"this AND that OR thus\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "content",
- "name.*^5"
- ],
- "query": "this AND that OR thus"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 418
- },
- "digest": "f32f0c19b42de3b87dd764fe4ca17e7c",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\" : {\n \"default_field\": \"title\",\n \"query\" : \"ny city\",\n \"auto_generate_synonyms_phrase_query\" : false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "default_field": "title",
- "query": "ny city",
- "auto_generate_synonyms_phrase_query": false
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 446
- },
- "digest": "60ee33f3acfdd0fe6f288ac77312c780",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"fields\": [\n \"title\"\n ],\n \"query\": \"this that thus\",\n \"minimum_should_match\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "title"
- ],
- "query": "this that thus",
- "minimum_should_match": 2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 472
- },
- "digest": "be1bd47393646ac6bbee177d1cdb7738",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"fields\": [\n \"title\",\n \"content\"\n ],\n \"query\": \"this that thus\",\n \"minimum_should_match\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "title",
- "content"
- ],
- "query": "this that thus",
- "minimum_should_match": 2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 496
- },
- "digest": "fdd38f0d248385a444c777e7acd97846",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"fields\": [\n \"title\",\n \"content\"\n ],\n \"query\": \"this OR that OR thus\",\n \"minimum_should_match\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "title",
- "content"
- ],
- "query": "this OR that OR thus",
- "minimum_should_match": 2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/query-string-query.asciidoc",
- "line": 528
- },
- "digest": "6f21a878fee3b43c5332b81aaddbeac7",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"fields\": [\n \"title\",\n \"content\"\n ],\n \"query\": \"this OR that OR thus\",\n \"type\": \"cross_fields\",\n \"minimum_should_match\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "fields": [
- "title",
- "content"
- ],
- "query": "this OR that OR thus",
- "type": "cross_fields",
- "minimum_should_match": 2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 24
- },
- "digest": "0d49474511b236bc89e768c8ee91adf1",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\": \"\\\"fried eggs\\\" +(eggplant | potato) -frittata\",\n \"fields\": [\"title^5\", \"body\"],\n \"default_operator\": \"and\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "\"fried eggs\" +(eggplant | potato) -frittata",
- "fields": [
- "title^5",
- "body"
- ],
- "default_operator": "and"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 152
- },
- "digest": "521aa59ae56681fd59ac5840cba6b6c5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"fields\" : [\"content\"],\n \"query\" : \"foo bar -baz\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "fields": [
- "content"
- ],
- "query": "foo bar -baz"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 180
- },
- "digest": "f686f52decb1d57356d42920f46d4d85",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\" : \"foo | bar + baz*\",\n \"flags\" : \"OR|AND|PREFIX\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "foo | bar + baz*",
- "flags": "OR|AND|PREFIX"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 244
- },
- "digest": "e8ea65153d7775f25b08dfdfe6954498",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\": \"Will Smith\",\n \"fields\": [ \"title\", \"*_name\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "Will Smith",
- "fields": [
- "title",
- "*_name"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 261
- },
- "digest": "da8db0769dff7305f178c12b1111bc99",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\" : \"this is a test\",\n \"fields\" : [ \"subject^3\", \"message\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "this is a test",
- "fields": [
- "subject^3",
- "message"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/simple-query-string-query.asciidoc",
- "line": 287
- },
- "digest": "2e602d7fbad46132358f921dff7d1a26",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"simple_query_string\" : {\n \"query\" : \"ny city\",\n \"auto_generate_synonyms_phrase_query\" : false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "ny city",
- "auto_generate_synonyms_phrase_query": false
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 11
- },
- "digest": "b4ef55e48f137e8f67f82b42a047c8f6",
- "lang": "console",
- "found": [],
- "source": "PUT /my_locations\n{\n \"mappings\": {\n \"properties\": {\n \"pin\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n }\n }\n}\n\nPUT /my_locations/_doc/1\n{\n \"pin\" : {\n \"location\" : {\n \"lat\" : 40.12,\n \"lon\" : -71.34\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_locations",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "pin": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_locations/_doc/1",
- "query": null,
- "body": {
- "pin": {
- "location": {
- "lat": 40.12,
- "lon": -71.34
- }
- }
- },
- "params": {
- "index": "my_locations",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 43
- },
- "digest": "49abe3273ac51f14cd4b5f1aaa7f6833",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : {\n \"lat\" : 40.73,\n \"lon\" : -74.1\n },\n \"bottom_right\" : {\n \"lat\" : 40.01,\n \"lon\" : -71.12\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": {
- "lat": 40.73,
- "lon": -74.1
- },
- "bottom_right": {
- "lat": 40.01,
- "lon": -71.12
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 98
- },
- "digest": "49abe3273ac51f14cd4b5f1aaa7f6833",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : {\n \"lat\" : 40.73,\n \"lon\" : -74.1\n },\n \"bottom_right\" : {\n \"lat\" : 40.01,\n \"lon\" : -71.12\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": {
- "lat": 40.73,
- "lon": -74.1
- },
- "bottom_right": {
- "lat": 40.01,
- "lon": -71.12
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 132
- },
- "digest": "2cbaaab829728c46359d2f68b71c446e",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : [-74.1, 40.73],\n \"bottom_right\" : [-71.12, 40.01]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": [
- -74.1,
- 40.73
- ],
- "bottom_right": [
- -71.12,
- 40.01
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 159
- },
- "digest": "bbf04a7f7a8858e911d6a53fe88127b0",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : \"40.73, -74.1\",\n \"bottom_right\" : \"40.01, -71.12\"\n }\n }\n }\n }\n}\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": "40.73, -74.1",
- "bottom_right": "40.01, -71.12"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 184
- },
- "digest": "417dcb29f5547d4de9d75d8b6a7a53c8",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"wkt\" : \"BBOX (-74.1, -71.12, 40.73, 40.01)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "wkt": "BBOX (-74.1, -71.12, 40.73, 40.01)"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 208
- },
- "digest": "d84695e3db2c92cd3faebf729e482bf0",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : \"dr5r9ydj2y73\",\n \"bottom_right\" : \"drj7teegpus6\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": "dr5r9ydj2y73",
- "bottom_right": "drj7teegpus6"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 242
- },
- "digest": "32ffcae9e1d13df0b7295c349d9145ec",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : \"dr\",\n \"bottom_right\" : \"dr\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": "dr",
- "bottom_right": "dr"
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 271
- },
- "digest": "370750b2f51bd097f4578e5b105babdf",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top\" : 40.73,\n \"left\" : -74.1,\n \"bottom\" : 40.01,\n \"right\" : -71.12\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top": 40.73,
- "left": -74.1,
- "bottom": 40.01,
- "right": -71.12
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-bounding-box-query.asciidoc",
- "line": 320
- },
- "digest": "15eee00f09d2290e0f350d420029906e",
- "lang": "console",
- "found": [],
- "source": "GET my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"pin.location\" : {\n \"top_left\" : {\n \"lat\" : 40.73,\n \"lon\" : -74.1\n },\n \"bottom_right\" : {\n \"lat\" : 40.10,\n \"lon\" : -71.12\n }\n },\n \"type\" : \"indexed\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_bounding_box": {
- "pin.location": {
- "top_left": {
- "lat": 40.73,
- "lon": -74.1
- },
- "bottom_right": {
- "lat": 40.1,
- "lon": -71.12
- }
- },
- "type": "indexed"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 12
- },
- "digest": "b4ef55e48f137e8f67f82b42a047c8f6",
- "lang": "console",
- "found": [],
- "source": "PUT /my_locations\n{\n \"mappings\": {\n \"properties\": {\n \"pin\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n }\n }\n}\n\nPUT /my_locations/_doc/1\n{\n \"pin\" : {\n \"location\" : {\n \"lat\" : 40.12,\n \"lon\" : -71.34\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_locations",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "pin": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_locations/_doc/1",
- "query": null,
- "body": {
- "pin": {
- "location": {
- "lat": 40.12,
- "lon": -71.34
- }
- }
- },
- "params": {
- "index": "my_locations",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 45
- },
- "digest": "4639a1bbd12710d5f01f1aaadce09a3e",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"200km\",\n \"pin.location\" : {\n \"lat\" : 40,\n \"lon\" : -70\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "200km",
- "pin.location": {
- "lat": 40,
- "lon": -70
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 77
- },
- "digest": "6fc37ccf570ff7e35b7b0bd4bacb8abd",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"12km\",\n \"pin.location\" : {\n \"lat\" : 40,\n \"lon\" : -70\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "12km",
- "pin.location": {
- "lat": 40,
- "lon": -70
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 106
- },
- "digest": "926fff8330fc3008f62b9de34f385a57",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"12km\",\n \"pin.location\" : [-70, 40]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "12km",
- "pin.location": [
- -70,
- 40
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 132
- },
- "digest": "f878546633c6bcc30edcdcf520a20eba",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"12km\",\n \"pin.location\" : \"40,-70\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "12km",
- "pin.location": "40,-70"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-distance-query.asciidoc",
- "line": 155
- },
- "digest": "48a40f20b752a8120cf020bda041adca",
- "lang": "console",
- "found": [],
- "source": "GET /my_locations/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_distance\" : {\n \"distance\" : \"12km\",\n \"pin.location\" : \"drm3btev3e86\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_locations/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_distance": {
- "distance": "12km",
- "pin.location": "drm3btev3e86"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_locations"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-polygon-query.asciidoc",
- "line": 11
- },
- "digest": "383c5a0771484086dcfd8d990830eeb7",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_polygon\" : {\n \"person.location\" : {\n \"points\" : [\n {\"lat\" : 40, \"lon\" : -70},\n {\"lat\" : 30, \"lon\" : -80},\n {\"lat\" : 20, \"lon\" : -90}\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_polygon": {
- "person.location": {
- "points": [
- {
- "lat": 40,
- "lon": -70
- },
- {
- "lat": 30,
- "lon": -80
- },
- {
- "lat": 20,
- "lon": -90
- }
- ]
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-polygon-query.asciidoc",
- "line": 60
- },
- "digest": "ecf966a20c54eb4e60a2670f51a99bdc",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_polygon\" : {\n \"person.location\" : {\n \"points\" : [\n [-70, 40],\n [-80, 30],\n [-90, 20]\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_polygon": {
- "person.location": {
- "points": [
- [
- -70,
- 40
- ],
- [
- -80,
- 30
- ],
- [
- -90,
- 20
- ]
- ]
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-polygon-query.asciidoc",
- "line": 90
- },
- "digest": "e532955a897ac1844e7c5727916bf32c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_polygon\" : {\n \"person.location\" : {\n \"points\" : [\n \"40, -70\",\n \"30, -80\",\n \"20, -90\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_polygon": {
- "person.location": {
- "points": [
- "40, -70",
- "30, -80",
- "20, -90"
- ]
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-polygon-query.asciidoc",
- "line": 118
- },
- "digest": "5b809a128ee33be706e2097dde6e7719",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match_all\" : {}\n },\n \"filter\" : {\n \"geo_polygon\" : {\n \"person.location\" : {\n \"points\" : [\n \"drn5x1g8cu2y\",\n \"30, -80\",\n \"20, -90\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_polygon": {
- "person.location": {
- "points": [
- "drn5x1g8cu2y",
- "30, -80",
- "20, -90"
- ]
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 31
- },
- "digest": "183be708fc91109008109b5ed44c8b08",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}\n\nPOST /example/_doc?refresh\n{\n \"name\": \"Wind & Wetter, Berlin, Germany\",\n \"location\": {\n \"type\": \"point\",\n \"coordinates\": [13.400544, 52.530286]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "Wind & Wetter, Berlin, Germany",
- "location": {
- "type": "point",
- "coordinates": [
- 13.400544,
- 52.530286
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 59
- },
- "digest": "129975da094b6b93cc8fcc4042d47913",
- "lang": "console",
- "found": [],
- "source": "GET /example/_search\n{\n \"query\":{\n \"bool\": {\n \"must\": {\n \"match_all\": {}\n },\n \"filter\": {\n \"geo_shape\": {\n \"location\": {\n \"shape\": {\n \"type\": \"envelope\",\n \"coordinates\" : [[13.0, 53.0], [14.0, 52.0]]\n },\n \"relation\": \"within\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/example/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_shape": {
- "location": {
- "shape": {
- "type": "envelope",
- "coordinates": [
- [
- 13,
- 53
- ],
- [
- 14,
- 52
- ]
- ]
- },
- "relation": "within"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 87
- },
- "digest": "33106dcb58ac2e2528e304836ccd6329",
- "lang": "console",
- "found": [],
- "source": "PUT /example_points\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPUT /example_points/_doc/1?refresh\n{\n \"name\": \"Wind & Wetter, Berlin, Germany\",\n \"location\": [13.400544, 52.530286]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example_points",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "example_points"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/example_points/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "Wind & Wetter, Berlin, Germany",
- "location": [
- 13.400544,
- 52.530286
- ]
- },
- "params": {
- "index": "example_points",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 112
- },
- "digest": "38073ce8915f9f21e1a3dfe159c4999c",
- "lang": "console",
- "found": [],
- "source": "GET /example_points/_search\n{\n \"query\":{\n \"bool\": {\n \"must\": {\n \"match_all\": {}\n },\n \"filter\": {\n \"geo_shape\": {\n \"location\": {\n \"shape\": {\n \"type\": \"envelope\",\n \"coordinates\" : [[13.0, 53.0], [14.0, 52.0]]\n },\n \"relation\": \"intersects\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/example_points/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- },
- "filter": {
- "geo_shape": {
- "location": {
- "shape": {
- "type": "envelope",
- "coordinates": [
- [
- 13,
- 53
- ],
- [
- 14,
- 52
- ]
- ]
- },
- "relation": "intersects"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "example_points"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 138
- },
- "digest": "c5f0c8ba48f444b3e571dab524c3c1ef",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 17,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 1,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 1.0,\n \"hits\" : [\n {\n \"_index\" : \"example_points\",\n \"_id\" : \"1\",\n \"_score\" : 1.0,\n \"_source\" : {\n \"name\": \"Wind & Wetter, Berlin, Germany\",\n \"location\": [13.400544, 52.530286]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 190
- },
- "digest": "0e941a8309c3743972b8f5a8d9d9ada6",
- "lang": "console",
- "found": [],
- "source": "PUT /shapes\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}\n\nPUT /shapes/_doc/deu\n{\n \"location\": {\n \"type\": \"envelope\",\n \"coordinates\" : [[13.0, 53.0], [14.0, 52.0]]\n }\n}\n\nGET /example/_search\n{\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"geo_shape\": {\n \"location\": {\n \"indexed_shape\": {\n \"index\": \"shapes\",\n \"id\": \"deu\",\n \"path\": \"location\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/shapes",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "shapes"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/shapes/_doc/deu",
- "query": null,
- "body": {
- "location": {
- "type": "envelope",
- "coordinates": [
- [
- 13,
- 53
- ],
- [
- 14,
- 52
- ]
- ]
- }
- },
- "params": {
- "index": "shapes",
- "id": "deu"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/example/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "geo_shape": {
- "location": {
- "indexed_shape": {
- "index": "shapes",
- "id": "deu",
- "path": "location"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 288
- },
- "digest": "5e3673bcbef5731746e400c4f3fe134d",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/1\n{\n \"location\": [\n {\n \"coordinates\": [46.25,20.14],\n \"type\": \"point\"\n },\n {\n \"coordinates\": [47.49,19.04],\n \"type\": \"point\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": null,
- "body": {
- "location": [
- {
- "coordinates": [
- 46.25,
- 20.14
- ],
- "type": "point"
- },
- {
- "coordinates": [
- 47.49,
- 19.04
- ],
- "type": "point"
- }
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/geo-shape-query.asciidoc",
- "line": 306
- },
- "digest": "170c8a3fb81a4e93cd3034a3b5a43ac9",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/1\n{\n \"location\":\n {\n \"coordinates\": [[46.25,20.14],[47.49,19.04]],\n \"type\": \"multipoint\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": null,
- "body": {
- "location": {
- "coordinates": [
- [
- 46.25,
- 20.14
- ],
- [
- 47.49,
- 19.04
- ]
- ],
- "type": "multipoint"
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/shape-query.asciidoc",
- "line": 28
- },
- "digest": "9208f0823deacf3e3a2cc2b5d78f1e33",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"geometry\": {\n \"type\": \"shape\"\n }\n }\n }\n}\n\nPUT /example/_doc/1?refresh=wait_for\n{\n \"name\": \"Lucky Landing\",\n \"geometry\": {\n \"type\": \"point\",\n \"coordinates\": [1355.400544, 5255.530286]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geometry": {
- "type": "shape"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/example/_doc/1",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "name": "Lucky Landing",
- "geometry": {
- "type": "point",
- "coordinates": [
- 1355.400544,
- 5255.530286
- ]
- }
- },
- "params": {
- "index": "example",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/shape-query.asciidoc",
- "line": 55
- },
- "digest": "f7bbcd762afef5a562768a46fe192b56",
- "lang": "console",
- "found": [],
- "source": "GET /example/_search\n{\n \"query\":{\n \"shape\": {\n \"geometry\": {\n \"shape\": {\n \"type\": \"envelope\",\n \"coordinates\" : [[1355.0, 5355.0], [1400.0, 5200.0]]\n },\n \"relation\": \"within\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/example/_search",
- "query": null,
- "body": {
- "query": {
- "shape": {
- "geometry": {
- "shape": {
- "type": "envelope",
- "coordinates": [
- [
- 1355,
- 5355
- ],
- [
- 1400,
- 5200
- ]
- ]
- },
- "relation": "within"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/shape-query.asciidoc",
- "line": 133
- },
- "digest": "86388922e307dd94c0f5f93890f13832",
- "lang": "console",
- "found": [],
- "source": "PUT /shapes\n{\n \"mappings\": {\n \"properties\": {\n \"geometry\": {\n \"type\": \"shape\"\n }\n }\n }\n}\n\nPUT /shapes/_doc/footprint\n{\n \"geometry\": {\n \"type\": \"envelope\",\n \"coordinates\" : [[1355.0, 5355.0], [1400.0, 5200.0]]\n }\n}\n\nGET /example/_search\n{\n \"query\": {\n \"shape\": {\n \"geometry\": {\n \"indexed_shape\": {\n \"index\": \"shapes\",\n \"id\": \"footprint\",\n \"path\": \"geometry\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/shapes",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geometry": {
- "type": "shape"
- }
- }
- }
- },
- "params": {
- "index": "shapes"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/shapes/_doc/footprint",
- "query": null,
- "body": {
- "geometry": {
- "type": "envelope",
- "coordinates": [
- [
- 1355,
- 5355
- ],
- [
- 1400,
- 5200
- ]
- ]
- }
- },
- "params": {
- "index": "shapes",
- "id": "footprint"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/example/_search",
- "query": null,
- "body": {
- "query": {
- "shape": {
- "geometry": {
- "indexed_shape": {
- "index": "shapes",
- "id": "footprint",
- "path": "geometry"
- }
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 23
- },
- "digest": "c612d93e7f682a0d731e385edf9f5d56",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\" : {\n \"properties\" : {\n \"obj1\" : {\n \"type\" : \"nested\"\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "obj1": {
- "type": "nested"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 41
- },
- "digest": "6be70810d6ebd6f09d8a49f9df847765",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /my_index/_search\n{\n \"query\": {\n \"nested\" : {\n \"path\" : \"obj1\",\n \"query\" : {\n \"bool\" : {\n \"must\" : [\n { \"match\" : {\"obj1.name\" : \"blue\"} },\n { \"range\" : {\"obj1.count\" : {\"gt\" : 5}} }\n ]\n }\n },\n \"score_mode\" : \"avg\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "obj1",
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "obj1.name": "blue"
- }
- },
- {
- "range": {
- "obj1.count": {
- "gt": 5
- }
- }
- }
- ]
- }
- },
- "score_mode": "avg"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 133
- },
- "digest": "54092c8c646133f5dbbc047990dd458d",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /drivers\n{\n \"mappings\" : {\n \"properties\" : {\n \"driver\" : {\n \"type\" : \"nested\",\n \"properties\" : {\n \"last_name\" : {\n \"type\" : \"text\"\n },\n \"vehicle\" : {\n \"type\" : \"nested\",\n \"properties\" : {\n \"make\" : {\n \"type\" : \"text\"\n },\n \"model\" : {\n \"type\" : \"text\"\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/drivers",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "driver": {
- "type": "nested",
- "properties": {
- "last_name": {
- "type": "text"
- },
- "vehicle": {
- "type": "nested",
- "properties": {
- "make": {
- "type": "text"
- },
- "model": {
- "type": "text"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "drivers"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 165
- },
- "digest": "873fbbc6ab81409058591385fd602736",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /drivers/_doc/1\n{\n \"driver\" : {\n \"last_name\" : \"McQueen\",\n \"vehicle\" : [\n {\n \"make\" : \"Powell Motors\",\n \"model\" : \"Canyonero\"\n },\n {\n \"make\" : \"Miller-Meteor\",\n \"model\" : \"Ecto-1\"\n }\n ]\n }\n}\n\nPUT /drivers/_doc/2?refresh\n{\n \"driver\" : {\n \"last_name\" : \"Hudson\",\n \"vehicle\" : [\n {\n \"make\" : \"Mifune\",\n \"model\" : \"Mach Five\"\n },\n {\n \"make\" : \"Miller-Meteor\",\n \"model\" : \"Ecto-1\"\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/drivers/_doc/1",
- "query": null,
- "body": {
- "driver": {
- "last_name": "McQueen",
- "vehicle": [
- {
- "make": "Powell Motors",
- "model": "Canyonero"
- },
- {
- "make": "Miller-Meteor",
- "model": "Ecto-1"
- }
- ]
- }
- },
- "params": {
- "index": "drivers",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/drivers/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "driver": {
- "last_name": "Hudson",
- "vehicle": [
- {
- "make": "Mifune",
- "model": "Mach Five"
- },
- {
- "make": "Miller-Meteor",
- "model": "Ecto-1"
- }
- ]
- }
- },
- "params": {
- "index": "drivers",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 206
- },
- "digest": "0bd3923424a20a4ba860b0774b9991b1",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /drivers/_search\n{\n \"query\" : {\n \"nested\" : {\n \"path\" : \"driver\",\n \"query\" : {\n \"nested\" : {\n \"path\" : \"driver.vehicle\",\n \"query\" : {\n \"bool\" : {\n \"must\" : [\n { \"match\" : { \"driver.vehicle.make\" : \"Powell Motors\" } },\n { \"match\" : { \"driver.vehicle.model\" : \"Canyonero\" } }\n ]\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/drivers/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "driver",
- "query": {
- "nested": {
- "path": "driver.vehicle",
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "driver.vehicle.make": "Powell Motors"
- }
- },
- {
- "match": {
- "driver.vehicle.model": "Canyonero"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "drivers"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/nested-query.asciidoc",
- "line": 234
- },
- "digest": "72fbc50004bd2882be2ca312b24cfe7d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 5,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 1,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 3.7349272,\n \"hits\" : [\n {\n \"_index\" : \"drivers\",\n \"_id\" : \"1\",\n \"_score\" : 3.7349272,\n \"_source\" : {\n \"driver\" : {\n \"last_name\" : \"McQueen\",\n \"vehicle\" : [\n {\n \"make\" : \"Powell Motors\",\n \"model\" : \"Canyonero\"\n },\n {\n \"make\" : \"Miller-Meteor\",\n \"model\" : \"Ecto-1\"\n }\n ]\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/has-child-query.asciidoc",
- "line": 31
- },
- "digest": "10239a59784c3069e0d9399d3f9a7008",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\" : {\n \"my-join-field\" : {\n \"type\" : \"join\",\n \"relations\": {\n \"parent\": \"child\"\n }\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my-join-field": {
- "type": "join",
- "relations": {
- "parent": "child"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-child-query.asciidoc",
- "line": 53
- },
- "digest": "a204ff3396082b32175371c7ed8b9394",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"has_child\" : {\n \"type\" : \"child\",\n \"query\" : {\n \"match_all\" : {}\n },\n \"max_children\": 10,\n \"min_children\": 2,\n \"score_mode\" : \"min\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "has_child": {
- "type": "child",
- "query": {
- "match_all": {}
- },
- "max_children": 10,
- "min_children": 2,
- "score_mode": "min"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-child-query.asciidoc",
- "line": 141
- },
- "digest": "d7b459941dc32d790ade80a0f5712560",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"has_child\" : {\n \"type\" : \"child\",\n \"query\" : {\n \"function_score\" : {\n \"script_score\": {\n \"script\": \"_score * doc['click_count'].value\"\n }\n }\n },\n \"score_mode\" : \"max\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "has_child": {
- "type": "child",
- "query": {
- "function_score": {
- "script_score": {
- "script": "_score * doc['click_count'].value"
- }
- }
- },
- "score_mode": "max"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-parent-query.asciidoc",
- "line": 27
- },
- "digest": "6515e74b150bbdae570e0fd3ef5ac2e5",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index\n{\n \"mappings\": {\n \"properties\" : {\n \"my-join-field\" : {\n \"type\" : \"join\",\n \"relations\": {\n \"parent\": \"child\"\n }\n },\n \"tag\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my-join-field": {
- "type": "join",
- "relations": {
- "parent": "child"
- }
- },
- "tag": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-parent-query.asciidoc",
- "line": 52
- },
- "digest": "e539bfb5c73771c73acdf22fe77dde04",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\": {\n \"has_parent\" : {\n \"parent_type\" : \"parent\",\n \"query\" : {\n \"term\" : {\n \"tag\" : {\n \"value\" : \"Elasticsearch\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "has_parent": {
- "parent_type": "parent",
- "query": {
- "term": {
- "tag": {
- "value": "Elasticsearch"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/has-parent-query.asciidoc",
- "line": 122
- },
- "digest": "85d88b08243afbef45d4dcea72c9a41c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"has_parent\" : {\n \"parent_type\" : \"parent\",\n \"score\" : true,\n \"query\" : {\n \"function_score\" : {\n \"script_score\": {\n \"script\": \"_score * doc['view_count'].value\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "has_parent": {
- "parent_type": "parent",
- "score": true,
- "query": {
- "function_score": {
- "script_score": {
- "script": "_score * doc['view_count'].value"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/parent-id-query.asciidoc",
- "line": 24
- },
- "digest": "0377c031f840e23dcf607a08e5549bac",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index\n{\n \"mappings\": {\n \"properties\" : {\n \"my-join-field\" : {\n \"type\" : \"join\",\n \"relations\": {\n \"my-parent\": \"my-child\"\n }\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my-join-field": {
- "type": "join",
- "relations": {
- "my-parent": "my-child"
- }
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/parent-id-query.asciidoc",
- "line": 47
- },
- "digest": "6528a67cc20e5a422f11cbc0ffb6f673",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/1?refresh\n{\n \"text\": \"This is a parent document.\",\n \"my-join-field\": \"my-parent\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "This is a parent document.",
- "my-join-field": "my-parent"
- },
- "params": {
- "index": "my-index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/parent-id-query.asciidoc",
- "line": 60
- },
- "digest": "a4d0e6ff5bb904cbd686aecafa917aa2",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/2?routing=1&refresh\n{\n \"text\": \"This is a child document.\",\n \"my_join_field\": {\n \"name\": \"my-child\",\n \"parent\": \"1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/2",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "text": "This is a child document.",
- "my_join_field": {
- "name": "my-child",
- "parent": "1"
- }
- },
- "params": {
- "index": "my-index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/parent-id-query.asciidoc",
- "line": 79
- },
- "digest": "0dd8ee4a383f84f8454c262262630f41",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\": {\n \"parent_id\": {\n \"type\": \"my-child\",\n \"id\": \"1\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "parent_id": {
- "type": "my-child",
- "id": "1"
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-all-query.asciidoc",
- "line": 11
- },
- "digest": "09d617863a103c82fb4101e6165ea7fe",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match_all\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-all-query.asciidoc",
- "line": 23
- },
- "digest": "75330ec1305d2beb0e2f34d2195464e2",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match_all\": { \"boost\" : 1.2 }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {
- "boost": 1.2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/match-all-query.asciidoc",
- "line": 39
- },
- "digest": "81c9aa2678d6166a9662ddf2c011a6a5",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"match_none\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_none": {}
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-containing-query.asciidoc",
- "line": 11
- },
- "digest": "73094e82ce3850cbb6f9d071cc8a2d14",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_containing\" : {\n \"little\" : {\n \"span_term\" : { \"field1\" : \"foo\" }\n },\n \"big\" : {\n \"span_near\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field1\" : \"bar\" } },\n { \"span_term\" : { \"field1\" : \"baz\" } }\n ],\n \"slop\" : 5,\n \"in_order\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_containing": {
- "little": {
- "span_term": {
- "field1": "foo"
- }
- },
- "big": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "field1": "bar"
- }
- },
- {
- "span_term": {
- "field1": "baz"
- }
- }
- ],
- "slop": 5,
- "in_order": true
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-field-masking-query.asciidoc",
- "line": 16
- },
- "digest": "b59861ad84352fee3e78bc869ccbe8b0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_near\": {\n \"clauses\": [\n {\n \"span_term\": {\n \"text\": \"quick brown\"\n }\n },\n {\n \"field_masking_span\": {\n \"query\": {\n \"span_term\": {\n \"text.stems\": \"fox\"\n }\n },\n \"field\": \"text\"\n }\n }\n ],\n \"slop\": 5,\n \"in_order\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "text": "quick brown"
- }
- },
- {
- "field_masking_span": {
- "query": {
- "span_term": {
- "text.stems": "fox"
- }
- },
- "field": "text"
- }
- }
- ],
- "slop": 5,
- "in_order": false
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-first-query.asciidoc",
- "line": 11
- },
- "digest": "020655381882d0721472a1581e06384a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_first\" : {\n \"match\" : {\n \"span_term\" : { \"user\" : \"kimchy\" }\n },\n \"end\" : 3\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_first": {
- "match": {
- "span_term": {
- "user": "kimchy"
- }
- },
- "end": 3
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-multi-term-query.asciidoc",
- "line": 12
- },
- "digest": "a22f79d01a4a625840072024feb60b46",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_multi\":{\n \"match\":{\n \"prefix\" : { \"user\" : { \"value\" : \"ki\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_multi": {
- "match": {
- "prefix": {
- "user": {
- "value": "ki"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-multi-term-query.asciidoc",
- "line": 28
- },
- "digest": "87ffa93d8de41fd0c3ea2f52378dab9c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_multi\":{\n \"match\":{\n \"prefix\" : { \"user\" : { \"value\" : \"ki\", \"boost\" : 1.08 } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_multi": {
- "match": {
- "prefix": {
- "user": {
- "value": "ki",
- "boost": 1.08
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-near-query.asciidoc",
- "line": 13
- },
- "digest": "35ee06bbcc1291446187f1eeaf7eed90",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_near\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field\" : \"value1\" } },\n { \"span_term\" : { \"field\" : \"value2\" } },\n { \"span_term\" : { \"field\" : \"value3\" } }\n ],\n \"slop\" : 12,\n \"in_order\" : false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "field": "value1"
- }
- },
- {
- "span_term": {
- "field": "value2"
- }
- },
- {
- "span_term": {
- "field": "value3"
- }
- }
- ],
- "slop": 12,
- "in_order": false
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-not-query.asciidoc",
- "line": 13
- },
- "digest": "4a3b37cdf27279800355ccdef0e13128",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_not\" : {\n \"include\" : {\n \"span_term\" : { \"field1\" : \"hoya\" }\n },\n \"exclude\" : {\n \"span_near\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field1\" : \"la\" } },\n { \"span_term\" : { \"field1\" : \"hoya\" } }\n ],\n \"slop\" : 0,\n \"in_order\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_not": {
- "include": {
- "span_term": {
- "field1": "hoya"
- }
- },
- "exclude": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "field1": "la"
- }
- },
- {
- "span_term": {
- "field1": "hoya"
- }
- }
- ],
- "slop": 0,
- "in_order": true
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-or-query.asciidoc",
- "line": 11
- },
- "digest": "b8b1c96897001708b2cfad92ac36a21f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_or\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field\" : \"value1\" } },\n { \"span_term\" : { \"field\" : \"value2\" } },\n { \"span_term\" : { \"field\" : \"value3\" } }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_or": {
- "clauses": [
- {
- "span_term": {
- "field": "value1"
- }
- },
- {
- "span_term": {
- "field": "value2"
- }
- },
- {
- "span_term": {
- "field": "value3"
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-term-query.asciidoc",
- "line": 11
- },
- "digest": "086b2bbc4c3bfc2310c22d10db42cb82",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-term-query.asciidoc",
- "line": 23
- },
- "digest": "5add42087c83b7e498f8f43e91f343d4",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_term\" : { \"user\" : { \"value\" : \"kimchy\", \"boost\" : 2.0 } }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_term": {
- "user": {
- "value": "kimchy",
- "boost": 2
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-term-query.asciidoc",
- "line": 35
- },
- "digest": "2a07d189553602066fefdb6b7cbdf542",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_term\" : { \"user\" : { \"term\" : \"kimchy\", \"boost\" : 2.0 } }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_term": {
- "user": {
- "term": "kimchy",
- "boost": 2
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/span-within-query.asciidoc",
- "line": 11
- },
- "digest": "9429e565d0b56289a10b81220660163c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"span_within\" : {\n \"little\" : {\n \"span_term\" : { \"field1\" : \"foo\" }\n },\n \"big\" : {\n \"span_near\" : {\n \"clauses\" : [\n { \"span_term\" : { \"field1\" : \"bar\" } },\n { \"span_term\" : { \"field1\" : \"baz\" } }\n ],\n \"slop\" : 5,\n \"in_order\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "span_within": {
- "little": {
- "span_term": {
- "field1": "foo"
- }
- },
- "big": {
- "span_near": {
- "clauses": [
- {
- "span_term": {
- "field1": "bar"
- }
- },
- {
- "span_term": {
- "field1": "baz"
- }
- }
- ],
- "slop": 5,
- "in_order": true
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/distance-feature-query.asciidoc",
- "line": 37
- },
- "digest": "b81a7b5f5ef19553f9cd49196f31018c",
- "lang": "console",
- "found": [],
- "source": "PUT /items\n{\n \"mappings\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n },\n \"production_date\": {\n \"type\": \"date\"\n },\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/items",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "type": "keyword"
- },
- "production_date": {
- "type": "date"
- },
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "items"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/distance-feature-query.asciidoc",
- "line": 62
- },
- "digest": "b0d3f839237fabf8cdc2221734c668ad",
- "lang": "console",
- "found": [],
- "source": "PUT /items/_doc/1?refresh\n{\n \"name\" : \"chocolate\",\n \"production_date\": \"2018-02-01\",\n \"location\": [-71.34, 41.12]\n}\n\nPUT /items/_doc/2?refresh\n{\n \"name\" : \"chocolate\",\n \"production_date\": \"2018-01-01\",\n \"location\": [-71.3, 41.15]\n}\n\n\nPUT /items/_doc/3?refresh\n{\n \"name\" : \"chocolate\",\n \"production_date\": \"2017-12-01\",\n \"location\": [-71.3, 41.12]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/items/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "chocolate",
- "production_date": "2018-02-01",
- "location": [
- -71.34,
- 41.12
- ]
- },
- "params": {
- "index": "items",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/items/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "chocolate",
- "production_date": "2018-01-01",
- "location": [
- -71.3,
- 41.15
- ]
- },
- "params": {
- "index": "items",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/items/_doc/3",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "chocolate",
- "production_date": "2017-12-01",
- "location": [
- -71.3,
- 41.12
- ]
- },
- "params": {
- "index": "items",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/distance-feature-query.asciidoc",
- "line": 98
- },
- "digest": "1e2c5cef7a3f254c71a33865eb4d7569",
- "lang": "console",
- "found": [],
- "source": "GET /items/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"name\": \"chocolate\"\n }\n },\n \"should\": {\n \"distance_feature\": {\n \"field\": \"production_date\",\n \"pivot\": \"7d\",\n \"origin\": \"now\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/items/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "name": "chocolate"
- }
- },
- "should": {
- "distance_feature": {
- "field": "production_date",
- "pivot": "7d",
- "origin": "now"
- }
- }
- }
- }
- },
- "params": {
- "index": "items"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/distance-feature-query.asciidoc",
- "line": 127
- },
- "digest": "57a3e8d2ca64e37e90d658c4cd935399",
- "lang": "console",
- "found": [],
- "source": "GET /items/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"name\": \"chocolate\"\n }\n },\n \"should\": {\n \"distance_feature\": {\n \"field\": \"location\",\n \"pivot\": \"1000m\",\n \"origin\": [-71.3, 41.15]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/items/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "name": "chocolate"
- }
- },
- "should": {
- "distance_feature": {
- "field": "location",
- "pivot": "1000m",
- "origin": [
- -71.3,
- 41.15
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "items"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/mlt-query.asciidoc",
- "line": 19
- },
- "digest": "32db70e5e08349aa254788ab4a2c4a51",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"more_like_this\" : {\n \"fields\" : [\"title\", \"description\"],\n \"like\" : \"Once upon a time\",\n \"min_term_freq\" : 1,\n \"max_query_terms\" : 12\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "more_like_this": {
- "fields": [
- "title",
- "description"
- ],
- "like": "Once upon a time",
- "min_term_freq": 1,
- "max_query_terms": 12
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/mlt-query.asciidoc",
- "line": 38
- },
- "digest": "cba099b82792fa5ba7741d00483c2b47",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"more_like_this\" : {\n \"fields\" : [\"title\", \"description\"],\n \"like\" : [\n {\n \"_index\" : \"imdb\",\n \"_id\" : \"1\"\n },\n {\n \"_index\" : \"imdb\",\n \"_id\" : \"2\"\n },\n \"and potentially some more text here as well\"\n ],\n \"min_term_freq\" : 1,\n \"max_query_terms\" : 12\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "more_like_this": {
- "fields": [
- "title",
- "description"
- ],
- "like": [
- {
- "_index": "imdb",
- "_id": "1"
- },
- {
- "_index": "imdb",
- "_id": "2"
- },
- "and potentially some more text here as well"
- ],
- "min_term_freq": 1,
- "max_query_terms": 12
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/mlt-query.asciidoc",
- "line": 67
- },
- "digest": "33f77a3b80f33323faa091538220de2a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"more_like_this\" : {\n \"fields\" : [\"name.first\", \"name.last\"],\n \"like\" : [\n {\n \"_index\" : \"marvel\",\n \"doc\" : {\n \"name\": {\n \"first\": \"Ben\",\n \"last\": \"Grimm\"\n },\n \"_doc\": \"You got no idea what I'd... what I'd give to be invisible.\"\n }\n },\n {\n \"_index\" : \"marvel\",\n \"_id\" : \"2\"\n }\n ],\n \"min_term_freq\" : 1,\n \"max_query_terms\" : 12\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "more_like_this": {
- "fields": [
- "name.first",
- "name.last"
- ],
- "like": [
- {
- "_index": "marvel",
- "doc": {
- "name": {
- "first": "Ben",
- "last": "Grimm"
- },
- "_doc": "You got no idea what I'd... what I'd give to be invisible."
- }
- },
- {
- "_index": "marvel",
- "_id": "2"
- }
- ],
- "min_term_freq": 1,
- "max_query_terms": 12
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/mlt-query.asciidoc",
- "line": 121
- },
- "digest": "084b3e3ff6f22c1c9a56b79760f50b36",
- "lang": "console",
- "found": [],
- "source": "PUT /imdb\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"term_vector\": \"yes\"\n },\n \"description\": {\n \"type\": \"text\"\n },\n \"tags\": {\n \"type\": \"text\",\n \"fields\" : {\n \"raw\": {\n \"type\" : \"text\",\n \"analyzer\": \"keyword\",\n \"term_vector\" : \"yes\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/imdb",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "term_vector": "yes"
- },
- "description": {
- "type": "text"
- },
- "tags": {
- "type": "text",
- "fields": {
- "raw": {
- "type": "text",
- "analyzer": "keyword",
- "term_vector": "yes"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "imdb"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 18
- },
- "digest": "e79bff3fe9fe9d8732e0b034f17a03c5",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index\n{\n \"mappings\": {\n \"properties\": {\n \"message\": {\n \"type\": \"text\"\n },\n \"query\": {\n \"type\": \"percolator\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "message": {
- "type": "text"
- },
- "query": {
- "type": "percolator"
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 46
- },
- "digest": "25843127c07257bf09154920779d3055",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/1?refresh\n{\n \"query\" : {\n \"match\" : {\n \"message\" : \"bonsai tree\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "message": "bonsai tree"
- }
- }
- },
- "params": {
- "index": "my-index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 61
- },
- "digest": "4ef2837148b6b23e2eb0a11d14ccae80",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"message\" : \"A new bonsai tree in the office\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "message": "A new bonsai tree in the office"
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 79
- },
- "digest": "ac96110be37dee22d5da427499945bb0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.26152915,\n \"hits\": [\n { <1>\n \"_index\": \"my-index\",\n \"_id\": \"1\",\n \"_score\": 0.26152915,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"bonsai tree\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0] <2>\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 158
- },
- "digest": "4e4e6a2e173cc20c00cca1a06166a687",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"constant_score\": {\n \"filter\": {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"message\" : \"A new bonsai tree in the office\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "percolate": {
- "field": "query",
- "document": {
- "message": "A new bonsai tree in the office"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 198
- },
- "digest": "2d417d4eea299b45f384af7303252611",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\" : \"query\",\n \"documents\" : [ <1>\n {\n \"message\" : \"bonsai tree\"\n },\n {\n \"message\" : \"new tree\"\n },\n {\n \"message\" : \"the office\"\n },\n {\n \"message\" : \"office tree\"\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "documents": [
- {
- "message": "bonsai tree"
- },
- {
- "message": "new tree"
- },
- {
- "message": "the office"
- },
- {
- "message": "office tree"
- }
- ]
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 227
- },
- "digest": "554f99ea4dcd638b7a152796867528be",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.7093853,\n \"hits\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"1\",\n \"_score\": 0.7093853,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"bonsai tree\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0, 1, 3] <1>\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 283
- },
- "digest": "fe0b180951e143d4c624d9fbf677b884",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/2\n{\n \"message\" : \"A new bonsai tree in the office\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/2",
- "query": null,
- "body": {
- "message": "A new bonsai tree in the office"
- },
- "params": {
- "index": "my-index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 293
- },
- "digest": "acbf32c5afd55d370121e03f27083206",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"my-index\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"result\": \"created\",\n \"_seq_no\" : 1,\n \"_primary_term\" : 1\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 312
- },
- "digest": "6736f6e4e04379918a21e7c223c08cf9",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\": \"query\",\n \"index\" : \"my-index\",\n \"id\" : \"2\",\n \"version\" : 1 <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "index": "my-index",
- "id": "2",
- "version": 1
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 348
- },
- "digest": "f33cfd0350f5f474362aa6f2e03f734f",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/3?refresh\n{\n \"query\" : {\n \"match\" : {\n \"message\" : \"brown fox\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/3",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "message": "brown fox"
- }
- }
- },
- "params": {
- "index": "my-index",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 363
- },
- "digest": "1ae1587dfc299b9f3f57d3da0dbc9a3b",
- "lang": "console",
- "found": [],
- "source": "PUT /my-index/_doc/4?refresh\n{\n \"query\" : {\n \"match\" : {\n \"message\" : \"lazy dog\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/4",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "message": "lazy dog"
- }
- }
- },
- "params": {
- "index": "my-index",
- "id": "4"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 378
- },
- "digest": "a8852f083978b748b93b87ff7fa7b15b",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\": \"query\",\n \"document\" : {\n \"message\" : \"The quick brown fox jumps over the lazy dog\"\n }\n }\n },\n \"highlight\": {\n \"fields\": {\n \"message\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "message": "The quick brown fox jumps over the lazy dog"
- }
- }
- },
- "highlight": {
- "fields": {
- "message": {}
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 401
- },
- "digest": "76d17c166f769246933c1d1e2b235c6f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 7,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 2,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.26152915,\n \"hits\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"3\",\n \"_score\": 0.26152915,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"brown fox\"\n }\n }\n },\n \"highlight\": {\n \"message\": [\n \"The quick brown fox jumps over the lazy dog\" <1>\n ]\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0]\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"4\",\n \"_score\": 0.26152915,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"lazy dog\"\n }\n }\n },\n \"highlight\": {\n \"message\": [\n \"The quick brown fox jumps over the lazy dog\" <1>\n ]\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 472
- },
- "digest": "3bbf150f4ae5c8e53beb6d6ae6f07775",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"percolate\" : {\n \"field\": \"query\",\n \"documents\" : [\n {\n \"message\" : \"bonsai tree\"\n },\n {\n \"message\" : \"new tree\"\n },\n {\n \"message\" : \"the office\"\n },\n {\n \"message\" : \"office tree\"\n }\n ]\n }\n },\n \"highlight\": {\n \"fields\": {\n \"message\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "documents": [
- {
- "message": "bonsai tree"
- },
- {
- "message": "new tree"
- },
- {
- "message": "the office"
- },
- {
- "message": "office tree"
- }
- ]
- }
- },
- "highlight": {
- "fields": {
- "message": {}
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 506
- },
- "digest": "c11e614e77e400d9175a62f701e3205e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.7093853,\n \"hits\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"1\",\n \"_score\": 0.7093853,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"bonsai tree\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0, 1, 3]\n },\n \"highlight\" : { <1>\n \"0_message\" : [\n \"bonsai tree\"\n ],\n \"3_message\" : [\n \"office tree\"\n ],\n \"1_message\" : [\n \"new tree\"\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 564
- },
- "digest": "6163e92fa93136a1907f820e8d57db45",
- "lang": "console",
- "found": [],
- "source": "GET /my-index/_search\n{\n \"query\" : {\n \"bool\" : {\n \"should\" : [\n {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"message\" : \"bonsai tree\"\n },\n \"name\": \"query1\" <1>\n }\n },\n {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"message\" : \"tulip flower\"\n },\n \"name\": \"query2\" <1>\n }\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "percolate": {
- "field": "query",
- "document": {
- "message": "bonsai tree"
- },
- "name": "query1"
- }
- },
- {
- "percolate": {
- "field": "query",
- "document": {
- "message": "tulip flower"
- },
- "name": "query2"
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 603
- },
- "digest": "512be7642780d7953f71c95b27894aa1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.26152915,\n \"hits\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"1\",\n \"_score\": 0.26152915,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"message\": \"bonsai tree\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot_query1\" : [0] <1>\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/percolate-query.asciidoc",
- "line": 668
- },
- "digest": "9501e6c8e95c21838653ea15b9b7ed5f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"term\" : {\n \"query.extraction_result\" : \"failed\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "query.extraction_result": "failed"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 57
- },
- "digest": "e2750d69bcb6d4c7e16e704cd0fb3530",
- "lang": "console",
- "found": [],
- "source": "PUT /test\n{\n \"mappings\": {\n \"properties\": {\n \"pagerank\": {\n \"type\": \"rank_feature\"\n },\n \"url_length\": {\n \"type\": \"rank_feature\",\n \"positive_score_impact\": false\n },\n \"topics\": {\n \"type\": \"rank_features\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "pagerank": {
- "type": "rank_feature"
- },
- "url_length": {
- "type": "rank_feature",
- "positive_score_impact": false
- },
- "topics": {
- "type": "rank_features"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 82
- },
- "digest": "c786505cf972dd41bd0cbb6ebcf939e9",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/1?refresh\n{\n \"url\": \"http://en.wikipedia.org/wiki/2016_Summer_Olympics\",\n \"content\": \"Rio 2016\",\n \"pagerank\": 50.3,\n \"url_length\": 42,\n \"topics\": {\n \"sports\": 50,\n \"brazil\": 30\n }\n}\n\nPUT /test/_doc/2?refresh\n{\n \"url\": \"http://en.wikipedia.org/wiki/2016_Brazilian_Grand_Prix\",\n \"content\": \"Formula One motor race held on 13 November 2016\",\n \"pagerank\": 50.3,\n \"url_length\": 47,\n \"topics\": {\n \"sports\": 35,\n \"formula one\": 65,\n \"brazil\": 20\n }\n}\n\nPUT /test/_doc/3?refresh\n{\n \"url\": \"http://en.wikipedia.org/wiki/Deadpool_(film)\",\n \"content\": \"Deadpool is a 2016 American superhero film\",\n \"pagerank\": 50.3,\n \"url_length\": 37,\n \"topics\": {\n \"movies\": 60,\n \"super hero\": 65\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "url": "http://en.wikipedia.org/wiki/2016_Summer_Olympics",
- "content": "Rio 2016",
- "pagerank": 50.3,
- "url_length": 42,
- "topics": {
- "sports": 50,
- "brazil": 30
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "url": "http://en.wikipedia.org/wiki/2016_Brazilian_Grand_Prix",
- "content": "Formula One motor race held on 13 November 2016",
- "pagerank": 50.3,
- "url_length": 47,
- "topics": {
- "sports": 35,
- "formula one": 65,
- "brazil": 20
- }
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/3",
- "query": {
- "refresh": true
- },
- "body": {
- "url": "http://en.wikipedia.org/wiki/Deadpool_(film)",
- "content": "Deadpool is a 2016 American superhero film",
- "pagerank": 50.3,
- "url_length": 37,
- "topics": {
- "movies": 60,
- "super hero": 65
- }
- },
- "params": {
- "index": "test",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 128
- },
- "digest": "fd0cd8ecd03468726b59a605eea06d75",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match\": {\n \"content\": \"2016\"\n }\n }\n ],\n \"should\": [\n {\n \"rank_feature\": {\n \"field\": \"pagerank\"\n }\n },\n {\n \"rank_feature\": {\n \"field\": \"url_length\",\n \"boost\": 0.1\n }\n },\n {\n \"rank_feature\": {\n \"field\": \"topics.sports\",\n \"boost\": 0.4\n }\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "content": "2016"
- }
- }
- ],
- "should": [
- {
- "rank_feature": {
- "field": "pagerank"
- }
- },
- {
- "rank_feature": {
- "field": "url_length",
- "boost": 0.1
- }
- },
- {
- "rank_feature": {
- "field": "topics.sports",
- "boost": 0.4
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 233
- },
- "digest": "309f0721145b5c656338a02459c3ff1e",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\",\n \"saturation\": {\n \"pivot\": 8\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank",
- "saturation": {
- "pivot": 8
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 253
- },
- "digest": "0c05c66cfe3a2169b1ec1aba77e26db2",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\",\n \"saturation\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank",
- "saturation": {}
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 274
- },
- "digest": "e89bf0d893b7bf43c2d9b44db6cfe21b",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\",\n \"log\": {\n \"scaling_factor\": 4\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank",
- "log": {
- "scaling_factor": 4
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/rank-feature-query.asciidoc",
- "line": 300
- },
- "digest": "9e3c28d5820c38ea117eb2e9a5061089",
- "lang": "console",
- "found": [],
- "source": "GET /test/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\",\n \"sigmoid\": {\n \"pivot\": 7,\n \"exponent\": 0.6\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank",
- "sigmoid": {
- "pivot": 7,
- "exponent": 0.6
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/script-query.asciidoc",
- "line": 15
- },
- "digest": "b3aa46565d98f8a6750c571bb1c1bb8c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"filter\" : {\n \"script\" : {\n \"script\" : {\n \"source\": \"doc['num1'].value > 1\",\n \"lang\": \"painless\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "script": {
- "script": {
- "source": "doc['num1'].value > 1",
- "lang": "painless"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/script-query.asciidoc",
- "line": 52
- },
- "digest": "c4459f98de5decb37b8c403885f4b226",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"filter\" : {\n \"script\" : {\n \"script\" : {\n \"source\" : \"doc['num1'].value > params.param1\",\n \"lang\" : \"painless\",\n \"params\" : {\n \"param1\" : 5\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "script": {
- "script": {
- "source": "doc['num1'].value > params.param1",
- "lang": "painless",
- "params": {
- "param1": 5
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/script-score-query.asciidoc",
- "line": 18
- },
- "digest": "eb35bef392e0957d609f1a26481e048d",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"script_score\" : {\n \"query\" : {\n \"match\": { \"message\": \"elasticsearch\" }\n },\n \"script\" : {\n \"source\" : \"doc['likes'].value / 10 \"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "script": {
- "source": "doc['likes'].value / 10 "
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 15
- },
- "digest": "f4bdad6ecd4a53cabee95883731e1bc7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_dense_vector\": {\n \"type\": \"dense_vector\",\n \"dims\": 3\n },\n \"status\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"my_dense_vector\": [0.5, 10, 6],\n \"status\" : \"published\"\n}\n\nPUT my_index/_doc/2\n{\n \"my_dense_vector\": [-0.5, 10, 10],\n \"status\" : \"published\"\n}\n\nPOST my_index/_refresh\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_dense_vector": {
- "type": "dense_vector",
- "dims": 3
- },
- "status": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_dense_vector": [
- 0.5,
- 10,
- 6
- ],
- "status": "published"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "my_dense_vector": [
- -0.5,
- 10,
- 10
- ],
- "status": "published"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/my_index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 52
- },
- "digest": "fb7eaa05e4b418cb3da04e56d3eefa71",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\" : {\n \"bool\" : {\n \"filter\" : {\n \"term\" : {\n \"status\" : \"published\" <1>\n }\n }\n }\n },\n \"script\": {\n \"source\": \"cosineSimilarity(params.query_vector, 'my_dense_vector') + 1.0\", <2>\n \"params\": {\n \"query_vector\": [4, 3.4, -0.2] <3>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "published"
- }
- }
- }
- },
- "script": {
- "source": "cosineSimilarity(params.query_vector, 'my_dense_vector') + 1.0",
- "params": {
- "query_vector": [
- 4,
- 3.4,
- -0.2
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 88
- },
- "digest": "5f3793dbe5223db53fc67861388ecb10",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\" : {\n \"bool\" : {\n \"filter\" : {\n \"term\" : {\n \"status\" : \"published\"\n }\n }\n }\n },\n \"script\": {\n \"source\": \"\"\"\n double value = dotProduct(params.query_vector, 'my_dense_vector');\n return sigmoid(1, Math.E, -value); <1>\n \"\"\",\n \"params\": {\n \"query_vector\": [4, 3.4, -0.2]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "published"
- }
- }
- }
- },
- "script": {
- "source": "\n double value = dotProduct(params.query_vector, 'my_dense_vector');\n return sigmoid(1, Math.E, -value); \n ",
- "params": {
- "query_vector": [
- 4,
- 3.4,
- -0.2
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 123
- },
- "digest": "7453c76da9d525b8c5fb5b86f1207667",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\" : {\n \"bool\" : {\n \"filter\" : {\n \"term\" : {\n \"status\" : \"published\"\n }\n }\n }\n },\n \"script\": {\n \"source\": \"1 / (1 + l1norm(params.queryVector, 'my_dense_vector'))\", <1>\n \"params\": {\n \"queryVector\": [4, 3.4, -0.2]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "published"
- }
- }
- }
- },
- "script": {
- "source": "1 / (1 + l1norm(params.queryVector, 'my_dense_vector'))",
- "params": {
- "queryVector": [
- 4,
- 3.4,
- -0.2
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "vectors/vector-functions.asciidoc",
- "line": 162
- },
- "digest": "98e4bd19706e57405b6e810de72ea4df",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\" : {\n \"bool\" : {\n \"filter\" : {\n \"term\" : {\n \"status\" : \"published\"\n }\n }\n }\n },\n \"script\": {\n \"source\": \"1 / (1 + l2norm(params.queryVector, 'my_dense_vector'))\",\n \"params\": {\n \"queryVector\": [4, 3.4, -0.2]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "status": "published"
- }
- }
- }
- },
- "script": {
- "source": "1 / (1 + l2norm(params.queryVector, 'my_dense_vector'))",
- "params": {
- "queryVector": [
- 4,
- 3.4,
- -0.2
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/script-score-query.asciidoc",
- "line": 345
- },
- "digest": "e5240a59149072e8bc7532603fa813bd",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_explain/0\n{\n \"query\" : {\n \"script_score\" : {\n \"query\" : {\n \"match\": { \"message\": \"elasticsearch\" }\n },\n \"script\" : {\n \"source\" : \"\"\"\n long likes = doc['likes'].value;\n double normalizedLikes = likes / 10;\n if (explanation != null) {\n explanation.set('normalized likes = likes / 10 = ' + likes + ' / 10 = ' + normalizedLikes);\n }\n return normalizedLikes;\n \"\"\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_explain/0",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "script": {
- "source": "\n long likes = doc['likes'].value;\n double normalizedLikes = likes / 10;\n if (explanation != null) {\n explanation.set('normalized likes = likes / 10 = ' + likes + ' / 10 = ' + normalizedLikes);\n }\n return normalizedLikes;\n "
- }
- }
- }
- },
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/wrapper-query.asciidoc",
- "line": 10
- },
- "digest": "6159a7d56e93e14a31fc06644c803a38",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"wrapper\": {\n \"query\" : \"eyJ0ZXJtIiA6IHsgInVzZXIiIDogIktpbWNoeSIgfX0=\" <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "wrapper": {
- "query": "eyJ0ZXJtIiA6IHsgInVzZXIiIDogIktpbWNoeSIgfX0="
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/pinned-query.asciidoc",
- "line": 14
- },
- "digest": "f36a6f32ef72b326f13317bd34c6353f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"pinned\" : {\n \"ids\" : [\"1\", \"4\", \"100\"],\n \"organic\" : {\n \t\"match\":{\n \t\t\"description\": \"iphone\"\n \t}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "pinned": {
- "ids": [
- "1",
- "4",
- "100"
- ],
- "organic": {
- "match": {
- "description": "iphone"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/exists-query.asciidoc",
- "line": 20
- },
- "digest": "3342c69b2c2303247217532956fcce85",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"exists\": {\n \"field\": \"user\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "exists": {
- "field": "user"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/exists-query.asciidoc",
- "line": 56
- },
- "digest": "43af86de5e49aa06070092fffc138208",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\": {\n \"must_not\": {\n \"exists\": {\n \"field\": \"user\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must_not": {
- "exists": {
- "field": "user"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/fuzzy-query.asciidoc",
- "line": 29
- },
- "digest": "10dd8b5da64f1f6af031706dd50bc9b5",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"fuzzy\": {\n \"user\": {\n \"value\": \"ki\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "fuzzy": {
- "user": {
- "value": "ki"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/fuzzy-query.asciidoc",
- "line": 46
- },
- "digest": "8baebb670ca5624d7920ccac4afdff06",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"fuzzy\": {\n \"user\": {\n \"value\": \"ki\",\n \"fuzziness\": \"AUTO\",\n \"max_expansions\": 50,\n \"prefix_length\": 0,\n \"transpositions\": true,\n \"rewrite\": \"constant_score\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "fuzzy": {
- "user": {
- "value": "ki",
- "fuzziness": "AUTO",
- "max_expansions": 50,
- "prefix_length": 0,
- "transpositions": true,
- "rewrite": "constant_score"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/ids-query.asciidoc",
- "line": 13
- },
- "digest": "84cdb6a7a5464af7ef95b3d546883870",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"ids\" : {\n \"values\" : [\"1\", \"4\", \"100\"]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "ids": {
- "values": [
- "1",
- "4",
- "100"
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/prefix-query.asciidoc",
- "line": 16
- },
- "digest": "81514791349e0e79ac565160e42889c0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"prefix\": {\n \"user\": {\n \"value\": \"ki\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "prefix": {
- "user": {
- "value": "ki"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/prefix-query.asciidoc",
- "line": 53
- },
- "digest": "32ea547cefa2976c8c3c2eb45a2a4ff4",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\": {\n \"prefix\" : { \"user\" : \"ki\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "prefix": {
- "user": "ki"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/range-query.asciidoc",
- "line": 16
- },
- "digest": "a116949e446f34dc25ae57d4b703d0c1",
- "lang": "console",
- "found": [
- "php",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"range\" : {\n \"age\" : {\n \"gte\" : 10,\n \"lte\" : 20,\n \"boost\" : 2.0\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "age": {
- "gte": 10,
- "lte": 20,
- "boost": 2
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/range-query.asciidoc",
- "line": 157
- },
- "digest": "67ceac4bf2d9ac7cc500390544cdcb41",
- "lang": "console",
- "found": [
- "php",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"range\" : {\n \"timestamp\" : {\n \"gte\" : \"now-1d/d\",\n \"lt\" : \"now/d\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "timestamp": {
- "gte": "now-1d/d",
- "lt": "now/d"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/range-query.asciidoc",
- "line": 219
- },
- "digest": "5c2f486c27bd5346e512265f93375d16",
- "lang": "console",
- "found": [
- "php",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"range\": {\n \"timestamp\": {\n \"time_zone\": \"+01:00\", <1>\n \"gte\": \"2020-01-01T00:00:00\", <2>\n \"lte\": \"now\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "timestamp": {
- "time_zone": "+01:00",
- "gte": "2020-01-01T00:00:00",
- "lte": "now"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/regexp-query.asciidoc",
- "line": 23
- },
- "digest": "618d5f3d35921d8cb7e9ccfbe9a4c3e3",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"regexp\": {\n \"user\": {\n \"value\": \"k.*y\",\n \"flags\" : \"ALL\",\n \"max_determinized_states\": 10000,\n \"rewrite\": \"constant_score\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "regexp": {
- "user": {
- "value": "k.*y",
- "flags": "ALL",
- "max_determinized_states": 10000,
- "rewrite": "constant_score"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 28
- },
- "digest": "d0a8a938a2fa913b6fdbc871079a59dd",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"term\": {\n \"user\": {\n \"value\": \"Kimchy\",\n \"boost\": 1.0\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": {
- "value": "Kimchy",
- "boost": 1
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 94
- },
- "digest": "2a1de18774f9c68cafa169847832b2bc",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\" : {\n \"properties\" : {\n \"full_text\" : { \"type\" : \"text\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "full_text": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 113
- },
- "digest": "d4b4cefba4318caeba7480187faf2b13",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index/_doc/1\n{\n \"full_text\": \"Quick Brown Foxes!\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "full_text": "Quick Brown Foxes!"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 132
- },
- "digest": "cdedd5f33f7e5f7acde561e97bff61de",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET my_index/_search?pretty\n{\n \"query\": {\n \"term\": {\n \"full_text\": \"Quick Brown Foxes!\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "term": {
- "full_text": "Quick Brown Foxes!"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 165
- },
- "digest": "a80f5db4357bb25b8704d374c18318ed",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET my_index/_search?pretty\n{\n \"query\": {\n \"match\": {\n \"full_text\": \"Quick Brown Foxes!\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "match": {
- "full_text": "Quick Brown Foxes!"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/term-query.asciidoc",
- "line": 186
- },
- "digest": "79cf697879cf060401557649bef22730",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 1,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 1,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 0.8630463,\n \"hits\" : [\n {\n \"_index\" : \"my_index\",\n \"_id\" : \"1\",\n \"_score\" : 0.8630463,\n \"_source\" : {\n \"full_text\" : \"Quick Brown Foxes!\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 19
- },
- "digest": "0c4ad860a485fe53d8140ad3ccd11dcf",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"terms\" : {\n \"user\" : [\"kimchy\", \"elasticsearch\"],\n \"boost\" : 1.0\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "user": [
- "kimchy",
- "elasticsearch"
- ],
- "boost": 1
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 127
- },
- "digest": "9e56d79ad9a02b642c361f0b85dd95d7",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\" : {\n \"properties\" : {\n \"color\" : { \"type\" : \"keyword\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "color": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 145
- },
- "digest": "d3088d5fa59b3ab110f64fb4f9b0065c",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index/_doc/1\n{\n \"color\": [\"blue\", \"green\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "color": [
- "blue",
- "green"
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 160
- },
- "digest": "8c5977410335d58217e0626618ce6641",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index/_doc/2\n{\n \"color\": \"blue\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "color": "blue"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 186
- },
- "digest": "d1bcf2eb63a462bfdcf01a68e68d5b4a",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET my_index/_search?pretty\n{\n \"query\": {\n \"terms\": {\n \"color\" : {\n \"index\" : \"my_index\",\n \"id\" : \"2\",\n \"path\" : \"color\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "terms": {
- "color": {
- "index": "my_index",
- "id": "2",
- "path": "color"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-query.asciidoc",
- "line": 206
- },
- "digest": "ca09b9f5e1b649ec0b311ac8f4f9db23",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 17,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 2,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 1.0,\n \"hits\" : [\n {\n \"_index\" : \"my_index\",\n \"_id\" : \"1\",\n \"_score\" : 1.0,\n \"_source\" : {\n \"color\" : [\n \"blue\",\n \"green\"\n ]\n }\n },\n {\n \"_index\" : \"my_index\",\n \"_id\" : \"2\",\n \"_score\" : 1.0,\n \"_source\" : {\n \"color\" : \"blue\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 49
- },
- "digest": "f29bc8beaa219c21be3204e010f5a509",
- "lang": "console",
- "found": [],
- "source": "PUT /job-candidates\n{\n \"mappings\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n },\n \"programming_languages\": {\n \"type\": \"keyword\"\n },\n \"required_matches\": {\n \"type\": \"long\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/job-candidates",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "type": "keyword"
- },
- "programming_languages": {
- "type": "keyword"
- },
- "required_matches": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "job-candidates"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 85
- },
- "digest": "6866beb749ef6dee19d2cb56edc0a9ab",
- "lang": "console",
- "found": [],
- "source": "PUT /job-candidates/_doc/1?refresh\n{\n \"name\": \"Jane Smith\",\n \"programming_languages\": [\"c++\", \"java\"],\n \"required_matches\": 2\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/job-candidates/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "Jane Smith",
- "programming_languages": [
- "c++",
- "java"
- ],
- "required_matches": 2
- },
- "params": {
- "index": "job-candidates",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 107
- },
- "digest": "f7bccd5a51a4000215767e9a6454327f",
- "lang": "console",
- "found": [],
- "source": "PUT /job-candidates/_doc/2?refresh\n{\n \"name\": \"Jason Response\",\n \"programming_languages\": [\"java\", \"php\"],\n \"required_matches\": 2\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/job-candidates/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "name": "Jason Response",
- "programming_languages": [
- "java",
- "php"
- ],
- "required_matches": 2
- },
- "params": {
- "index": "job-candidates",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 136
- },
- "digest": "c5040ac6dc2922f191113e7a5fd5a699",
- "lang": "console",
- "found": [],
- "source": "GET /job-candidates/_search\n{\n \"query\": {\n \"terms_set\": {\n \"programming_languages\": {\n \"terms\": [\"c++\", \"java\", \"php\"],\n \"minimum_should_match_field\": \"required_matches\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/job-candidates/_search",
- "query": null,
- "body": {
- "query": {
- "terms_set": {
- "programming_languages": {
- "terms": [
- "c++",
- "java",
- "php"
- ],
- "minimum_should_match_field": "required_matches"
- }
- }
- }
- },
- "params": {
- "index": "job-candidates"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/terms-set-query.asciidoc",
- "line": 214
- },
- "digest": "cf2e6e604c67175398f6c217b9e86127",
- "lang": "console",
- "found": [],
- "source": "GET /job-candidates/_search\n{\n \"query\": {\n \"terms_set\": {\n \"programming_languages\": {\n \"terms\": [\"c++\", \"java\", \"php\"],\n \"minimum_should_match_script\": {\n \"source\": \"Math.min(params.num_terms, doc['required_matches'].value)\"\n },\n \"boost\": 1.0\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/job-candidates/_search",
- "query": null,
- "body": {
- "query": {
- "terms_set": {
- "programming_languages": {
- "terms": [
- "c++",
- "java",
- "php"
- ],
- "minimum_should_match_script": {
- "source": "Math.min(params.num_terms, doc['required_matches'].value)"
- },
- "boost": 1
- }
- }
- }
- },
- "params": {
- "index": "job-candidates"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "query-dsl/wildcard-query.asciidoc",
- "line": 21
- },
- "digest": "d31062ff8c015387889fed4ad86fd914",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"wildcard\": {\n \"user\": {\n \"value\": \"ki*y\",\n \"boost\": 1.0,\n \"rewrite\": \"constant_score\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "wildcard": {
- "user": {
- "value": "ki*y",
- "boost": 1,
- "rewrite": "constant_score"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 23
- },
- "digest": "206f0e75fbeef6bf3a71f44ca4452452",
- "lang": "console",
- "found": [],
- "source": "PUT /sec_logs/_bulk?refresh\n{\"index\":{\"_index\" : \"sec_logs\", \"_id\" : \"1\"}}\n{ \"@timestamp\": \"2020-12-06T11:04:05.000Z\", \"agent\": { \"id\": \"8a4f500d\" }, \"event\": { \"category\": \"process\", \"id\": \"edwCRnyD\",\"sequence\": 1 }, \"process\": { \"name\": \"cmd.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\" } }\n{\"index\":{\"_index\" : \"sec_logs\", \"_id\" : \"2\"}}\n{ \"@timestamp\": \"2020-12-06T11:04:07.000Z\", \"agent\": { \"id\": \"8a4f500d\" }, \"event\": { \"category\": \"file\", \"id\": \"dGCHwoeS\", \"sequence\": 2 }, \"file\": { \"accessed\": \"2020-12-07T11:07:08.000Z\", \"name\": \"cmd.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\", \"type\": \"file\", \"size\": 16384 }, \"process\": { \"name\": \"cmd.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\" } }\n{\"index\":{\"_index\" : \"sec_logs\", \"_id\" : \"3\"}}\n{ \"@timestamp\": \"2020-12-07T11:06:07.000Z\", \"agent\": { \"id\": \"8a4f500d\" }, \"event\": { \"category\": \"process\", \"id\": \"cMyt5SZ2\", \"sequence\": 3 }, \"process\": { \"name\": \"cmd.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\" } }\n{\"index\":{\"_index\" : \"sec_logs\", \"_id\" : \"4\"}}\n{ \"@timestamp\": \"2020-12-07T11:07:08.000Z\", \"agent\": { \"id\": \"8a4f500d\" }, \"event\": { \"category\": \"file\", \"id\": \"bYA7gPay\", \"sequence\": 4 }, \"file\": { \"accessed\": \"2020-12-07T11:07:08.000Z\", \"name\": \"cmd.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\", \"type\": \"file\", \"size\": 16384 }, \"process\": { \"name\": \"cmd.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\" } }\n{\"index\":{\"_index\" : \"sec_logs\", \"_id\" : \"5\"}}\n{ \"@timestamp\": \"2020-12-07T11:07:09.000Z\", \"agent\": { \"id\": \"8a4f500d\" }, \"event\": { \"category\": \"process\", \"id\": \"aR3NWVOs\", \"sequence\": 5 }, \"process\": { \"name\": \"regsvr32.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\" } }\n{\"index\":{\"_index\" : \"sec_logs\", \"_id\" : \"6\"}}\n{ \"@timestamp\": \"2020-12-07T11:07:10.000Z\", \"agent\": { \"id\": \"8a4f500d\" }, \"event\": { \"category\": \"process\", \"id\": \"GTSmSqgz0U\", \"sequence\": 6, \"type\": \"termination\" }, \"process\": { \"name\": \"regsvr32.exe\", \"path\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\" } }",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/sec_logs/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_index": "sec_logs",
- "_id": "1"
- }
- },
- {
- "@timestamp": "2020-12-06T11:04:05.000Z",
- "agent": {
- "id": "8a4f500d"
- },
- "event": {
- "category": "process",
- "id": "edwCRnyD",
- "sequence": 1
- },
- "process": {
- "name": "cmd.exe",
- "path": "C:\\Windows\\System32\\cmd.exe"
- }
- },
- {
- "index": {
- "_index": "sec_logs",
- "_id": "2"
- }
- },
- {
- "@timestamp": "2020-12-06T11:04:07.000Z",
- "agent": {
- "id": "8a4f500d"
- },
- "event": {
- "category": "file",
- "id": "dGCHwoeS",
- "sequence": 2
- },
- "file": {
- "accessed": "2020-12-07T11:07:08.000Z",
- "name": "cmd.exe",
- "path": "C:\\Windows\\System32\\cmd.exe",
- "type": "file",
- "size": 16384
- },
- "process": {
- "name": "cmd.exe",
- "path": "C:\\Windows\\System32\\cmd.exe"
- }
- },
- {
- "index": {
- "_index": "sec_logs",
- "_id": "3"
- }
- },
- {
- "@timestamp": "2020-12-07T11:06:07.000Z",
- "agent": {
- "id": "8a4f500d"
- },
- "event": {
- "category": "process",
- "id": "cMyt5SZ2",
- "sequence": 3
- },
- "process": {
- "name": "cmd.exe",
- "path": "C:\\Windows\\System32\\cmd.exe"
- }
- },
- {
- "index": {
- "_index": "sec_logs",
- "_id": "4"
- }
- },
- {
- "@timestamp": "2020-12-07T11:07:08.000Z",
- "agent": {
- "id": "8a4f500d"
- },
- "event": {
- "category": "file",
- "id": "bYA7gPay",
- "sequence": 4
- },
- "file": {
- "accessed": "2020-12-07T11:07:08.000Z",
- "name": "cmd.exe",
- "path": "C:\\Windows\\System32\\cmd.exe",
- "type": "file",
- "size": 16384
- },
- "process": {
- "name": "cmd.exe",
- "path": "C:\\Windows\\System32\\cmd.exe"
- }
- },
- {
- "index": {
- "_index": "sec_logs",
- "_id": "5"
- }
- },
- {
- "@timestamp": "2020-12-07T11:07:09.000Z",
- "agent": {
- "id": "8a4f500d"
- },
- "event": {
- "category": "process",
- "id": "aR3NWVOs",
- "sequence": 5
- },
- "process": {
- "name": "regsvr32.exe",
- "path": "C:\\Windows\\System32\\regsvr32.exe"
- }
- },
- {
- "index": {
- "_index": "sec_logs",
- "_id": "6"
- }
- },
- {
- "@timestamp": "2020-12-07T11:07:10.000Z",
- "agent": {
- "id": "8a4f500d"
- },
- "event": {
- "category": "process",
- "id": "GTSmSqgz0U",
- "sequence": 6,
- "type": "termination"
- },
- "process": {
- "name": "regsvr32.exe",
- "path": "C:\\Windows\\System32\\regsvr32.exe"
- }
- }
- ],
- "params": {
- "index": "sec_logs"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 56
- },
- "digest": "975c71db4a64e43901e11e580b685ad8",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"query\": \"\"\"\n process where process.name == \"cmd.exe\"\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "query": "\n process where process.name == \"cmd.exe\"\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 75
- },
- "digest": "35d86685630d061d84d78bba2db4d83f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 60,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 2,\n \"relation\": \"eq\"\n },\n \"events\": [\n {\n \"_index\": \"sec_logs\",\n \"_id\": \"1\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-06T11:04:05.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"process\",\n \"id\": \"edwCRnyD\",\n \"sequence\": 1\n },\n \"process\": {\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n },\n \"sort\": [\n 1607252645000\n ]\n },\n {\n \"_index\": \"sec_logs\",\n \"_id\": \"3\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:06:07.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"process\",\n \"id\": \"cMyt5SZ2\",\n \"sequence\": 3\n },\n \"process\": {\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n },\n \"sort\": [\n 1607339167000\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 166
- },
- "digest": "faccdd71120690698f663e794a85aa71",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"query\": \"\"\"\n sequence\n [ file where file.name == \"cmd.exe\" ]\n [ process where stringContains(process.name, \"regsvr32\") ]\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "query": "\n sequence\n [ file where file.name == \"cmd.exe\" ]\n [ process where stringContains(process.name, \"regsvr32\") ]\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 184
- },
- "digest": "065244f025dee63ff2d3817d70dc35bf",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 60,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"sequences\": [\n {\n \"events\": [\n {\n \"_index\": \"sec_logs\",\n \"_id\": \"4\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:07:08.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"file\",\n \"id\": \"bYA7gPay\",\n \"sequence\": 4\n },\n \"file\": {\n \"accessed\": \"2020-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n },\n \"sort\": [\n 1607339228000\n ]\n },\n {\n \"_index\": \"sec_logs\",\n \"_id\": \"5\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:07:09.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"process\",\n \"id\": \"aR3NWVOs\",\n \"sequence\": 5\n },\n \"process\": {\n \"name\": \"regsvr32.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\"\n }\n },\n \"sort\": [\n 1607339229000\n ]\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 267
- },
- "digest": "91efe8eb8e1feb9e77732e42e13edad8",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"query\": \"\"\"\n sequence with maxspan=1h\n [ file where file.name == \"cmd.exe\" ]\n [ process where stringContains(process.name, \"regsvr32\") ]\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "query": "\n sequence with maxspan=1h\n [ file where file.name == \"cmd.exe\" ]\n [ process where stringContains(process.name, \"regsvr32\") ]\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 286
- },
- "digest": "d046eb2a6a8382532b9729e4d63eedde",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"query\": \"\"\"\n sequence with maxspan=1h\n [ file where file.name == \"cmd.exe\" ] by agent.id\n [ process where stringContains(process.name, \"regsvr32\") ] by agent.id\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "query": "\n sequence with maxspan=1h\n [ file where file.name == \"cmd.exe\" ] by agent.id\n [ process where stringContains(process.name, \"regsvr32\") ] by agent.id\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 302
- },
- "digest": "6096e72461cc84018c4938aac975512c",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"query\": \"\"\"\n sequence by agent.id with maxspan=1h\n [ file where file.name == \"cmd.exe\" ]\n [ process where stringContains(process.name, \"regsvr32\") ]\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "query": "\n sequence by agent.id with maxspan=1h\n [ file where file.name == \"cmd.exe\" ]\n [ process where stringContains(process.name, \"regsvr32\") ]\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 318
- },
- "digest": "40409e919e6bb215032f7117ccd3f908",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 60,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"sequences\": [\n {\n \"join_keys\": [\n \"8a4f500d\"\n ],\n \"events\": [\n {\n \"_index\": \"sec_logs\",\n \"_id\": \"4\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:07:08.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"file\",\n \"id\": \"bYA7gPay\",\n \"sequence\": 4\n },\n \"file\": {\n \"accessed\": \"2020-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n },\n \"sort\": [\n 1607339228000\n ]\n },\n {\n \"_index\": \"sec_logs\",\n \"_id\": \"5\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:07:09.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"process\",\n \"id\": \"aR3NWVOs\",\n \"sequence\": 5\n },\n \"process\": {\n \"name\": \"regsvr32.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\"\n }\n },\n \"sort\": [\n 1607339229000\n ]\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 404
- },
- "digest": "c86cd3e0fe0c09462bdb5508f3961fde",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"query\": \"\"\"\n sequence by agent.id with maxspan=1h\n [ file where file.name == \"cmd.exe\" ]\n [ process where stringContains(process.name, \"regsvr32\") ]\n until [ process where event.type == \"termination\" ]\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "query": "\n sequence by agent.id with maxspan=1h\n [ file where file.name == \"cmd.exe\" ]\n [ process where stringContains(process.name, \"regsvr32\") ]\n until [ process where event.type == \"termination\" ]\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 433
- },
- "digest": "54b76e8d2063652b2cc85aa9b554704e",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"event_category_field\": \"file.type\",\n \"query\": \"\"\"\n file where agent.id == \"8a4f500d\"\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "event_category_field": "file.type",
- "query": "\n file where agent.id == \"8a4f500d\"\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 459
- },
- "digest": "0ccf234774b8263b26cb8a6149ef8855",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"timestamp_field\": \"file.accessed\",\n \"query\": \"\"\"\n file where (file.size > 1 and file.type == \"file\")\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "timestamp_field": "file.accessed",
- "query": "\n file where (file.size > 1 and file.type == \"file\")\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 487
- },
- "digest": "1454d818435a3b3b021172e193898fb9",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"tiebreaker_field\": \"event.id\",\n \"query\": \"\"\"\n process where process.name == \"cmd.exe\" and stringContains(process.path, \"System32\")\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "tiebreaker_field": "event.id",
- "query": "\n process where process.name == \"cmd.exe\" and stringContains(process.path, \"System32\")\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 509
- },
- "digest": "f58ff46e011028541e5bea945651b772",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 34,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 2,\n \"relation\": \"eq\"\n },\n \"events\": [\n {\n \"_index\": \"sec_logs\",\n \"_id\": \"1\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-06T11:04:05.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"process\",\n \"id\": \"edwCRnyD\",\n \"sequence\": 1\n },\n \"process\": {\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n },\n \"sort\": [\n 1607252645000, <1>\n \"edwCRnyD\" <2>\n ]\n },\n {\n \"_index\": \"sec_logs\",\n \"_id\": \"3\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:06:07.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"process\",\n \"id\": \"cMyt5SZ2\",\n \"sequence\": 3\n },\n \"process\": {\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n },\n \"sort\": [\n 1607339167000, <1>\n \"cMyt5SZ2\" <2>\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 598
- },
- "digest": "578e5759595f0322170ea0a12dbf2e77",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"filter\": {\n \"range\" : {\n \"file.size\" : {\n \"gte\" : 1,\n \"lte\" : 1000000\n }\n }\n },\n \"query\": \"\"\"\n file where (file.type == \"file\" and file.name == \"cmd.exe\")\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "filter": {
- "range": {
- "file.size": {
- "gte": 1,
- "lte": 1000000
- }
- }
- },
- "query": "\n file where (file.type == \"file\" and file.name == \"cmd.exe\")\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 663
- },
- "digest": "064c537d2f3b930ef835f5d3ff39e69e",
- "lang": "console",
- "found": [],
- "source": "GET /frozen_sec_logs/_eql/search\n{\n \"wait_for_completion_timeout\": \"2s\",\n \"query\": \"\"\"\n process where process.name == \"cmd.exe\"\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/frozen_sec_logs/_eql/search",
- "query": null,
- "body": {
- "wait_for_completion_timeout": "2s",
- "query": "\n process where process.name == \"cmd.exe\"\n "
- },
- "params": {
- "index": "frozen_sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 679
- },
- "digest": "109c26a2fc0d07c401f5a94feab0fe39",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\": \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n \"is_partial\": true,\n \"is_running\": true,\n \"took\": 2000,\n \"timed_out\": false,\n \"hits\": ...\n}"
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 713
- },
- "digest": "1cca4bb2f0ea7e43181be8bd965149d4",
- "lang": "console",
- "found": [],
- "source": "GET /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=2s",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
- "query": {
- "wait_for_completion_timeout": "2s"
- },
- "body": null,
- "params": {
- "id": "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE="
- },
- "api": "eql.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 723
- },
- "digest": "35f8ce328a42fecfb979e43fdc246516",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\": \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 2000,\n \"timed_out\": false,\n \"hits\": ...\n}"
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 758
- },
- "digest": "eacb7a2758eca6898f79b87d471f91c2",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"keep_alive\": \"2d\",\n \"wait_for_completion_timeout\": \"2s\",\n \"query\": \"\"\"\n process where process.name == \"cmd.exe\"\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "keep_alive": "2d",
- "wait_for_completion_timeout": "2s",
- "query": "\n process where process.name == \"cmd.exe\"\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 782
- },
- "digest": "6693f0ffa0de3229b5dedda197810e70",
- "lang": "console",
- "found": [],
- "source": "GET /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?keep_alive=5d",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
- "query": {
- "keep_alive": "5d"
- },
- "body": null,
- "params": {
- "id": "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE="
- },
- "api": "eql.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 799
- },
- "digest": "636e5683c31983de60a48599ede620f9",
- "lang": "console",
- "found": [],
- "source": "DELETE /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?keep_alive=5d",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
- "query": {
- "keep_alive": "5d"
- },
- "body": null,
- "params": {
- "id": "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE="
- },
- "api": "eql.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 824
- },
- "digest": "ff9c97030694613b932f46b464eacb4a",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"keep_on_completion\": true,\n \"wait_for_completion_timeout\": \"2s\",\n \"query\": \"\"\"\n process where process.name == \"cmd.exe\"\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "keep_on_completion": true,
- "wait_for_completion_timeout": "2s",
- "query": "\n process where process.name == \"cmd.exe\"\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 840
- },
- "digest": "d6afd0b695bfaba91e3b1bf71c1f9c9d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\": \"FjlmbndxNmJjU0RPdExBTGg0elNOOEEaQk9xSjJBQzBRMldZa1VVQ2pPa01YUToxMDY=\",\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 52,\n \"timed_out\": false,\n \"hits\": ...\n}"
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 858
- },
- "digest": "a669e9d56e34c95ef4c780e92ed307f1",
- "lang": "console",
- "found": [],
- "source": "GET /_eql/search/FjlmbndxNmJjU0RPdExBTGg0elNOOEEaQk9xSjJBQzBRMldZa1VVQ2pPa01YUToxMDY=",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_eql/search/FjlmbndxNmJjU0RPdExBTGg0elNOOEEaQk9xSjJBQzBRMldZa1VVQ2pPa01YUToxMDY=",
- "query": null,
- "body": null,
- "params": {
- "id": "FjlmbndxNmJjU0RPdExBTGg0elNOOEEaQk9xSjJBQzBRMldZa1VVQ2pPa01YUToxMDY="
- },
- "api": "eql.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/search.asciidoc",
- "line": 890
- },
- "digest": "dd0425bddeaeae24e6a5d517563df6c2",
- "lang": "console",
- "found": [],
- "source": "GET /sec_logs/_eql/search\n{\n \"keep_on_completion\": true,\n \"case_sensitive\": true,\n \"query\": \"\"\"\n process where stringContains(process.path, \"System32\")\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sec_logs/_eql/search",
- "query": null,
- "body": {
- "keep_on_completion": true,
- "case_sensitive": true,
- "query": "\n process where stringContains(process.path, \"System32\")\n "
- },
- "params": {
- "index": "sec_logs"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/getting-started.asciidoc",
- "line": 10
- },
- "digest": "0a46ac2968a574ce145f197f10d30152",
- "lang": "console",
- "found": [],
- "source": "PUT /library/_bulk?refresh\n{\"index\":{\"_id\": \"Leviathan Wakes\"}}\n{\"name\": \"Leviathan Wakes\", \"author\": \"James S.A. Corey\", \"release_date\": \"2011-06-02\", \"page_count\": 561}\n{\"index\":{\"_id\": \"Hyperion\"}}\n{\"name\": \"Hyperion\", \"author\": \"Dan Simmons\", \"release_date\": \"1989-05-26\", \"page_count\": 482}\n{\"index\":{\"_id\": \"Dune\"}}\n{\"name\": \"Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1965-06-01\", \"page_count\": 604}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/library/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": "Leviathan Wakes"
- }
- },
- {
- "name": "Leviathan Wakes",
- "author": "James S.A. Corey",
- "release_date": "2011-06-02",
- "page_count": 561
- },
- {
- "index": {
- "_id": "Hyperion"
- }
- },
- {
- "name": "Hyperion",
- "author": "Dan Simmons",
- "release_date": "1989-05-26",
- "page_count": 482
- },
- {
- "index": {
- "_id": "Dune"
- }
- },
- {
- "name": "Dune",
- "author": "Frank Herbert",
- "release_date": "1965-06-01",
- "page_count": 604
- }
- ],
- "params": {
- "index": "library"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/getting-started.asciidoc",
- "line": 23
- },
- "digest": "53b14d640c4c48a5e7ea86ddc26bee64",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library WHERE release_date < '2000-01-01'\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library WHERE release_date < '2000-01-01'"
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 22
- },
- "digest": "4870ece3455f2b5c34eccaa9492f3894",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC LIMIT 5"
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 114
- },
- "digest": "b649c4dc7d187a27d2112f59e62cecea",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=csv\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "csv"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 139
- },
- "digest": "8b8c48b5fcfaaec794875537d3be2e62",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=json\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "json"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 151
- },
- "digest": "e47728a317fe6f33854f328847cd3881",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"columns\": [\n {\"name\": \"author\", \"type\": \"text\"},\n {\"name\": \"name\", \"type\": \"text\"},\n {\"name\": \"page_count\", \"type\": \"short\"},\n {\"name\": \"release_date\", \"type\": \"datetime\"}\n ],\n \"rows\": [\n [\"Peter F. Hamilton\", \"Pandora's Star\", 768, \"2004-03-02T00:00:00.000Z\"],\n [\"Vernor Vinge\", \"A Fire Upon the Deep\", 613, \"1992-06-01T00:00:00.000Z\"],\n [\"Frank Herbert\", \"Dune\", 604, \"1965-06-01T00:00:00.000Z\"],\n [\"Alastair Reynolds\", \"Revelation Space\", 585, \"2000-03-15T00:00:00.000Z\"],\n [\"James S.A. Corey\", \"Leviathan Wakes\", 561, \"2011-06-02T00:00:00.000Z\"]\n ],\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWWWdrRlVfSS1TbDYtcW9lc1FJNmlYdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl+v///w8=\"\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 174
- },
- "digest": "92d82b9d1bda5a8ae1117d03413f4e67",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=tsv\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "tsv"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 200
- },
- "digest": "a972c38ee41dc899708825790a113cb8",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 227
- },
- "digest": "d38b8ef18ca89eafb1e175ec9a393259",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=yaml\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "yaml"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 282
- },
- "digest": "212042898296f208dbf957f33c07e3b2",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=json\n{\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "json"
- },
- "body": {
- "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8="
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 294
- },
- "digest": "96d85cb20318cdd8edb5c1c7611d3e6f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"rows\" : [\n [\"Dan Simmons\", \"Hyperion\", 482, \"1989-05-26T00:00:00.000Z\"],\n [\"Iain M. Banks\", \"Consider Phlebas\", 471, \"1987-04-23T00:00:00.000Z\"],\n [\"Neal Stephenson\", \"Snow Crash\", 470, \"1992-06-01T00:00:00.000Z\"],\n [\"Frank Herbert\", \"God Emperor of Dune\", 454, \"1981-05-28T00:00:00.000Z\"],\n [\"Frank Herbert\", \"Children of Dune\", 408, \"1976-04-21T00:00:00.000Z\"]\n ],\n \"cursor\" : \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWODRMaXBUaVlRN21iTlRyWHZWYUdrdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl9f///w8=\"\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 319
- },
- "digest": "cc5dfc9aa125e3fd03f523fc2c356f63",
- "lang": "console",
- "found": [],
- "source": "POST /_sql/close\n{\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql/close",
- "query": null,
- "body": {
- "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8="
- },
- "params": null,
- "api": "sql.clear_cursor"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 331
- },
- "digest": "56e5e91d300c0102055e478162f304af",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"succeeded\" : true\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 346
- },
- "digest": "683da0a8624bc03c79a3db8ffab43f0b",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"filter\": {\n \"range\": {\n \"page_count\": {\n \"gte\" : 100,\n \"lte\" : 200\n }\n }\n },\n \"fetch_size\": 5\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "filter": {
- "range": {
- "page_count": {
- "gte": 100,
- "lte": 200
- }
- }
- },
- "fetch_size": 5
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 380
- },
- "digest": "acc0bf5e777f8fc833b7928fdd17ea3e",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n \"query\": \"SELECT * FROM library\",\n \"filter\": {\n \"terms\": {\n \"_routing\": [\"abc\"]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT * FROM library",
- "filter": {
- "terms": {
- "_routing": [
- "abc"
- ]
- }
- }
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 404
- },
- "digest": "c11dc94839b861235b4943f046e15997",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=json\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 5,\n \"columnar\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "json"
- },
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 5,
- "columnar": true
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 417
- },
- "digest": "4b810caadb3079f3a9420d4e108722e7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"columns\": [\n {\"name\": \"author\", \"type\": \"text\"},\n {\"name\": \"name\", \"type\": \"text\"},\n {\"name\": \"page_count\", \"type\": \"short\"},\n {\"name\": \"release_date\", \"type\": \"datetime\"}\n ],\n \"values\": [\n [\"Peter F. Hamilton\", \"Vernor Vinge\", \"Frank Herbert\", \"Alastair Reynolds\", \"James S.A. Corey\"],\n [\"Pandora's Star\", \"A Fire Upon the Deep\", \"Dune\", \"Revelation Space\", \"Leviathan Wakes\"],\n [768, 613, 604, 585, 561],\n [\"2004-03-02T00:00:00.000Z\", \"1992-06-01T00:00:00.000Z\", \"1965-06-01T00:00:00.000Z\", \"2000-03-15T00:00:00.000Z\", \"2011-06-02T00:00:00.000Z\"]\n ],\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWWWdrRlVfSS1TbDYtcW9lc1FJNmlYdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl+v///w8=\"\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 440
- },
- "digest": "15089efd5a5a72234fdb91c111adb3c1",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=json\n{\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWWWdrRlVfSS1TbDYtcW9lc1FJNmlYdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl+v///w8=\",\n \"columnar\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "json"
- },
- "body": {
- "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWWWdrRlVfSS1TbDYtcW9lc1FJNmlYdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl+v///w8=",
- "columnar": true
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 453
- },
- "digest": "efe6a7998fffc2a7289335f9b5643bc2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"values\": [\n [\"Dan Simmons\", \"Iain M. Banks\", \"Neal Stephenson\", \"Frank Herbert\", \"Frank Herbert\"],\n [\"Hyperion\", \"Consider Phlebas\", \"Snow Crash\", \"God Emperor of Dune\", \"Children of Dune\"],\n [482, 471, 470, 454, 408],\n [\"1989-05-26T00:00:00.000Z\", \"1987-04-23T00:00:00.000Z\", \"1992-06-01T00:00:00.000Z\", \"1981-05-28T00:00:00.000Z\", \"1976-04-21T00:00:00.000Z\"]\n ],\n \"cursor\": \"46ToAwFzQERYRjFaWEo1UVc1a1JtVjBZMmdCQUFBQUFBQUFBQUVXWjBaNlFXbzNOV0pVY21Wa1NUZDJhV2t3V2xwblp3PT3/////DwQBZgZhdXRob3IBBHRleHQAAAFmBG5hbWUBBHRleHQAAAFmCnBhZ2VfY291bnQBBGxvbmcBAAFmDHJlbGVhc2VfZGF0ZQEIZGF0ZXRpbWUBAAEP\"\n}"
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 473
- },
- "digest": "172d150e56a225155a62c7b18bf8da67",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n\t\"query\": \"SELECT YEAR(release_date) AS year FROM library WHERE page_count > 300 AND author = 'Frank Herbert' GROUP BY year HAVING COUNT(*) > 0\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT YEAR(release_date) AS year FROM library WHERE page_count > 300 AND author = 'Frank Herbert' GROUP BY year HAVING COUNT(*) > 0"
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/rest.asciidoc",
- "line": 484
- },
- "digest": "d9e0cba8e150681d861f5fd1545514e2",
- "lang": "console",
- "found": [],
- "source": "POST /_sql?format=txt\n{\n\t\"query\": \"SELECT YEAR(release_date) AS year FROM library WHERE page_count > ? AND author = ? GROUP BY year HAVING COUNT(*) > ?\",\n\t\"params\": [300, \"Frank Herbert\", 0]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql",
- "query": {
- "format": "txt"
- },
- "body": {
- "query": "SELECT YEAR(release_date) AS year FROM library WHERE page_count > ? AND author = ? GROUP BY year HAVING COUNT(*) > ?",
- "params": [
- 300,
- "Frank Herbert",
- 0
- ]
- },
- "params": null,
- "api": "sql.query"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/translate.asciidoc",
- "line": 10
- },
- "digest": "8097472be12fcbe8652f03e398e49972",
- "lang": "console",
- "found": [],
- "source": "POST /_sql/translate\n{\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_sql/translate",
- "query": null,
- "body": {
- "query": "SELECT * FROM library ORDER BY page_count DESC",
- "fetch_size": 10
- },
- "params": null,
- "api": "sql.translate"
- }
- ]
- },
- {
- "source_location": {
- "file": "sql/endpoints/translate.asciidoc",
- "line": 22
- },
- "digest": "8b1e1a7c16b57df49f15d070d6200a89",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"size\" : 10,\n \"docvalue_fields\" : [\n {\n \"field\": \"release_date\",\n \"format\": \"epoch_millis\"\n }\n ],\n \"_source\": {\n \"includes\": [\n \"author\",\n \"name\",\n \"page_count\"\n ],\n \"excludes\": []\n },\n \"sort\" : [\n {\n \"page_count\" : {\n \"order\" : \"desc\",\n \"missing\" : \"_first\",\n \"unmapped_type\" : \"short\"\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 10
- },
- "digest": "d9d28e9e9d7021a72c983f8e79aa8c6c",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"avg_grade\" : { \"avg\" : { \"field\" : \"grade\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "avg_grade": {
- "avg": {
- "field": "grade"
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 23
- },
- "digest": "aeb4454d959a0dc33d71380075657346",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"avg_grade\": {\n \"value\": 75.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 42
- },
- "digest": "d05bbafb8c88850879b5990119a96f5e",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"avg_grade\" : {\n \"avg\" : {\n \"script\" : {\n \"source\" : \"doc.grade.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "avg_grade": {
- "avg": {
- "script": {
- "source": "doc.grade.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 61
- },
- "digest": "c04f4a48d0cb550a879fdc93454852de",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"avg_grade\" : {\n \"avg\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"grade\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "avg_grade": {
- "avg": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "grade"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 85
- },
- "digest": "91994d98e766230911b3e659b3e51f17",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"avg_corrected_grade\" : {\n \"avg\" : {\n \"field\" : \"grade\",\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"_value * params.correction\",\n \"params\" : {\n \"correction\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "avg_corrected_grade": {
- "avg": {
- "field": "grade",
- "script": {
- "lang": "painless",
- "source": "_value * params.correction",
- "params": {
- "correction": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 113
- },
- "digest": "2ec33e09d6080723ee2013bad694f35a",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grade_avg\" : {\n \"avg\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grade_avg": {
- "avg": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 139
- },
- "digest": "da2382a59a4200333accd75be74c6136",
- "lang": "console",
- "found": [],
- "source": "PUT metrics_index/_doc/1\n{\n \"network.name\" : \"net-1\",\n \"latency_histo\" : {\n \"values\" : [0.1, 0.2, 0.3, 0.4, 0.5], <1>\n \"counts\" : [3, 7, 23, 12, 6] <2>\n }\n}\n\nPUT metrics_index/_doc/2\n{\n \"network.name\" : \"net-2\",\n \"latency_histo\" : {\n \"values\" : [0.1, 0.2, 0.3, 0.4, 0.5], <1>\n \"counts\" : [8, 17, 8, 7, 6] <2>\n }\n}\n\nPOST /metrics_index/_search?size=0\n{\n \"aggs\" : {\n \"avg_latency\" :\n { \"avg\" : { \"field\" : \"latency_histo\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/metrics_index/_doc/1",
- "query": null,
- "body": {
- "network.name": "net-1",
- "latency_histo": {
- "values": [
- 0.1,
- 0.2,
- 0.3,
- 0.4,
- 0.5
- ],
- "counts": [
- 3,
- 7,
- 23,
- 12,
- 6
- ]
- }
- },
- "params": {
- "index": "metrics_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/metrics_index/_doc/2",
- "query": null,
- "body": {
- "network.name": "net-2",
- "latency_histo": {
- "values": [
- 0.1,
- 0.2,
- 0.3,
- 0.4,
- 0.5
- ],
- "counts": [
- 8,
- 17,
- 8,
- 7,
- 6
- ]
- }
- },
- "params": {
- "index": "metrics_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/metrics_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "avg_latency": {
- "avg": {
- "field": "latency_histo"
- }
- }
- }
- },
- "params": {
- "index": "metrics_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/avg-aggregation.asciidoc",
- "line": 172
- },
- "digest": "7a04eebca1af36e35a0298af8dadce40",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"avg_latency\" : {\n \"value\" : 0.29690721649\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 55
- },
- "digest": "c15dead46d351f62cfc066f1ca1a24eb",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"weighted_grade\": {\n \"weighted_avg\": {\n \"value\": {\n \"field\": \"grade\"\n },\n \"weight\": {\n \"field\": \"weight\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "weighted_grade": {
- "weighted_avg": {
- "value": {
- "field": "grade"
- },
- "weight": {
- "field": "weight"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 78
- },
- "digest": "476e06fa321ef1237e40aaaec3b3d642",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"weighted_grade\": {\n \"value\": 70.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 101
- },
- "digest": "4c15a4b054c7d0aaaa17deaff853bb28",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_doc?refresh\n{\n \"grade\": [1, 2, 3],\n \"weight\": 2\n}\n\nPOST /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"weighted_grade\": {\n \"weighted_avg\": {\n \"value\": {\n \"field\": \"grade\"\n },\n \"weight\": {\n \"field\": \"weight\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "grade": [
- 1,
- 2,
- 3
- ],
- "weight": 2
- },
- "params": {
- "index": "exams"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "weighted_grade": {
- "weighted_avg": {
- "value": {
- "field": "grade"
- },
- "weight": {
- "field": "weight"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 130
- },
- "digest": "d1823ccb5a2e9d8699555b94a5b32093",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"weighted_grade\": {\n \"value\": 2.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 151
- },
- "digest": "e88e8c78ed50936c8b7436c90b988ddf",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"weighted_grade\": {\n \"weighted_avg\": {\n \"value\": {\n \"script\": \"doc.grade.value + 1\"\n },\n \"weight\": {\n \"script\": \"doc.weight.value + 1\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "weighted_grade": {
- "weighted_avg": {
- "value": {
- "script": "doc.grade.value + 1"
- },
- "weight": {
- "script": "doc.weight.value + 1"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/weighted-avg-aggregation.asciidoc",
- "line": 183
- },
- "digest": "cebfe0fed62091eb38b6348c89643f89",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"weighted_grade\": {\n \"weighted_avg\": {\n \"value\": {\n \"field\": \"grade\",\n \"missing\": 2\n },\n \"weight\": {\n \"field\": \"weight\",\n \"missing\": 3\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "weighted_grade": {
- "weighted_avg": {
- "value": {
- "field": "grade",
- "missing": 2
- },
- "weight": {
- "field": "weight",
- "missing": 3
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 30
- },
- "digest": "2203588f4793e0e99ccd9240b5afdff7",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_boxplot\" : {\n \"boxplot\" : {\n \"field\" : \"load_time\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_boxplot": {
- "boxplot": {
- "field": "load_time"
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 49
- },
- "digest": "4a44dd3daabcf9f3624dfdb7d26e1c72",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_boxplot\": {\n \"min\": 0.0,\n \"max\": 990.0,\n \"q1\": 165.0,\n \"q2\": 445.0,\n \"q3\": 725.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 73
- },
- "digest": "c2d1756ceca8fdc40a2b97ea275de676",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_boxplot\" : {\n \"boxplot\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['load_time'].value / params.timeUnit\", <1>\n \"params\" : {\n \"timeUnit\" : 1000 <2>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_boxplot": {
- "boxplot": {
- "script": {
- "lang": "painless",
- "source": "doc['load_time'].value / params.timeUnit",
- "params": {
- "timeUnit": 1000
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 102
- },
- "digest": "ae2331b7e35af4bbc4df7b98f2527c7f",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_boxplot\" : {\n \"boxplot\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"load_time\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_boxplot": {
- "boxplot": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "load_time"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 143
- },
- "digest": "195af3fda6cb2811d40e22fc54cd3286",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_boxplot\" : {\n \"boxplot\" : {\n \"field\" : \"load_time\",\n \"compression\" : 200 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_boxplot": {
- "boxplot": {
- "field": "load_time",
- "compression": 200
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/boxplot-aggregation.asciidoc",
- "line": 170
- },
- "digest": "71387a61dd965479b767c8dcea1478a9",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grade_boxplot\" : {\n \"boxplot\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grade_boxplot": {
- "boxplot": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 11
- },
- "digest": "826140cdd3d5fe9a728239605c6dc71a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_count\" : {\n \"cardinality\" : {\n \"field\" : \"type\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_count": {
- "cardinality": {
- "field": "type"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 28
- },
- "digest": "ea974de430642c6289d33f750583a1cf",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"type_count\" : {\n \"value\" : 3\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 45
- },
- "digest": "edbd54e71e56f3a5617aa012b100aa0f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_count\" : {\n \"cardinality\" : {\n \"field\" : \"type\",\n \"precision_threshold\": 100 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_count": {
- "cardinality": {
- "field": "type",
- "precision_threshold": 100
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 185
- },
- "digest": "ef3a3e292e9e74d42703555178ed5fb6",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_promoted_count\" : {\n \"cardinality\" : {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['type'].value + ' ' + doc['promoted'].value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_promoted_count": {
- "cardinality": {
- "script": {
- "lang": "painless",
- "source": "doc['type'].value + ' ' + doc['promoted'].value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 205
- },
- "digest": "6969b29883eefa552475ae1837dc5f96",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_promoted_count\" : {\n \"cardinality\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"type_field\": \"type\",\n \"promoted_field\": \"promoted\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_promoted_count": {
- "cardinality": {
- "script": {
- "id": "my_script",
- "params": {
- "type_field": "type",
- "promoted_field": "promoted"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/cardinality-aggregation.asciidoc",
- "line": 232
- },
- "digest": "7d86ff090cbd87f144edb72e949470b3",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"tag_cardinality\" : {\n \"cardinality\" : {\n \"field\" : \"tag\",\n \"missing\": \"N/A\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "tag_cardinality": {
- "cardinality": {
- "field": "tag",
- "missing": "N/A"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 11
- },
- "digest": "6f04f3c1afe94e03d26ff5966fd4b98d",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : { \"stats\" : { \"field\" : \"grade\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "field": "grade"
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 25
- },
- "digest": "b34f77613fdfc280bcd958a542d438a1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"grades_stats\": {\n \"count\": 2,\n \"min\": 50.0,\n \"max\": 100.0,\n \"avg\": 75.0,\n \"sum\": 150.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 49
- },
- "digest": "9ed80262680e67c629a08f6754a7c5c9",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : {\n \"stats\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['grade'].value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "script": {
- "lang": "painless",
- "source": "doc['grade'].value"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 69
- },
- "digest": "2ba8575100b37b85d0052d46a00ce4cd",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : {\n \"stats\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\" : {\n \"field\" : \"grade\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "grade"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 93
- },
- "digest": "1341888a2677cf6e1db11e6cab2dd8ce",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : {\n \"stats\" : {\n \"field\" : \"grade\",\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"_value * params.correction\",\n \"params\" : {\n \"correction\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "field": "grade",
- "script": {
- "lang": "painless",
- "source": "_value * params.correction",
- "params": {
- "correction": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/stats-aggregation.asciidoc",
- "line": 121
- },
- "digest": "7371dcfe4adb43996f4c26684318302b",
- "lang": "console",
- "found": [],
- "source": "POST /exams/_search?size=0\n{\n \"aggs\" : {\n \"grades_stats\" : {\n \"stats\" : {\n \"field\" : \"grade\",\n \"missing\": 0 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/exams/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "grades_stats": {
- "stats": {
- "field": "grade",
- "missing": 0
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 11
- },
- "digest": "b1c3e5c4a1a22ac329bbdec4d0de1082",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : { \"extended_stats\" : { \"field\" : \"grade\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "field": "grade"
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 27
- },
- "digest": "5f827fa1d422db3c4bd3f580a6931c78",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"grades_stats\": {\n \"count\": 2,\n \"min\": 50.0,\n \"max\": 100.0,\n \"avg\": 75.0,\n \"sum\": 150.0,\n \"sum_of_squares\": 12500.0,\n \"variance\": 625.0,\n \"variance_population\": 625.0,\n \"variance_sampling\": 1250.0,\n \"std_deviation\": 25.0,\n \"std_deviation_population\": 25.0,\n \"std_deviation_sampling\": 35.35533905932738,\n \"std_deviation_bounds\": {\n \"upper\": 125.0,\n \"lower\": 25.0,\n \"upper_population\" : 125.0,\n \"lower_population\" : 25.0,\n \"upper_sampling\" : 145.71067811865476,\n \"lower_sampling\" : 4.289321881345245\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 67
- },
- "digest": "eb8df98231df40c61f5feef4946b1a92",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"field\" : \"grade\",\n \"sigma\" : 3 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "field": "grade",
- "sigma": 3
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 103
- },
- "digest": "83476d04b393850da0697e1bfae58b4a",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"script\" : {\n \"source\" : \"doc['grade'].value\",\n \"lang\" : \"painless\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "script": {
- "source": "doc['grade'].value",
- "lang": "painless"
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 124
- },
- "digest": "2cf036d054901b5d7b4a84780c320f2d",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"grade\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "grade"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 149
- },
- "digest": "533b447e1ca8c575e38ecd9b1917c17c",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"field\" : \"grade\",\n \"script\" : {\n \"lang\" : \"painless\",\n \"source\": \"_value * params.correction\",\n \"params\" : {\n \"correction\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "field": "grade",
- "script": {
- "lang": "painless",
- "source": "_value * params.correction",
- "params": {
- "correction": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/extendedstats-aggregation.asciidoc",
- "line": 178
- },
- "digest": "44a7cf8482bdc3d1c11f4b3b35683b99",
- "lang": "console",
- "found": [],
- "source": "GET /exams/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grades_stats\" : {\n \"extended_stats\" : {\n \"field\" : \"grade\",\n \"missing\": 0 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/exams/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grades_stats": {
- "extended_stats": {
- "field": "grade",
- "missing": 0
- }
- }
- }
- },
- "params": {
- "index": "exams"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geobounds-aggregation.asciidoc",
- "line": 10
- },
- "digest": "34cabdecfe9c2cb8dd929853882564eb",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"query\" : {\n \"match\" : { \"name\" : \"musée\" }\n },\n \"aggs\" : {\n \"viewport\" : {\n \"geo_bounds\" : {\n \"field\" : \"location\", <1>\n \"wrap_longitude\" : true <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "match": {
- "name": "musée"
- }
- },
- "aggs": {
- "viewport": {
- "geo_bounds": {
- "field": "location",
- "wrap_longitude": true
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geobounds-aggregation.asciidoc",
- "line": 60
- },
- "digest": "bd82ab8462b3dcd1bef1892e75277e67",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"viewport\": {\n \"bounds\": {\n \"top_left\": {\n \"lat\": 48.86111099738628,\n \"lon\": 2.3269999679178\n },\n \"bottom_right\": {\n \"lat\": 48.85999997612089,\n \"lon\": 2.3363889567553997\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geobounds-aggregation.asciidoc",
- "line": 90
- },
- "digest": "930f51600604a9cc3eae43d7fbbc633a",
- "lang": "console",
- "found": [],
- "source": "PUT /places\n{\n \"mappings\": {\n \"properties\": {\n \"geometry\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}\n\nPOST /places/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"name\": \"NEMO Science Museum\", \"geometry\": \"POINT(4.912350 52.374081)\" }\n{\"index\":{\"_id\":2}}\n{\"name\": \"Sportpark De Weeren\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [ [ [ 4.965305328369141, 52.39347642069457 ], [ 4.966979026794433, 52.391721758934835 ], [ 4.969425201416015, 52.39238958618537 ], [ 4.967944622039794, 52.39420969150824 ], [ 4.965305328369141, 52.39347642069457 ] ] ] } }\n\nPOST /places/_search?size=0\n{\n \"aggs\" : {\n \"viewport\" : {\n \"geo_bounds\" : {\n \"field\" : \"geometry\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/places",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geometry": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "places"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/places/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "name": "NEMO Science Museum",
- "geometry": "POINT(4.912350 52.374081)"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "name": "Sportpark De Weeren",
- "geometry": {
- "type": "Polygon",
- "coordinates": [
- [
- [
- 4.965305328369141,
- 52.39347642069457
- ],
- [
- 4.966979026794433,
- 52.391721758934835
- ],
- [
- 4.969425201416015,
- 52.39238958618537
- ],
- [
- 4.967944622039794,
- 52.39420969150824
- ],
- [
- 4.965305328369141,
- 52.39347642069457
- ]
- ]
- ]
- }
- }
- ],
- "params": {
- "index": "places"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/places/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "viewport": {
- "geo_bounds": {
- "field": "geometry"
- }
- }
- }
- },
- "params": {
- "index": "places"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geobounds-aggregation.asciidoc",
- "line": 122
- },
- "digest": "1c31aca65456fa75273a4c6a063fd42c",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"viewport\": {\n \"bounds\": {\n \"top_left\": {\n \"lat\": 52.39420966710895,\n \"lon\": 4.912349972873926\n },\n \"bottom_right\": {\n \"lat\": 52.374080987647176,\n \"lon\": 4.969425117596984\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 9
- },
- "digest": "d0cf6057bc87042819a7ac961d1b2273",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"city\": \"Amsterdam\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"city\": \"Amsterdam\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"city\": \"Amsterdam\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"city\": \"Antwerp\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"city\": \"Paris\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"city\": \"Paris\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"aggs\" : {\n \"centroid\" : {\n \"geo_centroid\" : {\n \"field\" : \"location\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "city": "Amsterdam",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "city": "Amsterdam",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "city": "Amsterdam",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "city": "Antwerp",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "city": "Paris",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "city": "Paris",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "centroid": {
- "geo_centroid": {
- "field": "location"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 54
- },
- "digest": "85da750740194c53e24eb140564f22b6",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"centroid\": {\n \"location\": {\n \"lat\": 51.00982965203002,\n \"lon\": 3.9662131341174245\n },\n \"count\": 6\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 75
- },
- "digest": "6dec421bf327ecaf189109d9aaa35919",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"cities\" : {\n \"terms\" : { \"field\" : \"city.keyword\" },\n \"aggs\" : {\n \"centroid\" : {\n \"geo_centroid\" : { \"field\" : \"location\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "cities": {
- "terms": {
- "field": "city.keyword"
- },
- "aggs": {
- "centroid": {
- "geo_centroid": {
- "field": "location"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 99
- },
- "digest": "abd50e099fcc1119a285e9b83c66d1e0",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"cities\": {\n \"sum_other_doc_count\": 0,\n \"doc_count_error_upper_bound\": 0,\n \"buckets\": [\n {\n \"key\": \"Amsterdam\",\n \"doc_count\": 3,\n \"centroid\": {\n \"location\": {\n \"lat\": 52.371655656024814,\n \"lon\": 4.909563297405839\n },\n \"count\": 3\n }\n },\n {\n \"key\": \"Paris\",\n \"doc_count\": 2,\n \"centroid\": {\n \"location\": {\n \"lat\": 48.86055548675358,\n \"lon\": 2.3316944623366\n },\n \"count\": 2\n }\n },\n {\n \"key\": \"Antwerp\",\n \"doc_count\": 1,\n \"centroid\": {\n \"location\": {\n \"lat\": 51.22289997059852,\n \"lon\": 4.40519998781383\n },\n \"count\": 1\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 179
- },
- "digest": "b65debaad33edbdd024fad3d72c626b6",
- "lang": "console",
- "found": [],
- "source": "PUT /places\n{\n \"mappings\": {\n \"properties\": {\n \"geometry\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}\n\nPOST /places/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"name\": \"NEMO Science Museum\", \"geometry\": \"POINT(4.912350 52.374081)\" }\n{\"index\":{\"_id\":2}}\n{\"name\": \"Sportpark De Weeren\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [ [ [ 4.965305328369141, 52.39347642069457 ], [ 4.966979026794433, 52.391721758934835 ], [ 4.969425201416015, 52.39238958618537 ], [ 4.967944622039794, 52.39420969150824 ], [ 4.965305328369141, 52.39347642069457 ] ] ] } }\n\nPOST /places/_search?size=0\n{\n \"aggs\" : {\n \"centroid\" : {\n \"geo_centroid\" : {\n \"field\" : \"geometry\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/places",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geometry": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "places"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/places/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "name": "NEMO Science Museum",
- "geometry": "POINT(4.912350 52.374081)"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "name": "Sportpark De Weeren",
- "geometry": {
- "type": "Polygon",
- "coordinates": [
- [
- [
- 4.965305328369141,
- 52.39347642069457
- ],
- [
- 4.966979026794433,
- 52.391721758934835
- ],
- [
- 4.969425201416015,
- 52.39238958618537
- ],
- [
- 4.967944622039794,
- 52.39420969150824
- ],
- [
- 4.965305328369141,
- 52.39347642069457
- ]
- ]
- ]
- }
- }
- ],
- "params": {
- "index": "places"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/places/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "centroid": {
- "geo_centroid": {
- "field": "geometry"
- }
- }
- }
- },
- "params": {
- "index": "places"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/geocentroid-aggregation.asciidoc",
- "line": 211
- },
- "digest": "213fdf648e4925909f7afd02d99c7797",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"centroid\": {\n \"location\": {\n \"lat\": 52.39296147599816,\n \"lon\": 4.967404240742326\n },\n \"count\": 2\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 16
- },
- "digest": "9498a707be49e14dad801db6b6824e34",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"max_price\" : { \"max\" : { \"field\" : \"price\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "max_price": {
- "max": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 29
- },
- "digest": "389b810e5524c81eaa863d850635492e",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"max_price\": {\n \"value\": 200.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 51
- },
- "digest": "736fc5448b66962ceef1e6d5948ef691",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"max_price\" : {\n \"max\" : {\n \"script\" : {\n \"source\" : \"doc.price.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "max_price": {
- "max": {
- "script": {
- "source": "doc.price.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 71
- },
- "digest": "b5e782e309a2a10db272414e8483d8dc",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"max_price\" : {\n \"max\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"price\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "max_price": {
- "max": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 98
- },
- "digest": "23fdba37454d6d7abf6bfbb4fd01692f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"max_price_in_euros\" : {\n \"max\" : {\n \"field\" : \"price\",\n \"script\" : {\n \"source\" : \"_value * params.conversion_rate\",\n \"params\" : {\n \"conversion_rate\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "max_price_in_euros": {
- "max": {
- "field": "price",
- "script": {
- "source": "_value * params.conversion_rate",
- "params": {
- "conversion_rate": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/max-aggregation.asciidoc",
- "line": 125
- },
- "digest": "41518c094db4a5b03cca3b21497f79cf",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"grade_max\" : {\n \"max\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "grade_max": {
- "max": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 16
- },
- "digest": "bbd52c02b078e650f1a871f7fe7ff343",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"min_price\" : { \"min\" : { \"field\" : \"price\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "min_price": {
- "min": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 29
- },
- "digest": "8eb0082e9853f7e8ba01313e9345307c",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"min_price\": {\n \"value\": 10.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 52
- },
- "digest": "27cf2556b606f91d1fe3db3d7b6fd21a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"min_price\" : {\n \"min\" : {\n \"script\" : {\n \"source\" : \"doc.price.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "min_price": {
- "min": {
- "script": {
- "source": "doc.price.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 72
- },
- "digest": "f76eb7821cb7855339ffcaab3460d934",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"min_price\" : {\n \"min\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"price\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "min_price": {
- "min": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 99
- },
- "digest": "57ec3af2f4b3ce90722de51efc9d2cf1",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"min_price_in_euros\" : {\n \"min\" : {\n \"field\" : \"price\",\n \"script\" : {\n \"source\" : \"_value * params.conversion_rate\",\n \"params\" : {\n \"conversion_rate\" : 1.2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "min_price_in_euros": {
- "min": {
- "field": "price",
- "script": {
- "source": "_value * params.conversion_rate",
- "params": {
- "conversion_rate": 1.2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/min-aggregation.asciidoc",
- "line": 126
- },
- "digest": "05161bf816a98dd2a57b8cd2a3d39db4",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"aggs\" : {\n \"grade_min\" : {\n \"min\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "grade_min": {
- "min": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 28
- },
- "digest": "25ed47fcb890fcf8d8518ae067362d18",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_average\": {\n \"avg\": {\n \"field\": \"rating\"\n }\n },\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"field\": \"rating\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_average": {
- "avg": {
- "field": "rating"
- }
- },
- "review_variability": {
- "median_absolute_deviation": {
- "field": "rating"
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 54
- },
- "digest": "9fce71dbeb1f002696732ec60ccd2e6e",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"review_average\": {\n \"value\": 3.0\n },\n \"review_variability\": {\n \"value\": 2.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 87
- },
- "digest": "9d662fc9f943c287b7144f5e4e2ae358",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"field\": \"rating\",\n \"compression\": 100\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_variability": {
- "median_absolute_deviation": {
- "field": "rating",
- "compression": 100
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 116
- },
- "digest": "bb964122f7d31b2f17c299d47ab3bdf3",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['rating'].value * params.scaleFactor\",\n \"params\": {\n \"scaleFactor\": 2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_variability": {
- "median_absolute_deviation": {
- "script": {
- "lang": "painless",
- "source": "doc['rating'].value * params.scaleFactor",
- "params": {
- "scaleFactor": 2
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 140
- },
- "digest": "920362adc347f4268b29751d638b2e87",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"script\": {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"rating\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_variability": {
- "median_absolute_deviation": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "rating"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/median-absolute-deviation-aggregation.asciidoc",
- "line": 170
- },
- "digest": "87f854393d715aabf4d45e90a8eb74ce",
- "lang": "console",
- "found": [],
- "source": "GET reviews/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"review_variability\": {\n \"median_absolute_deviation\": {\n \"field\": \"rating\",\n \"missing\": 5\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/reviews/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "review_variability": {
- "median_absolute_deviation": {
- "field": "rating",
- "missing": 5
- }
- }
- }
- },
- "params": {
- "index": "reviews"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 28
- },
- "digest": "9baaa0c37e787738507aceee7626c88b",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"field\" : \"load_time\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time"
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 48
- },
- "digest": "f05a6a8b26e79c9903efe57b7c6408f1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_outlier\": {\n \"values\" : {\n \"1.0\": 5.0,\n \"5.0\": 25.0,\n \"25.0\": 165.0,\n \"50.0\": 445.0,\n \"75.0\": 725.0,\n \"95.0\": 945.0,\n \"99.0\": 985.0\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 79
- },
- "digest": "4273ecf0448faf65b16952ada3d48a30",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"field\" : \"load_time\",\n \"percents\" : [95, 99, 99.9] <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time",
- "percents": [
- 95,
- 99,
- 99.9
- ]
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 101
- },
- "digest": "e6f49e5325fe0e9b816a837bd3e65a7c",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"load_time_outlier\": {\n \"percentiles\": {\n \"field\": \"load_time\",\n \"keyed\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time",
- "keyed": false
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 120
- },
- "digest": "b1f54ec2ea685f82d1f0cfe35f8bd141",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_outlier\": {\n \"values\": [\n {\n \"key\": 1.0,\n \"value\": 5.0\n },\n {\n \"key\": 5.0,\n \"value\": 25.0\n },\n {\n \"key\": 25.0,\n \"value\": 165.0\n },\n {\n \"key\": 50.0,\n \"value\": 445.0\n },\n {\n \"key\": 75.0,\n \"value\": 725.0\n },\n {\n \"key\": 95.0,\n \"value\": 945.0\n },\n {\n \"key\": 99.0,\n \"value\": 985.0\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 169
- },
- "digest": "823b97820ce96abcc3a9292d14292849",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['load_time'].value / params.timeUnit\", <1>\n \"params\" : {\n \"timeUnit\" : 1000 <2>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "script": {
- "lang": "painless",
- "source": "doc['load_time'].value / params.timeUnit",
- "params": {
- "timeUnit": 1000
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 197
- },
- "digest": "dae483a5a412dcf4c20161fea25a87ba",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"load_time\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "load_time"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 268
- },
- "digest": "829d345e5e15e371aeb820f4d62a1b2a",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"field\" : \"load_time\",\n \"tdigest\": {\n \"compression\" : 200 <1>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time",
- "tdigest": {
- "compression": 200
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 320
- },
- "digest": "db17a10cf64c84bd2fc4ebb073e59cec",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_outlier\" : {\n \"percentiles\" : {\n \"field\" : \"load_time\",\n \"percents\" : [95, 99, 99.9],\n \"hdr\": { <1>\n \"number_of_significant_value_digits\" : 3 <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_outlier": {
- "percentiles": {
- "field": "load_time",
- "percents": [
- 95,
- 99,
- 99.9
- ],
- "hdr": {
- "number_of_significant_value_digits": 3
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-aggregation.asciidoc",
- "line": 352
- },
- "digest": "e557ce02e192939944ebc6bae87e98a6",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"grade_percentiles\" : {\n \"percentiles\" : {\n \"field\" : \"grade\",\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "grade_percentiles": {
- "percentiles": {
- "field": "grade",
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 26
- },
- "digest": "daaa9e0df859d764ca0a4a4ebcfbdb26",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"field\" : \"load_time\", <1>\n \"values\" : [500, 600]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "field": "load_time",
- "values": [
- 500,
- 600
- ]
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 47
- },
- "digest": "dc82882f7f4bbb70b175c0ad758f8521",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_ranks\": {\n \"values\" : {\n \"500.0\": 90.01,\n \"600.0\": 100.0\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 73
- },
- "digest": "156dd311073c8c825e608becf63ae7fe",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"load_time_ranks\": {\n \"percentile_ranks\": {\n \"field\": \"load_time\",\n \"values\": [500, 600],\n \"keyed\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "field": "load_time",
- "values": [
- 500,
- 600
- ],
- "keyed": false
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 93
- },
- "digest": "526fc4a2b6bbff6d2026ee68ac52bff5",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"load_time_ranks\": {\n \"values\": [\n {\n \"key\": 500.0,\n \"value\": 90.01\n },\n {\n \"key\": 600.0,\n \"value\": 100.0\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 125
- },
- "digest": "c9ea558335446fc64006724cb72684e1",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"values\" : [500, 600],\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['load_time'].value / params.timeUnit\", <1>\n \"params\" : {\n \"timeUnit\" : 1000 <2>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "values": [
- 500,
- 600
- ],
- "script": {
- "lang": "painless",
- "source": "doc['load_time'].value / params.timeUnit",
- "params": {
- "timeUnit": 1000
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 154
- },
- "digest": "59bcc5d1ed0aac1aa949f84d80a4fa1d",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"values\" : [500, 600],\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"load_time\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "values": [
- 500,
- 600
- ],
- "script": {
- "id": "my_script",
- "params": {
- "field": "load_time"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 189
- },
- "digest": "214d704d18485ab75ef53aa9c0524590",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"field\" : \"load_time\",\n \"values\" : [500, 600],\n \"hdr\": { <1>\n \"number_of_significant_value_digits\" : 3 <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "field": "load_time",
- "values": [
- 500,
- 600
- ],
- "hdr": {
- "number_of_significant_value_digits": 3
- }
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/percentile-rank-aggregation.asciidoc",
- "line": 221
- },
- "digest": "77f575b0cc37dd7a2415cbf6417d3148",
- "lang": "console",
- "found": [],
- "source": "GET latency/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"load_time_ranks\" : {\n \"percentile_ranks\" : {\n \"field\" : \"load_time\",\n \"values\" : [500, 600],\n \"missing\": 10 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/latency/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "load_time_ranks": {
- "percentile_ranks": {
- "field": "load_time",
- "values": [
- 500,
- 600
- ],
- "missing": 10
- }
- }
- }
- },
- "params": {
- "index": "latency"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/scripted-metric-aggregation.asciidoc",
- "line": 9
- },
- "digest": "20600097aa51aa3386536bdc681e92b6",
- "lang": "console",
- "found": [],
- "source": "POST ledger/_search?size=0\n{\n \"query\" : {\n \"match_all\" : {}\n },\n \"aggs\": {\n \"profit\": {\n \"scripted_metric\": {\n \"init_script\" : \"state.transactions = []\", <1>\n \"map_script\" : \"state.transactions.add(doc.type.value == 'sale' ? doc.amount.value : -1 * doc.amount.value)\",\n \"combine_script\" : \"double profit = 0; for (t in state.transactions) { profit += t } return profit\",\n \"reduce_script\" : \"double profit = 0; for (a in states) { profit += a } return profit\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/ledger/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "match_all": {}
- },
- "aggs": {
- "profit": {
- "scripted_metric": {
- "init_script": "state.transactions = []",
- "map_script": "state.transactions.add(doc.type.value == 'sale' ? doc.amount.value : -1 * doc.amount.value)",
- "combine_script": "double profit = 0; for (t in state.transactions) { profit += t } return profit",
- "reduce_script": "double profit = 0; for (a in states) { profit += a } return profit"
- }
- }
- }
- },
- "params": {
- "index": "ledger"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/scripted-metric-aggregation.asciidoc",
- "line": 36
- },
- "digest": "644df9962eb12424fc93ad42f1d939cd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 218,\n ...\n \"aggregations\": {\n \"profit\": {\n \"value\": 240.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/scripted-metric-aggregation.asciidoc",
- "line": 53
- },
- "digest": "129ce418d8dd1f71087678725a0df19f",
- "lang": "console",
- "found": [],
- "source": "POST ledger/_search?size=0\n{\n \"aggs\": {\n \"profit\": {\n \"scripted_metric\": {\n \"init_script\" : {\n \"id\": \"my_init_script\"\n },\n \"map_script\" : {\n \"id\": \"my_map_script\"\n },\n \"combine_script\" : {\n \"id\": \"my_combine_script\"\n },\n \"params\": {\n \"field\": \"amount\" <1>\n },\n \"reduce_script\" : {\n \"id\": \"my_reduce_script\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/ledger/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "profit": {
- "scripted_metric": {
- "init_script": {
- "id": "my_init_script"
- },
- "map_script": {
- "id": "my_map_script"
- },
- "combine_script": {
- "id": "my_combine_script"
- },
- "params": {
- "field": "amount"
- },
- "reduce_script": {
- "id": "my_reduce_script"
- }
- }
- }
- }
- },
- "params": {
- "index": "ledger"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/scripted-metric-aggregation.asciidoc",
- "line": 150
- },
- "digest": "75e360d03fb416f0a65ca37c662c2e9c",
- "lang": "console",
- "found": [],
- "source": "PUT /transactions/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"type\": \"sale\",\"amount\": 80}\n{\"index\":{\"_id\":2}}\n{\"type\": \"cost\",\"amount\": 10}\n{\"index\":{\"_id\":3}}\n{\"type\": \"cost\",\"amount\": 30}\n{\"index\":{\"_id\":4}}\n{\"type\": \"sale\",\"amount\": 130}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/transactions/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "type": "sale",
- "amount": 80
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "type": "cost",
- "amount": 10
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "type": "cost",
- "amount": 30
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "type": "sale",
- "amount": 130
- }
- ],
- "params": {
- "index": "transactions"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 22
- },
- "digest": "5507b01f713674781996a07718785444",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : { \"string_stats\" : { \"field\" : \"message.keyword\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "field": "message.keyword"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 37
- },
- "digest": "5f196374e1b1e008eca06b7d35ad496b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"message_stats\" : {\n \"count\" : 5,\n \"min_length\" : 24,\n \"max_length\" : 30,\n \"avg_length\" : 28.8,\n \"entropy\" : 3.94617750050791\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 63
- },
- "digest": "a1d02ab1549dbd3f1874f6a2fd48ec48",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"field\" : \"message.keyword\",\n \"show_distribution\": true <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "field": "message.keyword",
- "show_distribution": true
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 81
- },
- "digest": "947b84333fcecc39a23f10a8d6b16751",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"message_stats\" : {\n \"count\" : 5,\n \"min_length\" : 24,\n \"max_length\" : 30,\n \"avg_length\" : 28.8,\n \"entropy\" : 3.94617750050791,\n \"distribution\" : {\n \" \" : 0.1527777777777778,\n \"e\" : 0.14583333333333334,\n \"s\" : 0.09722222222222222,\n \"m\" : 0.08333333333333333,\n \"t\" : 0.0763888888888889,\n \"h\" : 0.0625,\n \"a\" : 0.041666666666666664,\n \"i\" : 0.041666666666666664,\n \"r\" : 0.041666666666666664,\n \"g\" : 0.034722222222222224,\n \"n\" : 0.034722222222222224,\n \"o\" : 0.034722222222222224,\n \"u\" : 0.034722222222222224,\n \"b\" : 0.027777777777777776,\n \"w\" : 0.027777777777777776,\n \"c\" : 0.013888888888888888,\n \"E\" : 0.006944444444444444,\n \"l\" : 0.006944444444444444,\n \"1\" : 0.006944444444444444,\n \"2\" : 0.006944444444444444,\n \"3\" : 0.006944444444444444,\n \"4\" : 0.006944444444444444,\n \"y\" : 0.006944444444444444\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 130
- },
- "digest": "24b22f8b83e9b199964036a170e4299e",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['message.keyword'].value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "script": {
- "lang": "painless",
- "source": "doc['message.keyword'].value"
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 151
- },
- "digest": "a89a22d4f41ee3538bbfec8ac9e7ac74",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\" : {\n \"field\" : \"message.keyword\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "message.keyword"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 175
- },
- "digest": "46078bde3789b5e7e83ab458857bc9c9",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"field\" : \"message.keyword\",\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"params.prefix + _value\",\n \"params\" : {\n \"prefix\" : \"Message: \"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "field": "message.keyword",
- "script": {
- "lang": "painless",
- "source": "params.prefix + _value",
- "params": {
- "prefix": "Message: "
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/string-stats-aggregation.asciidoc",
- "line": 202
- },
- "digest": "437f4009a93d46b6b76e7db366b34ce6",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_search?size=0\n{\n \"aggs\" : {\n \"message_stats\" : {\n \"string_stats\" : {\n \"field\" : \"message.keyword\",\n \"missing\": \"[empty message]\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "message_stats": {
- "string_stats": {
- "field": "message.keyword",
- "missing": "[empty message]"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 12
- },
- "digest": "43159621ffaa30dbfd60459a5e7b8e54",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"hat_prices\" : { \"sum\" : { \"field\" : \"price\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "hat_prices": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 32
- },
- "digest": "9de287a3c0d3f7567452297f58f2f830",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"hat_prices\" : {\n \"value\" : 450.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 51
- },
- "digest": "4b5f2bd0db1a94614f4d2e46a5159bd2",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"hat_prices\" : {\n \"sum\" : {\n \"script\" : {\n \"source\": \"doc.price.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "hat_prices": {
- "sum": {
- "script": {
- "source": "doc.price.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 77
- },
- "digest": "49a4032ac0cbc413b47660bcf998ef5f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"hat_prices\" : {\n \"sum\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\" : {\n \"field\" : \"price\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "hat_prices": {
- "sum": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 109
- },
- "digest": "82a2031f77972b713f75ed05c4bd9815",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"square_hats\" : {\n \"sum\" : {\n \"field\" : \"price\",\n \"script\" : {\n \"source\": \"_value * _value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "square_hats": {
- "sum": {
- "field": "price",
- "script": {
- "source": "_value * _value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 141
- },
- "digest": "a78c3f4389502fe2dbd1cd10a017d1ed",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : {\n \"filter\" : {\n \"match\" : { \"type\" : \"hat\" }\n }\n }\n },\n \"aggs\" : {\n \"hat_prices\" : {\n \"sum\" : {\n \"field\" : \"price\",\n \"missing\": 100 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "match": {
- "type": "hat"
- }
- }
- }
- },
- "aggs": {
- "hat_prices": {
- "sum": {
- "field": "price",
- "missing": 100
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 172
- },
- "digest": "8db0606ceb96b90711c9e9a1665f3d06",
- "lang": "console",
- "found": [],
- "source": "PUT metrics_index/_doc/1\n{\n \"network.name\" : \"net-1\",\n \"latency_histo\" : {\n \"values\" : [0.1, 0.2, 0.3, 0.4, 0.5], <1>\n \"counts\" : [3, 7, 23, 12, 6] <2>\n }\n}\n\nPUT metrics_index/_doc/2\n{\n \"network.name\" : \"net-2\",\n \"latency_histo\" : {\n \"values\" : [0.1, 0.2, 0.3, 0.4, 0.5], <1>\n \"counts\" : [8, 17, 8, 7, 6] <2>\n }\n}\n\nPOST /metrics_index/_search?size=0\n{\n \"aggs\" : {\n \"total_latency\" : { \"sum\" : { \"field\" : \"latency_histo\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/metrics_index/_doc/1",
- "query": null,
- "body": {
- "network.name": "net-1",
- "latency_histo": {
- "values": [
- 0.1,
- 0.2,
- 0.3,
- 0.4,
- 0.5
- ],
- "counts": [
- 3,
- 7,
- 23,
- 12,
- 6
- ]
- }
- },
- "params": {
- "index": "metrics_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/metrics_index/_doc/2",
- "query": null,
- "body": {
- "network.name": "net-2",
- "latency_histo": {
- "values": [
- 0.1,
- 0.2,
- 0.3,
- 0.4,
- 0.5
- ],
- "counts": [
- 8,
- 17,
- 8,
- 7,
- 6
- ]
- }
- },
- "params": {
- "index": "metrics_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/metrics_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "total_latency": {
- "sum": {
- "field": "latency_histo"
- }
- }
- }
- },
- "params": {
- "index": "metrics_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/sum-aggregation.asciidoc",
- "line": 203
- },
- "digest": "27fcd5882fd5f9c728dec67b5cd982fe",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"total_latency\" : {\n \"value\" : 28.8\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 39
- },
- "digest": "12b4b34f9958ed157ac2d812d612cda6",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"top_tags\": {\n \"terms\": {\n \"field\": \"type\",\n \"size\": 3\n },\n \"aggs\": {\n \"top_sales_hits\": {\n \"top_hits\": {\n \"sort\": [\n {\n \"date\": {\n \"order\": \"desc\"\n }\n }\n ],\n \"_source\": {\n \"includes\": [ \"date\", \"price\" ]\n },\n \"size\" : 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "top_tags": {
- "terms": {
- "field": "type",
- "size": 3
- },
- "aggs": {
- "top_sales_hits": {
- "top_hits": {
- "sort": [
- {
- "date": {
- "order": "desc"
- }
- }
- ],
- "_source": {
- "includes": [
- "date",
- "price"
- ]
- },
- "size": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 74
- },
- "digest": "ac5c534e77684388b5126e2960db0d3f",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"top_tags\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"hat\",\n \"doc_count\": 3,\n \"top_sales_hits\": {\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": [\n {\n \"_index\": \"sales\",\n \"_id\": \"AVnNBmauCQpcRyxw6ChK\",\n \"_source\": {\n \"date\": \"2015/03/01 00:00:00\",\n \"price\": 200\n },\n \"sort\": [\n 1425168000000\n ],\n \"_score\": null\n }\n ]\n }\n }\n },\n {\n \"key\": \"t-shirt\",\n \"doc_count\": 3,\n \"top_sales_hits\": {\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": [\n {\n \"_index\": \"sales\",\n \"_id\": \"AVnNBmauCQpcRyxw6ChL\",\n \"_source\": {\n \"date\": \"2015/03/01 00:00:00\",\n \"price\": 175\n },\n \"sort\": [\n 1425168000000\n ],\n \"_score\": null\n }\n ]\n }\n }\n },\n {\n \"key\": \"bag\",\n \"doc_count\": 1,\n \"top_sales_hits\": {\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": [\n {\n \"_index\": \"sales\",\n \"_id\": \"AVnNBmatCQpcRyxw6ChH\",\n \"_source\": {\n \"date\": \"2015/01/01 00:00:00\",\n \"price\": 150\n },\n \"sort\": [\n 1420070400000\n ],\n \"_score\": null\n }\n ]\n }\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 188
- },
- "digest": "30db2702dd0071c72a090b8311d0db09",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"query\": {\n \"match\": {\n \"body\": \"elections\"\n }\n },\n \"aggs\": {\n \"top_sites\": {\n \"terms\": {\n \"field\": \"domain\",\n \"order\": {\n \"top_hit\": \"desc\"\n }\n },\n \"aggs\": {\n \"top_tags_hits\": {\n \"top_hits\": {}\n },\n \"top_hit\" : {\n \"max\": {\n \"script\": {\n \"source\": \"_score\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "body": "elections"
- }
- },
- "aggs": {
- "top_sites": {
- "terms": {
- "field": "domain",
- "order": {
- "top_hit": "desc"
- }
- },
- "aggs": {
- "top_tags_hits": {
- "top_hits": {}
- },
- "top_hit": {
- "max": {
- "script": {
- "source": "_score"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 241
- },
- "digest": "2720c5e463876c415419c426697d15e4",
- "lang": "console",
- "found": [],
- "source": "PUT /sales\n{\n \"mappings\": {\n \"properties\" : {\n \"tags\" : { \"type\" : \"keyword\" },\n \"comments\" : { <1>\n \"type\" : \"nested\",\n \"properties\" : {\n \"username\" : { \"type\" : \"keyword\" },\n \"comment\" : { \"type\" : \"text\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/sales",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "tags": {
- "type": "keyword"
- },
- "comments": {
- "type": "nested",
- "properties": {
- "username": {
- "type": "keyword"
- },
- "comment": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 264
- },
- "digest": "6ac67f7e30219d85fcc68b99459a39a4",
- "lang": "console",
- "found": [],
- "source": "PUT /sales/_doc/1?refresh\n{\n \"tags\": [\"car\", \"auto\"],\n \"comments\": [\n {\"username\": \"baddriver007\", \"comment\": \"This car could have better brakes\"},\n {\"username\": \"dr_who\", \"comment\": \"Where's the autopilot? Can't find it\"},\n {\"username\": \"ilovemotorbikes\", \"comment\": \"This car has two extra wheels\"}\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/sales/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "tags": [
- "car",
- "auto"
- ],
- "comments": [
- {
- "username": "baddriver007",
- "comment": "This car could have better brakes"
- },
- {
- "username": "dr_who",
- "comment": "Where's the autopilot? Can't find it"
- },
- {
- "username": "ilovemotorbikes",
- "comment": "This car has two extra wheels"
- }
- ]
- },
- "params": {
- "index": "sales",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 280
- },
- "digest": "f1b8612151a660264fb62dc6c74b19be",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"query\": {\n \"term\": { \"tags\": \"car\" }\n },\n \"aggs\": {\n \"by_sale\": {\n \"nested\" : {\n \"path\" : \"comments\"\n },\n \"aggs\": {\n \"by_user\": {\n \"terms\": {\n \"field\": \"comments.username\",\n \"size\": 1\n },\n \"aggs\": {\n \"by_nested\": {\n \"top_hits\":{}\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "tags": "car"
- }
- },
- "aggs": {
- "by_sale": {
- "nested": {
- "path": "comments"
- },
- "aggs": {
- "by_user": {
- "terms": {
- "field": "comments.username",
- "size": 1
- },
- "aggs": {
- "by_nested": {
- "top_hits": {}
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/tophits-aggregation.asciidoc",
- "line": 314
- },
- "digest": "7360e36c8ba3511fa133472ec101fff3",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_sale\": {\n \"by_user\": {\n \"buckets\": [\n {\n \"key\": \"baddriver007\",\n \"doc_count\": 1,\n \"by_nested\": {\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.3616575,\n \"hits\": [\n {\n \"_index\": \"sales\",\n \"_id\": \"1\",\n \"_nested\": {\n \"field\": \"comments\", <1>\n \"offset\": 0 <2>\n },\n \"_score\": 0.3616575,\n \"_source\": {\n \"comment\": \"This car could have better brakes\", <3>\n \"username\": \"baddriver007\"\n }\n }\n ]\n }\n }\n }\n ...\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 10
- },
- "digest": "9d1fb129ac783355a20097effded1845",
- "lang": "console",
- "found": [],
- "source": "POST /test/_bulk?refresh\n{\"index\": {}}\n{\"s\": 1, \"m\": 3.1415}\n{\"index\": {}}\n{\"s\": 2, \"m\": 1.0}\n{\"index\": {}}\n{\"s\": 3, \"m\": 2.71828}\nPOST /test/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metrics\": {\"field\": \"m\"},\n \"sort\": {\"s\": \"desc\"}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {}
- },
- {
- "s": 1,
- "m": 3.1415
- },
- {
- "index": {}
- },
- {
- "s": 2,
- "m": 1
- },
- {
- "index": {}
- },
- {
- "s": 3,
- "m": 2.71828
- }
- ],
- "params": {
- "index": "test"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "tm": {
- "top_metrics": {
- "metrics": {
- "field": "m"
- },
- "sort": {
- "s": "desc"
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 74
- },
- "digest": "73882fb729426f186221b5ebbd8f571f",
- "lang": "console",
- "found": [],
- "source": "PUT /test\n{\n \"mappings\": {\n \"properties\": {\n \"d\": {\"type\": \"date\"}\n }\n }\n}\nPOST /test/_bulk?refresh\n{\"index\": {}}\n{\"s\": 1, \"m\": 3.1415, \"i\": 1, \"d\": \"2020-01-01T00:12:12Z\"}\n{\"index\": {}}\n{\"s\": 2, \"m\": 1.0, \"i\": 6, \"d\": \"2020-01-02T00:12:12Z\"}\n{\"index\": {}}\n{\"s\": 3, \"m\": 2.71828, \"i\": -12, \"d\": \"2019-12-31T00:12:12Z\"}\nPOST /test/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metrics\": [\n {\"field\": \"m\"},\n {\"field\": \"i\"},\n {\"field\": \"d\"}\n ],\n \"sort\": {\"s\": \"desc\"}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "d": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/test/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {}
- },
- {
- "s": 1,
- "m": 3.1415,
- "i": 1,
- "d": "2020-01-01T00:12:12Z"
- },
- {
- "index": {}
- },
- {
- "s": 2,
- "m": 1,
- "i": 6,
- "d": "2020-01-02T00:12:12Z"
- },
- {
- "index": {}
- },
- {
- "s": 3,
- "m": 2.71828,
- "i": -12,
- "d": "2019-12-31T00:12:12Z"
- }
- ],
- "params": {
- "index": "test"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "tm": {
- "top_metrics": {
- "metrics": [
- {
- "field": "m"
- },
- {
- "field": "i"
- },
- {
- "field": "d"
- }
- ],
- "sort": {
- "s": "desc"
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 133
- },
- "digest": "6013ed65d2058da5ce704b47a504b60a",
- "lang": "console",
- "found": [],
- "source": "POST /test/_bulk?refresh\n{\"index\": {}}\n{\"s\": 1, \"m\": 3.1415}\n{\"index\": {}}\n{\"s\": 2, \"m\": 1.0}\n{\"index\": {}}\n{\"s\": 3, \"m\": 2.71828}\nPOST /test/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metrics\": {\"field\": \"m\"},\n \"sort\": {\"s\": \"desc\"},\n \"size\": 3\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {}
- },
- {
- "s": 1,
- "m": 3.1415
- },
- {
- "index": {}
- },
- {
- "s": 2,
- "m": 1
- },
- {
- "index": {}
- },
- {
- "s": 3,
- "m": 2.71828
- }
- ],
- "params": {
- "index": "test"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "tm": {
- "top_metrics": {
- "metrics": {
- "field": "m"
- },
- "sort": {
- "s": "desc"
- },
- "size": 3
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 183
- },
- "digest": "b63ce79ce4fa1bb9b99a789f4dcfef4e",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_settings\n{\n \"top_metrics_max_size\": 100\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_settings",
- "query": null,
- "body": {
- "top_metrics_max_size": 100
- },
- "params": {
- "index": "test"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 202
- },
- "digest": "5b3384992c398ea8a3064d2e08725e2b",
- "lang": "console",
- "found": [],
- "source": "PUT /node\n{\n \"mappings\": {\n \"properties\": {\n \"ip\": {\"type\": \"ip\"},\n \"date\": {\"type\": \"date\"}\n }\n }\n}\nPOST /node/_bulk?refresh\n{\"index\": {}}\n{\"ip\": \"192.168.0.1\", \"date\": \"2020-01-01T01:01:01\", \"m\": 1}\n{\"index\": {}}\n{\"ip\": \"192.168.0.1\", \"date\": \"2020-01-01T02:01:01\", \"m\": 2}\n{\"index\": {}}\n{\"ip\": \"192.168.0.2\", \"date\": \"2020-01-01T02:01:01\", \"m\": 3}\nPOST /node/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"ip\": {\n \"terms\": {\n \"field\": \"ip\"\n },\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metrics\": {\"field\": \"m\"},\n \"sort\": {\"date\": \"desc\"}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/node",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "ip": {
- "type": "ip"
- },
- "date": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "node"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/node/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {}
- },
- {
- "ip": "192.168.0.1",
- "date": "2020-01-01T01:01:01",
- "m": 1
- },
- {
- "index": {}
- },
- {
- "ip": "192.168.0.1",
- "date": "2020-01-01T02:01:01",
- "m": 2
- },
- {
- "index": {}
- },
- {
- "ip": "192.168.0.2",
- "date": "2020-01-01T02:01:01",
- "m": 3
- }
- ],
- "params": {
- "index": "node"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/node/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "ip": {
- "terms": {
- "field": "ip"
- },
- "aggs": {
- "tm": {
- "top_metrics": {
- "metrics": {
- "field": "m"
- },
- "sort": {
- "date": "desc"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "node"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 273
- },
- "digest": "4af15c4f26ddefb9c350e7a246a66a15",
- "lang": "console",
- "found": [],
- "source": "POST /node/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"ip\": {\n \"terms\": {\n \"field\": \"ip\",\n \"order\": {\"tm.m\": \"desc\"}\n },\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metrics\": {\"field\": \"m\"},\n \"sort\": {\"date\": \"desc\"}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/node/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "ip": {
- "terms": {
- "field": "ip",
- "order": {
- "tm.m": "desc"
- }
- },
- "aggs": {
- "tm": {
- "top_metrics": {
- "metrics": {
- "field": "m"
- },
- "sort": {
- "date": "desc"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "node"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 334
- },
- "digest": "2d2f5ec97aa34ff7822a6a1ed08ef335",
- "lang": "console",
- "found": [],
- "source": "POST /test/_bulk?refresh\n{\"index\": {\"_index\": \"test1\"}}\n{\"s\": 1, \"m\": 3.1415}\n{\"index\": {\"_index\": \"test1\"}}\n{\"s\": 2, \"m\": 1}\n{\"index\": {\"_index\": \"test2\"}}\n{\"s\": 3.1, \"m\": 2.71828}\nPOST /test*/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metrics\": {\"field\": \"m\"},\n \"sort\": {\"s\": \"asc\"}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_index": "test1"
- }
- },
- {
- "s": 1,
- "m": 3.1415
- },
- {
- "index": {
- "_index": "test1"
- }
- },
- {
- "s": 2,
- "m": 1
- },
- {
- "index": {
- "_index": "test2"
- }
- },
- {
- "s": 3.1,
- "m": 2.71828
- }
- ],
- "params": {
- "index": "test"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/test*/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "tm": {
- "top_metrics": {
- "metrics": {
- "field": "m"
- },
- "sort": {
- "s": "asc"
- }
- }
- }
- }
- },
- "params": {
- "index": "test*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/top-metrics-aggregation.asciidoc",
- "line": 374
- },
- "digest": "56da9c55774f4c2e8eadde0579bdc60c",
- "lang": "console",
- "found": [],
- "source": "POST /test*/_search?filter_path=aggregations\n{\n \"aggs\": {\n \"tm\": {\n \"top_metrics\": {\n \"metrics\": {\"field\": \"m\"},\n \"sort\": {\"s\": {\"order\": \"asc\", \"numeric_type\": \"double\"}}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test*/_search",
- "query": {
- "filter_path": "aggregations"
- },
- "body": {
- "aggs": {
- "tm": {
- "top_metrics": {
- "metrics": {
- "field": "m"
- },
- "sort": {
- "s": {
- "order": "asc",
- "numeric_type": "double"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 13
- },
- "digest": "5dd695679b5141d9142d3d30ba8d300a",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"types_count\" : { \"value_count\" : { \"field\" : \"type\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "types_count": {
- "value_count": {
- "field": "type"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 26
- },
- "digest": "73900a92a107ce4fe9cd10942ff494d7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"types_count\": {\n \"value\": 7\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 46
- },
- "digest": "3722cb3705b6bc7f486969deace3dd83",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"type_count\" : {\n \"value_count\" : {\n \"script\" : {\n \"source\" : \"doc['type'].value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "type_count": {
- "value_count": {
- "script": {
- "source": "doc['type'].value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 65
- },
- "digest": "213ab768f1b6a895e09403a0880e259a",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"types_count\" : {\n \"value_count\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\" : {\n \"field\" : \"type\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "types_count": {
- "value_count": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "type"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 96
- },
- "digest": "e9fe608f105d7e3268a15e409e2cb9ab",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT metrics_index/_doc/1\n{\n \"network.name\" : \"net-1\",\n \"latency_histo\" : {\n \"values\" : [0.1, 0.2, 0.3, 0.4, 0.5],\n \"counts\" : [3, 7, 23, 12, 6] <1>\n }\n}\n\nPUT metrics_index/_doc/2\n{\n \"network.name\" : \"net-2\",\n \"latency_histo\" : {\n \"values\" : [0.1, 0.2, 0.3, 0.4, 0.5],\n \"counts\" : [8, 17, 8, 7, 6] <1>\n }\n}\n\nPOST /metrics_index/_search?size=0\n{\n \"aggs\" : {\n \"total_requests\" : {\n \"value_count\" : { \"field\" : \"latency_histo\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/metrics_index/_doc/1",
- "query": null,
- "body": {
- "network.name": "net-1",
- "latency_histo": {
- "values": [
- 0.1,
- 0.2,
- 0.3,
- 0.4,
- 0.5
- ],
- "counts": [
- 3,
- 7,
- 23,
- 12,
- 6
- ]
- }
- },
- "params": {
- "index": "metrics_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/metrics_index/_doc/2",
- "query": null,
- "body": {
- "network.name": "net-2",
- "latency_histo": {
- "values": [
- 0.1,
- 0.2,
- 0.3,
- 0.4,
- 0.5
- ],
- "counts": [
- 8,
- 17,
- 8,
- 7,
- 6
- ]
- }
- },
- "params": {
- "index": "metrics_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/metrics_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "total_requests": {
- "value_count": {
- "field": "latency_histo"
- }
- }
- }
- },
- "params": {
- "index": "metrics_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/valuecount-aggregation.asciidoc",
- "line": 129
- },
- "digest": "b169c9313bd324f4a7e28f3583d9c19e",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"total_requests\" : {\n \"value\" : 97\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/t-test-aggregation.asciidoc",
- "line": 30
- },
- "digest": "9c071245643d02289b05d8163f207f74",
- "lang": "console",
- "found": [],
- "source": "GET node_upgrade/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"startup_time_ttest\" : {\n \"t_test\" : {\n \"a\" : {\"field\": \"startup_time_before\"}, <1>\n \"b\" : {\"field\": \"startup_time_after\"}, <2>\n \"type\": \"paired\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/node_upgrade/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "startup_time_ttest": {
- "t_test": {
- "a": {
- "field": "startup_time_before"
- },
- "b": {
- "field": "startup_time_after"
- },
- "type": "paired"
- }
- }
- }
- },
- "params": {
- "index": "node_upgrade"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/t-test-aggregation.asciidoc",
- "line": 55
- },
- "digest": "078cb254d96e2f6114aa0d39357c18b7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"startup_time_ttest\": {\n \"value\": 0.1914368843365979 <1>\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/t-test-aggregation.asciidoc",
- "line": 84
- },
- "digest": "a170b4aa968b32e40e288a97088cfc50",
- "lang": "console",
- "found": [],
- "source": "GET node_upgrade/_search\n{\n \"size\" : 0,\n \"aggs\" : {\n \"startup_time_ttest\" : {\n \"t_test\" : {\n \"a\" : {\n \"field\" : \"startup_time_before\", <1>\n \"filter\" : {\n \"term\" : {\n \"group\" : \"A\" <2>\n }\n }\n },\n \"b\" : {\n \"field\" : \"startup_time_before\", <3>\n \"filter\" : {\n \"term\" : {\n \"group\" : \"B\" <4>\n }\n }\n },\n \"type\" : \"heteroscedastic\" <5>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/node_upgrade/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "startup_time_ttest": {
- "t_test": {
- "a": {
- "field": "startup_time_before",
- "filter": {
- "term": {
- "group": "A"
- }
- }
- },
- "b": {
- "field": "startup_time_before",
- "filter": {
- "term": {
- "group": "B"
- }
- }
- },
- "type": "heteroscedastic"
- }
- }
- }
- },
- "params": {
- "index": "node_upgrade"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/metrics/t-test-aggregation.asciidoc",
- "line": 122
- },
- "digest": "677f00a0cce46b0ffb65f73d7a8cc410",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"startup_time_ttest\": {\n \"value\": 0.2981858007281437 <1>\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/metrics/t-test-aggregation.asciidoc",
- "line": 146
- },
- "digest": "f114ff40e67771a24f796f458ab10838",
- "lang": "console",
- "found": [],
- "source": "GET node_upgrade/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"startup_time_ttest\" : {\n \"t_test\" : {\n \"a\": {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['startup_time_before'].value - params.adjustment\", <1>\n \"params\" : {\n \"adjustment\" : 10 <2>\n }\n }\n },\n \"b\": {\n \"field\": \"startup_time_after\" <3>\n },\n \"type\": \"paired\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/node_upgrade/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "startup_time_ttest": {
- "t_test": {
- "a": {
- "script": {
- "lang": "painless",
- "source": "doc['startup_time_before'].value - params.adjustment",
- "params": {
- "adjustment": 10
- }
- }
- },
- "b": {
- "field": "startup_time_after"
- },
- "type": "paired"
- }
- }
- }
- },
- "params": {
- "index": "node_upgrade"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/adjacency-matrix-aggregation.asciidoc",
- "line": 32
- },
- "digest": "f88cdb3a962bb6f305f4a7ccc07bc0b0",
- "lang": "console",
- "found": [],
- "source": "PUT /emails/_bulk?refresh\n{ \"index\" : { \"_id\" : 1 } }\n{ \"accounts\" : [\"hillary\", \"sidney\"]}\n{ \"index\" : { \"_id\" : 2 } }\n{ \"accounts\" : [\"hillary\", \"donald\"]}\n{ \"index\" : { \"_id\" : 3 } }\n{ \"accounts\" : [\"vladimir\", \"donald\"]}\n\nGET emails/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"interactions\" : {\n \"adjacency_matrix\" : {\n \"filters\" : {\n \"grpA\" : { \"terms\" : { \"accounts\" : [\"hillary\", \"sidney\"] }},\n \"grpB\" : { \"terms\" : { \"accounts\" : [\"donald\", \"mitt\"] }},\n \"grpC\" : { \"terms\" : { \"accounts\" : [\"vladimir\", \"nigel\"] }}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/emails/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "accounts": [
- "hillary",
- "sidney"
- ]
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "accounts": [
- "hillary",
- "donald"
- ]
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "accounts": [
- "vladimir",
- "donald"
- ]
- }
- ],
- "params": {
- "index": "emails"
- },
- "api": "bulk"
- },
- {
- "method": "GET",
- "url": "/emails/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "interactions": {
- "adjacency_matrix": {
- "filters": {
- "grpA": {
- "terms": {
- "accounts": [
- "hillary",
- "sidney"
- ]
- }
- },
- "grpB": {
- "terms": {
- "accounts": [
- "donald",
- "mitt"
- ]
- }
- },
- "grpC": {
- "terms": {
- "accounts": [
- "vladimir",
- "nigel"
- ]
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "emails"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/adjacency-matrix-aggregation.asciidoc",
- "line": 66
- },
- "digest": "c1f8e4dbfebddcfa68163f094929ff74",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 9,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"interactions\": {\n \"buckets\": [\n {\n \"key\":\"grpA\",\n \"doc_count\": 2\n },\n {\n \"key\":\"grpA&grpB\",\n \"doc_count\": 1\n },\n {\n \"key\":\"grpB\",\n \"doc_count\": 2\n },\n {\n \"key\":\"grpB&grpC\",\n \"doc_count\": 1\n },\n {\n \"key\":\"grpC\",\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 14
- },
- "digest": "9f9123f67baff22429bca73f7cf48622",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"auto_date_histogram\" : {\n \"field\" : \"date\",\n \"buckets\" : 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 10
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 40
- },
- "digest": "941466b290eaa9a2685bbe32c73e887a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"auto_date_histogram\" : {\n \"field\" : \"date\",\n \"buckets\" : 5,\n \"format\" : \"yyyy-MM-dd\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 5,
- "format": "yyyy-MM-dd"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 61
- },
- "digest": "6681cbb3757f4c51006cae44b6c6e06a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"sales_over_time\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-01-01\",\n \"key\": 1420070400000,\n \"doc_count\": 3\n },\n {\n \"key_as_string\": \"2015-02-01\",\n \"key\": 1422748800000,\n \"doc_count\": 2\n },\n {\n \"key_as_string\": \"2015-03-01\",\n \"key\": 1425168000000,\n \"doc_count\": 2\n }\n ],\n \"interval\": \"1M\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 121
- },
- "digest": "06cd928a050b75f2bb207a548ac43d40",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"date\": \"2015-10-01T00:30:00Z\"\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"date\": \"2015-10-01T01:30:00Z\"\n}\n\nPUT my_index/_doc/3?refresh\n{\n \"date\": \"2015-10-01T02:30:00Z\"\n}\n\nGET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"auto_date_histogram\": {\n \"field\": \"date\",\n \"buckets\" : 3\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T00:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T01:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T02:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 3
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 154
- },
- "digest": "861de90753e4d31aaba4aa57fc95400a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-10-01T00:00:00.000Z\",\n \"key\": 1443657600000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T01:00:00.000Z\",\n \"key\": 1443661200000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T02:00:00.000Z\",\n \"key\": 1443664800000,\n \"doc_count\": 1\n }\n ],\n \"interval\": \"1h\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 187
- },
- "digest": "e16449c0f4eadb394761e9c2aff50fe6",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"auto_date_histogram\": {\n \"field\": \"date\",\n \"buckets\" : 3,\n \"time_zone\": \"-01:00\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 3,
- "time_zone": "-01:00"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 209
- },
- "digest": "7a23b07f42ed52868b374883e4be1348",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-09-30T23:00:00.000-01:00\", <1>\n \"key\": 1443657600000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T00:00:00.000-01:00\",\n \"key\": 1443661200000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T01:00:00.000-01:00\",\n \"key\": 1443664800000,\n \"doc_count\": 1\n }\n ],\n \"interval\": \"1h\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 273
- },
- "digest": "00abcf63bffec42e5d2c15011e989b37",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sale_date\" : {\n \"auto_date_histogram\" : {\n \"field\" : \"date\",\n \"buckets\": 10,\n \"minimum_interval\": \"minute\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sale_date": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 10,
- "minimum_interval": "minute"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/autodatehistogram-aggregation.asciidoc",
- "line": 296
- },
- "digest": "89fe7b404791770a2075f2870fd65c3e",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sale_date\" : {\n \"auto_date_histogram\" : {\n \"field\" : \"date\",\n \"buckets\": 10,\n \"missing\": \"2000/01/01\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sale_date": {
- "auto_date_histogram": {
- "field": "date",
- "buckets": 10,
- "missing": "2000/01/01"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 13
- },
- "digest": "9399cbbd133ec2b7aad2820fa617ae3a",
- "lang": "console",
- "found": [],
- "source": "PUT child_example\n{\n \"mappings\": {\n \"properties\": {\n \"join\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": \"answer\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/child_example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "join": {
- "type": "join",
- "relations": {
- "question": "answer"
- }
- }
- }
- }
- },
- "params": {
- "index": "child_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 36
- },
- "digest": "dfdf82b8d99436582f150117695190b3",
- "lang": "console",
- "found": [],
- "source": "PUT child_example/_doc/1\n{\n \"join\": {\n \"name\": \"question\"\n },\n \"body\": \"I have Windows 2003 server and i bought a new Windows 2008 server...\",\n \"title\": \"Whats the best way to file transfer my site from server to a newer one?\",\n \"tags\": [\n \"windows-server-2003\",\n \"windows-server-2008\",\n \"file-transfer\"\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/child_example/_doc/1",
- "query": null,
- "body": {
- "join": {
- "name": "question"
- },
- "body": "I have Windows 2003 server and i bought a new Windows 2008 server...",
- "title": "Whats the best way to file transfer my site from server to a newer one?",
- "tags": [
- "windows-server-2003",
- "windows-server-2008",
- "file-transfer"
- ]
- },
- "params": {
- "index": "child_example",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 56
- },
- "digest": "e9fe3b53b5b6e1ff9566b5237c0fa513",
- "lang": "console",
- "found": [],
- "source": "PUT child_example/_doc/2?routing=1\n{\n \"join\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n },\n \"owner\": {\n \"location\": \"Norfolk, United Kingdom\",\n \"display_name\": \"Sam\",\n \"id\": 48\n },\n \"body\": \"
Unfortunately you're pretty much limited to FTP...\",\n \"creation_date\": \"2009-05-04T13:45:37.030\"\n}\n\nPUT child_example/_doc/3?routing=1&refresh\n{\n \"join\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n },\n \"owner\": {\n \"location\": \"Norfolk, United Kingdom\",\n \"display_name\": \"Troll\",\n \"id\": 49\n },\n \"body\": \"
Use Linux...\",\n \"creation_date\": \"2009-05-05T13:45:37.030\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/child_example/_doc/2",
- "query": {
- "routing": "1"
- },
- "body": {
- "join": {
- "name": "answer",
- "parent": "1"
- },
- "owner": {
- "location": "Norfolk, United Kingdom",
- "display_name": "Sam",
- "id": 48
- },
- "body": "Unfortunately you're pretty much limited to FTP...",
- "creation_date": "2009-05-04T13:45:37.030"
- },
- "params": {
- "index": "child_example",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/child_example/_doc/3",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "join": {
- "name": "answer",
- "parent": "1"
- },
- "owner": {
- "location": "Norfolk, United Kingdom",
- "display_name": "Troll",
- "id": 49
- },
- "body": "Use Linux...",
- "creation_date": "2009-05-05T13:45:37.030"
- },
- "params": {
- "index": "child_example",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 92
- },
- "digest": "d5132d34ae922fa8e898889b627a1405",
- "lang": "console",
- "found": [],
- "source": "POST child_example/_search?size=0\n{\n \"aggs\": {\n \"top-tags\": {\n \"terms\": {\n \"field\": \"tags.keyword\",\n \"size\": 10\n },\n \"aggs\": {\n \"to-answers\": {\n \"children\": {\n \"type\" : \"answer\" <1>\n },\n \"aggs\": {\n \"top-names\": {\n \"terms\": {\n \"field\": \"owner.display_name.keyword\",\n \"size\": 10\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/child_example/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "top-tags": {
- "terms": {
- "field": "tags.keyword",
- "size": 10
- },
- "aggs": {
- "to-answers": {
- "children": {
- "type": "answer"
- },
- "aggs": {
- "top-names": {
- "terms": {
- "field": "owner.display_name.keyword",
- "size": 10
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "child_example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/children-aggregation.asciidoc",
- "line": 129
- },
- "digest": "31a7e249ea2a328e8eccc76800219af0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 25,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": []\n },\n \"aggregations\": {\n \"top-tags\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"file-transfer\",\n \"doc_count\": 1, <1>\n \"to-answers\": {\n \"doc_count\": 2, <2>\n \"top-names\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"Sam\",\n \"doc_count\": 1\n },\n {\n \"key\": \"Troll\",\n \"doc_count\": 1\n }\n ]\n }\n }\n },\n {\n \"key\": \"windows-server-2003\",\n \"doc_count\": 1, <1>\n \"to-answers\": {\n \"doc_count\": 2, <2>\n \"top-names\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"Sam\",\n \"doc_count\": 1\n },\n {\n \"key\": \"Troll\",\n \"doc_count\": 1\n }\n ]\n }\n }\n },\n {\n \"key\": \"windows-server-2008\",\n \"doc_count\": 1, <1>\n \"to-answers\": {\n \"doc_count\": 2, <2>\n \"top-names\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"Sam\",\n \"doc_count\": 1\n },\n {\n \"key\": \"Troll\",\n \"doc_count\": 1\n }\n ]\n }\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 117
- },
- "digest": "b0d7068cff901f2b91f8387628e3c2c0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"product\": { \"terms\" : { \"field\": \"product\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 136
- },
- "digest": "47f1e01d131fd50304dd35f1c459d222",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n {\n \"product\": {\n \"terms\" : {\n \"script\" : {\n \"source\": \"doc['product'].value\",\n \"lang\": \"painless\"\n }\n }\n }\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "product": {
- "terms": {
- "script": {
- "source": "doc['product'].value",
- "lang": "painless"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 172
- },
- "digest": "426eb07a1fc499df8ea30d8593a0d989",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"histo\": { \"histogram\" : { \"field\": \"price\", \"interval\": 5 } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "histo": {
- "histogram": {
- "field": "price",
- "interval": 5
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 191
- },
- "digest": "d4c5e4123e53daa39775def537365376",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n {\n \"histo\": {\n \"histogram\" : {\n \"interval\": 5,\n \"script\" : {\n \"source\": \"doc['price'].value\",\n \"lang\": \"painless\"\n }\n }\n }\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "histo": {
- "histogram": {
- "interval": 5,
- "script": {
- "source": "doc['price'].value",
- "lang": "painless"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 224
- },
- "digest": "4997db4f41283835e5a6250c454bec92",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"date\": { \"date_histogram\" : { \"field\": \"timestamp\", \"calendar_interval\": \"1d\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 254
- },
- "digest": "1c42bc684745178a587494809ab6ae57",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n {\n \"date\": {\n \"date_histogram\" : {\n \"field\": \"timestamp\",\n \"calendar_interval\": \"1d\",\n \"format\": \"yyyy-MM-dd\" <1>\n }\n }\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "format": "yyyy-MM-dd"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 295
- },
- "digest": "038bef10c90916a9addab866fc73dcca",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"date\": \"2015-10-01T05:30:00Z\"\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"date\": \"2015-10-01T06:30:00Z\"\n}\n\nGET my_index/_search?size=0\n{\n \"aggs\": {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n {\n \"date\": {\n \"date_histogram\" : {\n \"field\": \"date\",\n \"calendar_interval\": \"day\",\n \"offset\": \"+6h\",\n \"format\": \"iso8601\"\n }\n }\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T05:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T06:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day",
- "offset": "+6h",
- "format": "iso8601"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 332
- },
- "digest": "6577459aef49b998e80e45ec34277965",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_buckets\": {\n \"after_key\": { \"date\": \"2015-10-01T06:00:00.000Z\" },\n \"buckets\": [\n {\n \"key\": { \"date\": \"2015-09-30T06:00:00.000Z\" },\n \"doc_count\": 1\n },\n {\n \"key\": { \"date\": \"2015-10-01T06:00:00.000Z\" },\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 367
- },
- "digest": "488f4a4da2d2d8e0b35cba9c0a11ffef",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"tile\": { \"geotile_grid\" : { \"field\": \"location\", \"precision\": 8 } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "tile": {
- "geotile_grid": {
- "field": "location",
- "precision": 8
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 400
- },
- "digest": "5bc48d211cc95cb8962250f894da34a4",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n {\n \"tile\": {\n \"geotile_grid\" : {\n \"field\" : \"location\",\n \"precision\" : 22,\n \"bounds\": {\n \"top_left\" : \"52.4, 4.9\",\n \"bottom_right\" : \"52.3, 5.0\"\n }\n }\n }\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "tile": {
- "geotile_grid": {
- "field": "location",
- "precision": 22,
- "bounds": {
- "top_left": "52.4, 4.9",
- "bottom_right": "52.3, 5.0"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 434
- },
- "digest": "7df600a962ddb9e75462cab1017ab710",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 457
- },
- "digest": "1559d896ef715c8997e773e8f26ded49",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"shop\": { \"terms\": {\"field\": \"shop\" } } },\n { \"product\": { \"terms\": { \"field\": \"product\" } } },\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "shop": {
- "terms": {
- "field": "shop"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- },
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 487
- },
- "digest": "1111d70f0ae3044b0a86c82b2ded5f74",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\", \"order\": \"asc\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product",
- "order": "asc"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 514
- },
- "digest": "441e1052c59a3d9182fd608c08e11169",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"product_name\": { \"terms\" : { \"field\": \"product\", \"missing_bucket\": true } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "product_name": {
- "terms": {
- "field": "product",
- "missing_bucket": true
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 554
- },
- "digest": "a84493b3b31741c9e1f998b59b40db82",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"size\": 2,\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "size": 2,
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 576
- },
- "digest": "cfd54d514967ff5692371513c98f2511",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_buckets\": {\n \"after_key\": {\n \"date\": 1494288000000,\n \"product\": \"mad max\"\n },\n \"buckets\": [\n {\n \"key\": {\n \"date\": 1494201600000,\n \"product\": \"rocky\"\n },\n \"doc_count\": 1\n },\n {\n \"key\": {\n \"date\": 1494288000000,\n \"product\": \"mad max\"\n },\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 612
- },
- "digest": "eac8d98e2bd0eb75e8428212e9f4e4a7",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"size\": 2,\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\", \"order\": \"asc\" } } }\n ],\n \"after\": { \"date\": 1494288000000, \"product\": \"mad max\" } <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "size": 2,
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product",
- "order": "asc"
- }
- }
- }
- ],
- "after": {
- "date": 1494288000000,
- "product": "mad max"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 644
- },
- "digest": "1d1186dc28cb5b11c19a8341ec1c0558",
- "lang": "console",
- "found": [],
- "source": "PUT twitter\n{\n \"settings\" : {\n \"index\" : {\n \"sort.field\" : [\"username\", \"timestamp\"], <1>\n \"sort.order\" : [\"asc\", \"desc\"] <2>\n }\n },\n \"mappings\": {\n \"properties\": {\n \"username\": {\n \"type\": \"keyword\",\n \"doc_values\": true\n },\n \"timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "sort.field": [
- "username",
- "timestamp"
- ],
- "sort.order": [
- "asc",
- "desc"
- ]
- }
- },
- "mappings": {
- "properties": {
- "username": {
- "type": "keyword",
- "doc_values": true
- },
- "timestamp": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 673
- },
- "digest": "ca3c86d8bb26a8a9422b4b628de03dc4",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"user_name\": { \"terms\" : { \"field\": \"user_name\" } } } <1>\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "user_name": {
- "terms": {
- "field": "user_name"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 692
- },
- "digest": "c98edce2074791ebad716b9a5b03215f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"user_name\": { \"terms\" : { \"field\": \"user_name\" } } }, <1>\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } } <2>\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "user_name": {
- "terms": {
- "field": "user_name"
- }
- }
- },
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 717
- },
- "digest": "b2d0d2f519a37b93b93889be7979ee5d",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"track_total_hits\": false,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"user_name\": { \"terms\" : { \"field\": \"user_name\" } } },\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "track_total_hits": false,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "user_name": {
- "terms": {
- "field": "user_name"
- }
- }
- },
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 756
- },
- "digest": "4a37d7d228d9cba63ebe7b9870dce531",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"my_buckets\": {\n \"composite\" : {\n \"sources\" : [\n { \"date\": { \"date_histogram\": { \"field\": \"timestamp\", \"calendar_interval\": \"1d\", \"order\": \"desc\" } } },\n { \"product\": { \"terms\": {\"field\": \"product\" } } }\n ]\n },\n \"aggregations\": {\n \"the_avg\": {\n \"avg\": { \"field\": \"price\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_buckets": {
- "composite": {
- "sources": [
- {
- "date": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "1d",
- "order": "desc"
- }
- }
- },
- {
- "product": {
- "terms": {
- "field": "product"
- }
- }
- }
- ]
- },
- "aggregations": {
- "the_avg": {
- "avg": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/composite-aggregation.asciidoc",
- "line": 782
- },
- "digest": "b296d732aaf10cb37209b37062a35760",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_buckets\": {\n \"after_key\": {\n \"date\": 1494201600000,\n \"product\": \"rocky\"\n },\n \"buckets\": [\n {\n \"key\": {\n \"date\": 1494460800000,\n \"product\": \"apocalypse now\"\n },\n \"doc_count\": 1,\n \"the_avg\": {\n \"value\": 10.0\n }\n },\n {\n \"key\": {\n \"date\": 1494374400000,\n \"product\": \"mad max\"\n },\n \"doc_count\": 1,\n \"the_avg\": {\n \"value\": 27.0\n }\n },\n {\n \"key\": {\n \"date\": 1494288000000,\n \"product\" : \"mad max\"\n },\n \"doc_count\": 2,\n \"the_avg\": {\n \"value\": 22.5\n }\n },\n {\n \"key\": {\n \"date\": 1494201600000,\n \"product\": \"rocky\"\n },\n \"doc_count\": 1,\n \"the_avg\": {\n \"value\": 10.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 119
- },
- "digest": "b789292f9cf63ce912e058c46d90ce20",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 138
- },
- "digest": "73e5c88ad1488b213fb278ee1cb42289",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"2d\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "2d"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 214
- },
- "digest": "09ecba5814d71e4c44468575eada9878",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"fixed_interval\" : \"30d\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "fixed_interval": "30d"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 232
- },
- "digest": "2bb2339ac055337abf753bddb7771659",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"fixed_interval\" : \"2w\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "fixed_interval": "2w"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 303
- },
- "digest": "8a355eb25d2a01ba62dc1a22dd46f46f",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"1M\",\n \"format\" : \"yyyy-MM-dd\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M",
- "format": "yyyy-MM-dd"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 324
- },
- "digest": "4b68a9a9a6e78ef609adf1c3067e5fea",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"sales_over_time\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-01-01\",\n \"key\": 1420070400000,\n \"doc_count\": 3\n },\n {\n \"key_as_string\": \"2015-02-01\",\n \"key\": 1422748800000,\n \"doc_count\": 2\n },\n {\n \"key_as_string\": \"2015-03-01\",\n \"key\": 1425168000000,\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 380
- },
- "digest": "70f0aa5853697e265ef3b1df72940951",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"date\": \"2015-10-01T00:30:00Z\"\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"date\": \"2015-10-01T01:30:00Z\"\n}\n\nGET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"day\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T00:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T01:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 409
- },
- "digest": "c58f9b02f68576dc466750382a93a10e",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-10-01T00:00:00.000Z\",\n \"key\": 1443657600000,\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 431
- },
- "digest": "8de3206f80e18185a5ad6481f4c2ee07",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"day\",\n \"time_zone\": \"-01:00\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day",
- "time_zone": "-01:00"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 451
- },
- "digest": "7505fd151b95c187a78278008393156b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-09-30T00:00:00.000-01:00\", <1>\n \"key\": 1443574800000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T00:00:00.000-01:00\", <1>\n \"key\": 1443661200000,\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 502
- },
- "digest": "aa6bfe54e2436eb668091fe31c2fbf4d",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"date\": \"2015-10-01T05:30:00Z\"\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"date\": \"2015-10-01T06:30:00Z\"\n}\n\nGET my_index/_search?size=0\n{\n \"aggs\": {\n \"by_day\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"day\",\n \"offset\": \"+6h\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T05:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "date": "2015-10-01T06:30:00Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "by_day": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day",
- "offset": "+6h"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 533
- },
- "digest": "c53ad8df37e9f98b893b66fd3abbc6e7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"by_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015-09-30T06:00:00.000Z\",\n \"key\": 1443592800000,\n \"doc_count\": 1\n },\n {\n \"key_as_string\": \"2015-10-01T06:00:00.000Z\",\n \"key\": 1443679200000,\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 567
- },
- "digest": "9524a9b7373fa4eb2905183b0e806962",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sales_over_time\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"1M\",\n \"format\" : \"yyyy-MM-dd\",\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sales_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M",
- "format": "yyyy-MM-dd",
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 587
- },
- "digest": "63aa34a2f3e6b7a27bfe950a639cc026",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"sales_over_time\": {\n \"buckets\": {\n \"2015-01-01\": {\n \"key_as_string\": \"2015-01-01\",\n \"key\": 1420070400000,\n \"doc_count\": 3\n },\n \"2015-02-01\": {\n \"key_as_string\": \"2015-02-01\",\n \"key\": 1422748800000,\n \"doc_count\": 2\n },\n \"2015-03-01\": {\n \"key_as_string\": \"2015-03-01\",\n \"key\": 1425168000000,\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 636
- },
- "digest": "39a6a038c4b551022afe83de0523634e",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"sale_date\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\": \"year\",\n \"missing\": \"2000/01/01\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "sale_date": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "year",
- "missing": "2000/01/01"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 669
- },
- "digest": "6faf10a73f7d5fffbcb037bdb2cbaff8",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"dayOfWeek\": {\n \"terms\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['date'].value.dayOfWeekEnum.value\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "dayOfWeek": {
- "terms": {
- "script": {
- "lang": "painless",
- "source": "doc['date'].value.dayOfWeekEnum.value"
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/datehistogram-aggregation.asciidoc",
- "line": 689
- },
- "digest": "6bd571871fdea8a323c86bea18188120",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"dayOfWeek\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"7\",\n \"doc_count\": 4\n },\n {\n \"key\": \"4\",\n \"doc_count\": 3\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 16
- },
- "digest": "a27c42ae4897ee6d2f6be3ddf80a8b3e",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"format\": \"MM-yyyy\",\n \"ranges\": [\n { \"to\": \"now-10M/M\" }, <1>\n { \"from\": \"now-10M/M\" } <2>\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "format": "MM-yyyy",
- "ranges": [
- {
- "to": "now-10M/M"
- },
- {
- "from": "now-10M/M"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 45
- },
- "digest": "26e6779741c2e4970eceb02ced279041",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"range\": {\n \"buckets\": [\n {\n \"to\": 1.4436576E12,\n \"to_as_string\": \"10-2015\",\n \"doc_count\": 7,\n \"key\": \"*-10-2015\"\n },\n {\n \"from\": 1.4436576E12,\n \"from_as_string\": \"10-2015\",\n \"doc_count\": 0,\n \"key\": \"10-2015-*\"\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 78
- },
- "digest": "a6ef8cd8c8218d547727ffc5485bfbd7",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"missing\": \"1976/11/30\",\n \"ranges\": [\n {\n \"key\": \"Older\",\n \"to\": \"2016/02/01\"\n }, <1>\n {\n \"key\": \"Newer\",\n \"from\": \"2016/02/01\",\n \"to\" : \"now/d\"\n }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "missing": "1976/11/30",
- "ranges": [
- {
- "key": "Older",
- "to": "2016/02/01"
- },
- {
- "key": "Newer",
- "from": "2016/02/01",
- "to": "now/d"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 269
- },
- "digest": "901d66919e584515717bf78ab5ca2cbb",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"time_zone\": \"CET\",\n \"ranges\": [\n { \"to\": \"2016/02/01\" }, <1>\n { \"from\": \"2016/02/01\", \"to\" : \"now/d\" }, <2>\n { \"from\": \"now/d\" }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "time_zone": "CET",
- "ranges": [
- {
- "to": "2016/02/01"
- },
- {
- "from": "2016/02/01",
- "to": "now/d"
- },
- {
- "from": "now/d"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 298
- },
- "digest": "83721157085b4e5a8a5ed3ede88b3690",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"format\": \"MM-yyy\",\n \"ranges\": [\n { \"to\": \"now-10M/M\" },\n { \"from\": \"now-10M/M\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "format": "MM-yyy",
- "ranges": [
- {
- "to": "now-10M/M"
- },
- {
- "from": "now-10M/M"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 321
- },
- "digest": "060755fcdff99fcc18a565619df3499b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"range\": {\n \"buckets\": {\n \"*-10-2015\": {\n \"to\": 1.4436576E12,\n \"to_as_string\": \"10-2015\",\n \"doc_count\": 7\n },\n \"10-2015-*\": {\n \"from\": 1.4436576E12,\n \"from_as_string\": \"10-2015\",\n \"doc_count\": 0\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 347
- },
- "digest": "2d1c675b3cb93119219a13db93262c1e",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\": {\n \"range\": {\n \"date_range\": {\n \"field\": \"date\",\n \"format\": \"MM-yyy\",\n \"ranges\": [\n { \"from\": \"01-2015\", \"to\": \"03-2015\", \"key\": \"quarter_01\" },\n { \"from\": \"03-2015\", \"to\": \"06-2015\", \"key\": \"quarter_02\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range": {
- "date_range": {
- "field": "date",
- "format": "MM-yyy",
- "ranges": [
- {
- "from": "01-2015",
- "to": "03-2015",
- "key": "quarter_01"
- },
- {
- "from": "03-2015",
- "to": "06-2015",
- "key": "quarter_02"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/daterange-aggregation.asciidoc",
- "line": 370
- },
- "digest": "04f37bb8f2d45e3ccf0ea89abfab9c67",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"range\": {\n \"buckets\": {\n \"quarter_01\": {\n \"from\": 1.4200704E12,\n \"from_as_string\": \"01-2015\",\n \"to\": 1.425168E12,\n \"to_as_string\": \"03-2015\",\n \"doc_count\": 5\n },\n \"quarter_02\": {\n \"from\": 1.425168E12,\n \"from_as_string\": \"03-2015\",\n \"to\": 1.4331168E12,\n \"to_as_string\": \"06-2015\",\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/diversified-sampler-aggregation.asciidoc",
- "line": 30
- },
- "digest": "3344c3478f1e8bbbef683757638a34f4",
- "lang": "console",
- "found": [],
- "source": "POST /stackoverflow/_search?size=0\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"tags:elasticsearch\"\n }\n },\n \"aggs\": {\n \"my_unbiased_sample\": {\n \"diversified_sampler\": {\n \"shard_size\": 200,\n \"field\" : \"author\"\n },\n \"aggs\": {\n \"keywords\": {\n \"significant_terms\": {\n \"field\": \"tags\",\n \"exclude\": [\"elasticsearch\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/stackoverflow/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "tags:elasticsearch"
- }
- },
- "aggs": {
- "my_unbiased_sample": {
- "diversified_sampler": {
- "shard_size": 200,
- "field": "author"
- },
- "aggs": {
- "keywords": {
- "significant_terms": {
- "field": "tags",
- "exclude": [
- "elasticsearch"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "stackoverflow"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/diversified-sampler-aggregation.asciidoc",
- "line": 61
- },
- "digest": "d1753ad4ec54b1c45d807263bad697cb",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_unbiased_sample\": {\n \"doc_count\": 151,<1>\n \"keywords\": {<2>\n \"doc_count\": 151,\n \"bg_count\": 650,\n \"buckets\": [\n {\n \"key\": \"kibana\",\n \"doc_count\": 150,\n \"score\": 2.213,\n \"bg_count\": 200\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/diversified-sampler-aggregation.asciidoc",
- "line": 95
- },
- "digest": "07afce825c09de17a3d73a02b17a0a97",
- "lang": "console",
- "found": [],
- "source": "POST /stackoverflow/_search?size=0\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"tags:kibana\"\n }\n },\n \"aggs\": {\n \"my_unbiased_sample\": {\n \"diversified_sampler\": {\n \"shard_size\": 200,\n \"max_docs_per_value\" : 3,\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['tags'].hashCode()\"\n }\n },\n \"aggs\": {\n \"keywords\": {\n \"significant_terms\": {\n \"field\": \"tags\",\n \"exclude\": [\"kibana\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/stackoverflow/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "tags:kibana"
- }
- },
- "aggs": {
- "my_unbiased_sample": {
- "diversified_sampler": {
- "shard_size": 200,
- "max_docs_per_value": 3,
- "script": {
- "lang": "painless",
- "source": "doc['tags'].hashCode()"
- }
- },
- "aggs": {
- "keywords": {
- "significant_terms": {
- "field": "tags",
- "exclude": [
- "kibana"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "stackoverflow"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/diversified-sampler-aggregation.asciidoc",
- "line": 130
- },
- "digest": "c7ebd0dfce616a0f566d57b6a5f88f7c",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"my_unbiased_sample\": {\n \"doc_count\": 6,\n \"keywords\": {\n \"doc_count\": 6,\n \"bg_count\": 650,\n \"buckets\": [\n {\n \"key\": \"logstash\",\n \"doc_count\": 3,\n \"score\": 2.213,\n \"bg_count\": 50\n },\n {\n \"key\": \"elasticsearch\",\n \"doc_count\": 3,\n \"score\": 1.34,\n \"bg_count\": 200\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filter-aggregation.asciidoc",
- "line": 9
- },
- "digest": "b93ed4ef309819734f0eeea82e8b0f1f",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"t_shirts\" : {\n \"filter\" : { \"term\": { \"type\": \"t-shirt\" } },\n \"aggs\" : {\n \"avg_price\" : { \"avg\" : { \"field\" : \"price\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "t_shirts": {
- "filter": {
- "term": {
- "type": "t-shirt"
- }
- },
- "aggs": {
- "avg_price": {
- "avg": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filter-aggregation.asciidoc",
- "line": 29
- },
- "digest": "cc5ee999726a7b866098e8e312191766",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"t_shirts\" : {\n \"doc_count\" : 3,\n \"avg_price\" : { \"value\" : 128.33333333333334 }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 11
- },
- "digest": "188e6208cccb13027a5c1c95440841ee",
- "lang": "console",
- "found": [],
- "source": "PUT /logs/_bulk?refresh\n{ \"index\" : { \"_id\" : 1 } }\n{ \"body\" : \"warning: page could not be rendered\" }\n{ \"index\" : { \"_id\" : 2 } }\n{ \"body\" : \"authentication error\" }\n{ \"index\" : { \"_id\" : 3 } }\n{ \"body\" : \"warning: connection timed out\" }\n\nGET logs/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"messages\" : {\n \"filters\" : {\n \"filters\" : {\n \"errors\" : { \"match\" : { \"body\" : \"error\" }},\n \"warnings\" : { \"match\" : { \"body\" : \"warning\" }}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "body": "warning: page could not be rendered"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "body": "authentication error"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "body": "warning: connection timed out"
- }
- ],
- "params": {
- "index": "logs"
- },
- "api": "bulk"
- },
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "messages": {
- "filters": {
- "filters": {
- "errors": {
- "match": {
- "body": "error"
- }
- },
- "warnings": {
- "match": {
- "body": "warning"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 43
- },
- "digest": "9024c429b700eef896a8f12aa96b1dd3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 9,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"messages\": {\n \"buckets\": {\n \"errors\": {\n \"doc_count\": 1\n },\n \"warnings\": {\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 73
- },
- "digest": "3cd2f7f9096a8e8180f27b6c30e71840",
- "lang": "console",
- "found": [],
- "source": "GET logs/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"messages\" : {\n \"filters\" : {\n \"filters\" : [\n { \"match\" : { \"body\" : \"error\" }},\n { \"match\" : { \"body\" : \"warning\" }}\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "messages": {
- "filters": {
- "filters": [
- {
- "match": {
- "body": "error"
- }
- },
- {
- "match": {
- "body": "warning"
- }
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 95
- },
- "digest": "be0d6421c3fa5bed737f55c6f44ca5d5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 4,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"messages\": {\n \"buckets\": [\n {\n \"doc_count\": 1\n },\n {\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 135
- },
- "digest": "21bb03ca9123de3237c1c76934f9f172",
- "lang": "console",
- "found": [],
- "source": "PUT logs/_doc/4?refresh\n{\n \"body\": \"info: user Bob logged out\"\n}\n\nGET logs/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"messages\" : {\n \"filters\" : {\n \"other_bucket_key\": \"other_messages\",\n \"filters\" : {\n \"errors\" : { \"match\" : { \"body\" : \"error\" }},\n \"warnings\" : { \"match\" : { \"body\" : \"warning\" }}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs/_doc/4",
- "query": {
- "refresh": true
- },
- "body": {
- "body": "info: user Bob logged out"
- },
- "params": {
- "index": "logs",
- "id": "4"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "messages": {
- "filters": {
- "other_bucket_key": "other_messages",
- "filters": {
- "errors": {
- "match": {
- "body": "error"
- }
- },
- "warnings": {
- "match": {
- "body": "warning"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/filters-aggregation.asciidoc",
- "line": 162
- },
- "digest": "8f7dede7e1320bde1a4ebbf22da9a9a8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 3,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"messages\": {\n \"buckets\": {\n \"errors\": {\n \"doc_count\": 1\n },\n \"warnings\": {\n \"doc_count\": 2\n },\n \"other_messages\": {\n \"doc_count\": 1\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 7
- },
- "digest": "9bf956f9d3f27bb7b4e5a03af84d5da5",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings_around_amsterdam\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"ranges\" : [\n { \"to\" : 100000 },\n { \"from\" : 100000, \"to\" : 300000 },\n { \"from\" : 300000 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings_around_amsterdam": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "ranges": [
- {
- "to": 100000
- },
- {
- "from": 100000,
- "to": 300000
- },
- {
- "from": 300000
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 54
- },
- "digest": "a3bd9eb63ad4bd236a2c0feed0607960",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"rings_around_amsterdam\" : {\n \"buckets\": [\n {\n \"key\": \"*-100000.0\",\n \"from\": 0.0,\n \"to\": 100000.0,\n \"doc_count\": 3\n },\n {\n \"key\": \"100000.0-300000.0\",\n \"from\": 100000.0,\n \"to\": 300000.0,\n \"doc_count\": 1\n },\n {\n \"key\": \"300000.0-*\",\n \"from\": 300000.0,\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 93
- },
- "digest": "c78b80d080a58090583228421ac1553d",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"unit\" : \"km\", <1>\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 300 },\n { \"from\" : 300 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "unit": "km",
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 300
- },
- {
- "from": 300
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 119
- },
- "digest": "a5736ad3638c238e3b15c9fdaa1f29f7",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"unit\" : \"km\",\n \"distance_type\" : \"plane\",\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 300 },\n { \"from\" : 300 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "unit": "km",
- "distance_type": "plane",
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 300
- },
- {
- "from": 300
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 146
- },
- "digest": "6b31f435607617d96b1dff3bf10c9d8c",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings_around_amsterdam\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"ranges\" : [\n { \"to\" : 100000 },\n { \"from\" : 100000, \"to\" : 300000 },\n { \"from\" : 300000 }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings_around_amsterdam": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "ranges": [
- {
- "to": 100000
- },
- {
- "from": 100000,
- "to": 300000
- },
- {
- "from": 300000
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 170
- },
- "digest": "cf73842533f37413f9044e734bf03220",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"rings_around_amsterdam\" : {\n \"buckets\": {\n \"*-100000.0\": {\n \"from\": 0.0,\n \"to\": 100000.0,\n \"doc_count\": 3\n },\n \"100000.0-300000.0\": {\n \"from\": 100000.0,\n \"to\": 300000.0,\n \"doc_count\": 1\n },\n \"300000.0-*\": {\n \"from\": 300000.0,\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 200
- },
- "digest": "c5afc3d716fdf8c0eefa4732e8a4b3ee",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggs\" : {\n \"rings_around_amsterdam\" : {\n \"geo_distance\" : {\n \"field\" : \"location\",\n \"origin\" : \"52.3760, 4.894\",\n \"ranges\" : [\n { \"to\" : 100000, \"key\": \"first_ring\" },\n { \"from\" : 100000, \"to\" : 300000, \"key\": \"second_ring\" },\n { \"from\" : 300000, \"key\": \"third_ring\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "rings_around_amsterdam": {
- "geo_distance": {
- "field": "location",
- "origin": "52.3760, 4.894",
- "ranges": [
- {
- "to": 100000,
- "key": "first_ring"
- },
- {
- "from": 100000,
- "to": 300000,
- "key": "second_ring"
- },
- {
- "from": 300000,
- "key": "third_ring"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geodistance-aggregation.asciidoc",
- "line": 224
- },
- "digest": "7511aeeb2878c0b3e01b3557027ce575",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"rings_around_amsterdam\" : {\n \"buckets\": {\n \"first_ring\": {\n \"from\": 0.0,\n \"to\": 100000.0,\n \"doc_count\": 3\n },\n \"second_ring\": {\n \"from\": 100000.0,\n \"to\": 300000.0,\n \"doc_count\": 1\n },\n \"third_ring\": {\n \"from\": 300000.0,\n \"doc_count\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 21
- },
- "digest": "71af0fec59d37477c850d47730d3f286",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"large-grid\" : {\n \"geohash_grid\" : {\n \"field\" : \"location\",\n \"precision\" : 3\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "large-grid": {
- "geohash_grid": {
- "field": "location",
- "precision": 3
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 63
- },
- "digest": "3d844e84b3d980d735c327d4f4602b2b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"large-grid\": {\n \"buckets\": [\n {\n \"key\": \"u17\",\n \"doc_count\": 3\n },\n {\n \"key\": \"u09\",\n \"doc_count\": 2\n },\n {\n \"key\": \"u15\",\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 93
- },
- "digest": "9f0c6a8c6381bb0cb81a3070dd2bf2f2",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"location\" : {\n \"top_left\" : \"52.4, 4.9\",\n \"bottom_right\" : \"52.3, 5.0\"\n }\n }\n },\n \"aggregations\":{\n \"zoom1\":{\n \"geohash_grid\" : {\n \"field\": \"location\",\n \"precision\": 8\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "zoomed-in": {
- "filter": {
- "geo_bounding_box": {
- "location": {
- "top_left": "52.4, 4.9",
- "bottom_right": "52.3, 5.0"
- }
- }
- },
- "aggregations": {
- "zoom1": {
- "geohash_grid": {
- "field": "location",
- "precision": 8
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 124
- },
- "digest": "36f61e038014f92466cd83d7b007e16b",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"location\" : {\n \"top_left\" : \"u17\",\n \"bottom_right\" : \"u17\"\n }\n }\n },\n \"aggregations\":{\n \"zoom1\":{\n \"geohash_grid\" : {\n \"field\": \"location\",\n \"precision\": 8\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "zoomed-in": {
- "filter": {
- "geo_bounding_box": {
- "location": {
- "top_left": "u17",
- "bottom_right": "u17"
- }
- }
- },
- "aggregations": {
- "zoom1": {
- "geohash_grid": {
- "field": "location",
- "precision": 8
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 152
- },
- "digest": "0846b119686525270f2065832720df34",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"doc_count\" : 3,\n \"zoom1\" : {\n \"buckets\" : [\n {\n \"key\" : \"u173zy3j\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"u173zvfz\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"u173zt90\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 206
- },
- "digest": "850c30e63e2237776a7ed299f0262316",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"tiles-in-bounds\" : {\n \"geohash_grid\" : {\n \"field\" : \"location\",\n \"precision\" : 8,\n \"bounds\": {\n \"top_left\" : \"53.4375, 4.21875\",\n \"bottom_right\" : \"52.03125, 5.625\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "tiles-in-bounds": {
- "geohash_grid": {
- "field": "location",
- "precision": 8,
- "bounds": {
- "top_left": "53.4375, 4.21875",
- "bottom_right": "52.03125, 5.625"
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geohashgrid-aggregation.asciidoc",
- "line": 226
- },
- "digest": "28025af4e9cc45d29040b5ff8078530e",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"tiles-in-bounds\" : {\n \"buckets\" : [\n {\n \"key\" : \"u173zy3j\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"u173zvfz\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"u173zt90\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 34
- },
- "digest": "86f1e66bc101b3f22dc84d2aa172fd75",
- "lang": "console",
- "found": [],
- "source": "PUT /museums\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPOST /museums/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"location\": \"52.374081,4.912350\", \"name\": \"NEMO Science Museum\"}\n{\"index\":{\"_id\":2}}\n{\"location\": \"52.369219,4.901618\", \"name\": \"Museum Het Rembrandthuis\"}\n{\"index\":{\"_id\":3}}\n{\"location\": \"52.371667,4.914722\", \"name\": \"Nederlands Scheepvaartmuseum\"}\n{\"index\":{\"_id\":4}}\n{\"location\": \"51.222900,4.405200\", \"name\": \"Letterenhuis\"}\n{\"index\":{\"_id\":5}}\n{\"location\": \"48.861111,2.336389\", \"name\": \"Musée du Louvre\"}\n{\"index\":{\"_id\":6}}\n{\"location\": \"48.860000,2.327000\", \"name\": \"Musée d'Orsay\"}\n\nPOST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"large-grid\" : {\n \"geotile_grid\" : {\n \"field\" : \"location\",\n \"precision\" : 8\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/museums",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/museums/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "location": "52.374081,4.912350",
- "name": "NEMO Science Museum"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "location": "52.369219,4.901618",
- "name": "Museum Het Rembrandthuis"
- },
- {
- "index": {
- "_id": 3
- }
- },
- {
- "location": "52.371667,4.914722",
- "name": "Nederlands Scheepvaartmuseum"
- },
- {
- "index": {
- "_id": 4
- }
- },
- {
- "location": "51.222900,4.405200",
- "name": "Letterenhuis"
- },
- {
- "index": {
- "_id": 5
- }
- },
- {
- "location": "48.861111,2.336389",
- "name": "Musée du Louvre"
- },
- {
- "index": {
- "_id": 6
- }
- },
- {
- "location": "48.860000,2.327000",
- "name": "Musée d'Orsay"
- }
- ],
- "params": {
- "index": "museums"
- },
- "api": "bulk"
- },
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "large-grid": {
- "geotile_grid": {
- "field": "location",
- "precision": 8
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 76
- },
- "digest": "c62e00cc03f0c034220d321408c4cfb7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"large-grid\": {\n \"buckets\": [\n {\n \"key\" : \"8/131/84\",\n \"doc_count\" : 3\n },\n {\n \"key\" : \"8/129/88\",\n \"doc_count\" : 2\n },\n {\n \"key\" : \"8/131/85\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 109
- },
- "digest": "57705815ad6bd50d91e58153ae75d3ca",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"filter\" : {\n \"geo_bounding_box\" : {\n \"location\" : {\n \"top_left\" : \"52.4, 4.9\",\n \"bottom_right\" : \"52.3, 5.0\"\n }\n }\n },\n \"aggregations\":{\n \"zoom1\":{\n \"geotile_grid\" : {\n \"field\": \"location\",\n \"precision\": 22\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "zoomed-in": {
- "filter": {
- "geo_bounding_box": {
- "location": {
- "top_left": "52.4, 4.9",
- "bottom_right": "52.3, 5.0"
- }
- }
- },
- "aggregations": {
- "zoom1": {
- "geotile_grid": {
- "field": "location",
- "precision": 22
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 137
- },
- "digest": "f39887c8b62da4c01c78aba943b3bf61",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"zoomed-in\" : {\n \"doc_count\" : 3,\n \"zoom1\" : {\n \"buckets\" : [\n {\n \"key\" : \"22/2154412/1378379\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"22/2154385/1378332\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"22/2154259/1378425\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 177
- },
- "digest": "473bc08acc95689e256c7160fec07c0c",
- "lang": "console",
- "found": [],
- "source": "POST /museums/_search?size=0\n{\n \"aggregations\" : {\n \"tiles-in-bounds\" : {\n \"geotile_grid\" : {\n \"field\" : \"location\",\n \"precision\" : 22,\n \"bounds\": {\n \"top_left\" : \"52.4, 4.9\",\n \"bottom_right\" : \"52.3, 5.0\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/museums/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggregations": {
- "tiles-in-bounds": {
- "geotile_grid": {
- "field": "location",
- "precision": 22,
- "bounds": {
- "top_left": "52.4, 4.9",
- "bottom_right": "52.3, 5.0"
- }
- }
- }
- }
- },
- "params": {
- "index": "museums"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/geotilegrid-aggregation.asciidoc",
- "line": 197
- },
- "digest": "dee2fe5d2073aec109f87c1e279e4405",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"tiles-in-bounds\" : {\n \"buckets\" : [\n {\n \"key\" : \"22/2154412/1378379\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"22/2154385/1378332\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"22/2154259/1378425\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/global-aggregation.asciidoc",
- "line": 15
- },
- "digest": "d209f2447584a37e7f1480912b40a52d",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"match\" : { \"type\" : \"t-shirt\" }\n },\n \"aggs\" : {\n \"all_products\" : {\n \"global\" : {}, <1>\n \"aggs\" : { <2>\n \"avg_price\" : { \"avg\" : { \"field\" : \"price\" } }\n }\n },\n \"t_shirts\": { \"avg\" : { \"field\" : \"price\" } }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "match": {
- "type": "t-shirt"
- }
- },
- "aggs": {
- "all_products": {
- "global": {},
- "aggs": {
- "avg_price": {
- "avg": {
- "field": "price"
- }
- }
- }
- },
- "t_shirts": {
- "avg": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/global-aggregation.asciidoc",
- "line": 45
- },
- "digest": "59969f7a7748a0370af34cf0611335eb",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"all_products\" : {\n \"doc_count\" : 7, <1>\n \"avg_price\" : {\n \"value\" : 140.71428571428572 <2>\n }\n },\n \"t_shirts\": {\n \"value\" : 128.33333333333334 <3>\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 28
- },
- "digest": "322e1a8842fc5924b972a9a32c29c17a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"prices\" : {\n \"histogram\" : {\n \"field\" : \"price\",\n \"interval\" : 50\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "prices": {
- "histogram": {
- "field": "price",
- "interval": 50
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 46
- },
- "digest": "686a2a1139ff717e0b088f017af0b51b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"prices\" : {\n \"buckets\": [\n {\n \"key\": 0.0,\n \"doc_count\": 1\n },\n {\n \"key\": 50.0,\n \"doc_count\": 1\n },\n {\n \"key\": 100.0,\n \"doc_count\": 0\n },\n {\n \"key\": 150.0,\n \"doc_count\": 2\n },\n {\n \"key\": 200.0,\n \"doc_count\": 3\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 86
- },
- "digest": "0003e4064d004a341c193ddd5d82a07f",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"prices\" : {\n \"histogram\" : {\n \"field\" : \"price\",\n \"interval\" : 50,\n \"min_doc_count\" : 1\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "prices": {
- "histogram": {
- "field": "price",
- "interval": 50,
- "min_doc_count": 1
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 105
- },
- "digest": "ef9ab5c482c12f73a296a99504417fb1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"prices\" : {\n \"buckets\": [\n {\n \"key\": 0.0,\n \"doc_count\": 1\n },\n {\n \"key\": 50.0,\n \"doc_count\": 1\n },\n {\n \"key\": 150.0,\n \"doc_count\": 2\n },\n {\n \"key\": 200.0,\n \"doc_count\": 3\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 161
- },
- "digest": "c72bd866a7e21907fa71f1067371db55",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"query\" : {\n \"constant_score\" : { \"filter\": { \"range\" : { \"price\" : { \"to\" : \"500\" } } } }\n },\n \"aggs\" : {\n \"prices\" : {\n \"histogram\" : {\n \"field\" : \"price\",\n \"interval\" : 50,\n \"extended_bounds\" : {\n \"min\" : 0,\n \"max\" : 500\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "range": {
- "price": {
- "to": "500"
- }
- }
- }
- }
- },
- "aggs": {
- "prices": {
- "histogram": {
- "field": "price",
- "interval": 50,
- "extended_bounds": {
- "min": 0,
- "max": 500
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 213
- },
- "digest": "e0bba0f00a589933499493390a9a0517",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"prices\" : {\n \"histogram\" : {\n \"field\" : \"price\",\n \"interval\" : 50,\n \"keyed\" : true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "prices": {
- "histogram": {
- "field": "price",
- "interval": 50,
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 232
- },
- "digest": "7047beff5554790b5fa4a3daadb535f6",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"prices\": {\n \"buckets\": {\n \"0.0\": {\n \"key\": 0.0,\n \"doc_count\": 1\n },\n \"50.0\": {\n \"key\": 50.0,\n \"doc_count\": 1\n },\n \"100.0\": {\n \"key\": 100.0,\n \"doc_count\": 0\n },\n \"150.0\": {\n \"key\": 150.0,\n \"doc_count\": 2\n },\n \"200.0\": {\n \"key\": 200.0,\n \"doc_count\": 3\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 272
- },
- "digest": "271c55d9a421dbc794caa0ebaead95e3",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"quantity\" : {\n \"histogram\" : {\n \"field\" : \"quantity\",\n \"interval\": 10,\n \"missing\": 0 <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "quantity": {
- "histogram": {
- "field": "quantity",
- "interval": 10,
- "missing": 0
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 299
- },
- "digest": "ed5689e3f9c92a7cc3e92695fe6fbb19",
- "lang": "console",
- "found": [],
- "source": "PUT metrics_index/_doc/1\n{\n \"network.name\" : \"net-1\",\n \"latency_histo\" : {\n \"values\" : [1, 3, 8, 12, 15],\n \"counts\" : [3, 7, 23, 12, 6]\n }\n}\n\nPUT metrics_index/_doc/2\n{\n \"network.name\" : \"net-2\",\n \"latency_histo\" : {\n \"values\" : [1, 6, 8, 12, 14],\n \"counts\" : [8, 17, 8, 7, 6]\n }\n}\n\nPOST /metrics_index/_search?size=0\n{\n \"aggs\" : {\n \"latency_buckets\" : {\n \"histogram\" : {\n \"field\" : \"latency_histo\",\n \"interval\" : 5\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/metrics_index/_doc/1",
- "query": null,
- "body": {
- "network.name": "net-1",
- "latency_histo": {
- "values": [
- 1,
- 3,
- 8,
- 12,
- 15
- ],
- "counts": [
- 3,
- 7,
- 23,
- 12,
- 6
- ]
- }
- },
- "params": {
- "index": "metrics_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/metrics_index/_doc/2",
- "query": null,
- "body": {
- "network.name": "net-2",
- "latency_histo": {
- "values": [
- 1,
- 6,
- 8,
- 12,
- 14
- ],
- "counts": [
- 8,
- 17,
- 8,
- 7,
- 6
- ]
- }
- },
- "params": {
- "index": "metrics_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/metrics_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "latency_buckets": {
- "histogram": {
- "field": "latency_histo",
- "interval": 5
- }
- }
- }
- },
- "params": {
- "index": "metrics_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/histogram-aggregation.asciidoc",
- "line": 336
- },
- "digest": "4dc3649983a7e114ba06e52595595832",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"prices\" : {\n \"buckets\": [\n {\n \"key\": 0.0,\n \"doc_count\": 18\n },\n {\n \"key\": 5.0,\n \"doc_count\": 48\n },\n {\n \"key\": 10.0,\n \"doc_count\": 25\n },\n {\n \"key\": 15.0,\n \"doc_count\": 6\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 9
- },
- "digest": "01cc705f6074ab637cfbb9f92cf44e44",
- "lang": "console",
- "found": [],
- "source": "GET /ip_addresses/_search\n{\n \"size\": 10,\n \"aggs\" : {\n \"ip_ranges\" : {\n \"ip_range\" : {\n \"field\" : \"ip\",\n \"ranges\" : [\n { \"to\" : \"10.0.0.5\" },\n { \"from\" : \"10.0.0.5\" }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/ip_addresses/_search",
- "query": null,
- "body": {
- "size": 10,
- "aggs": {
- "ip_ranges": {
- "ip_range": {
- "field": "ip",
- "ranges": [
- {
- "to": "10.0.0.5"
- },
- {
- "from": "10.0.0.5"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "ip_addresses"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 31
- },
- "digest": "1ba6dc327a97366eeef7173a9fc4b250",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"ip_ranges\": {\n \"buckets\" : [\n {\n \"key\": \"*-10.0.0.5\",\n \"to\": \"10.0.0.5\",\n \"doc_count\": 10\n },\n {\n \"key\": \"10.0.0.5-*\",\n \"from\": \"10.0.0.5\",\n \"doc_count\": 260\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 58
- },
- "digest": "9f4ba6565d80e0964e177eaac9fb0614",
- "lang": "console",
- "found": [],
- "source": "GET /ip_addresses/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"ip_ranges\" : {\n \"ip_range\" : {\n \"field\" : \"ip\",\n \"ranges\" : [\n { \"mask\" : \"10.0.0.0/25\" },\n { \"mask\" : \"10.0.0.127/25\" }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/ip_addresses/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "ip_ranges": {
- "ip_range": {
- "field": "ip",
- "ranges": [
- {
- "mask": "10.0.0.0/25"
- },
- {
- "mask": "10.0.0.127/25"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "ip_addresses"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 80
- },
- "digest": "a60f7bec5b654207d2c1b7459b55eb95",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"ip_ranges\": {\n \"buckets\": [\n {\n \"key\": \"10.0.0.0/25\",\n \"from\": \"10.0.0.0\",\n \"to\": \"10.0.0.128\",\n \"doc_count\": 128\n },\n {\n \"key\": \"10.0.0.127/25\",\n \"from\": \"10.0.0.0\",\n \"to\": \"10.0.0.128\",\n \"doc_count\": 128\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 111
- },
- "digest": "c4db73a276175d57c6a9a0387e728028",
- "lang": "console",
- "found": [],
- "source": "GET /ip_addresses/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"ip_ranges\": {\n \"ip_range\": {\n \"field\": \"ip\",\n \"ranges\": [\n { \"to\" : \"10.0.0.5\" },\n { \"from\" : \"10.0.0.5\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/ip_addresses/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "ip_ranges": {
- "ip_range": {
- "field": "ip",
- "ranges": [
- {
- "to": "10.0.0.5"
- },
- {
- "from": "10.0.0.5"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "ip_addresses"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 134
- },
- "digest": "d5be17fc0678dad0a2ba0e7c65c8d5b1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"ip_ranges\": {\n \"buckets\": {\n \"*-10.0.0.5\": {\n \"to\": \"10.0.0.5\",\n \"doc_count\": 10\n },\n \"10.0.0.5-*\": {\n \"from\": \"10.0.0.5\",\n \"doc_count\": 260\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 159
- },
- "digest": "fa8ee2094af36e7ec02233a4c7b008bc",
- "lang": "console",
- "found": [],
- "source": "GET /ip_addresses/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"ip_ranges\": {\n \"ip_range\": {\n \"field\": \"ip\",\n \"ranges\": [\n { \"key\": \"infinity\", \"to\" : \"10.0.0.5\" },\n { \"key\": \"and-beyond\", \"from\" : \"10.0.0.5\" }\n ],\n \"keyed\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/ip_addresses/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "ip_ranges": {
- "ip_range": {
- "field": "ip",
- "ranges": [
- {
- "key": "infinity",
- "to": "10.0.0.5"
- },
- {
- "key": "and-beyond",
- "from": "10.0.0.5"
- }
- ],
- "keyed": true
- }
- }
- }
- },
- "params": {
- "index": "ip_addresses"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/iprange-aggregation.asciidoc",
- "line": 182
- },
- "digest": "de137a4ba0b8a83dc41471287c52b6ae",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n\n \"aggregations\": {\n \"ip_ranges\": {\n \"buckets\": {\n \"infinity\": {\n \"to\": \"10.0.0.5\",\n \"doc_count\": 10\n },\n \"and-beyond\": {\n \"from\": \"10.0.0.5\",\n \"doc_count\": 260\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/missing-aggregation.asciidoc",
- "line": 9
- },
- "digest": "09dd80a4b937315d4a1aa629b22f9332",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"products_without_a_price\" : {\n \"missing\" : { \"field\" : \"price\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "products_without_a_price": {
- "missing": {
- "field": "price"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/missing-aggregation.asciidoc",
- "line": 26
- },
- "digest": "357ba4c93cefb311862acf2ad4f86bb9",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"products_without_a_price\" : {\n \"doc_count\" : 00\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/nested-aggregation.asciidoc",
- "line": 10
- },
- "digest": "60917d97013c4516c621c6c24c29748f",
- "lang": "console",
- "found": [],
- "source": "PUT /products\n{\n \"mappings\": {\n \"properties\" : {\n \"resellers\" : { <1>\n \"type\" : \"nested\",\n \"properties\" : {\n \"reseller\" : { \"type\" : \"text\" },\n \"price\" : { \"type\" : \"double\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/products",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "resellers": {
- "type": "nested",
- "properties": {
- "reseller": {
- "type": "text"
- },
- "price": {
- "type": "double"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "products"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/nested-aggregation.asciidoc",
- "line": 31
- },
- "digest": "a1849d3cb44fc24b58323ec97c5e9c5c",
- "lang": "console",
- "found": [],
- "source": "PUT /products/_doc/0\n{\n \"name\": \"LED TV\", <1>\n \"resellers\": [\n {\n \"reseller\": \"companyA\",\n \"price\": 350\n },\n {\n \"reseller\": \"companyB\",\n \"price\": 500\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/products/_doc/0",
- "query": null,
- "body": {
- "name": "LED TV",
- "resellers": [
- {
- "reseller": "companyA",
- "price": 350
- },
- {
- "reseller": "companyB",
- "price": 500
- }
- ]
- },
- "params": {
- "index": "products",
- "id": "0"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/nested-aggregation.asciidoc",
- "line": 55
- },
- "digest": "be91aeed1af812064943dd5192425ab2",
- "lang": "console",
- "found": [],
- "source": "GET /products/_search\n{\n \"query\" : {\n \"match\" : { \"name\" : \"led tv\" }\n },\n \"aggs\" : {\n \"resellers\" : {\n \"nested\" : {\n \"path\" : \"resellers\"\n },\n \"aggs\" : {\n \"min_price\" : { \"min\" : { \"field\" : \"resellers.price\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/products/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "name": "led tv"
- }
- },
- "aggs": {
- "resellers": {
- "nested": {
- "path": "resellers"
- },
- "aggs": {
- "min_price": {
- "min": {
- "field": "resellers.price"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "products"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/nested-aggregation.asciidoc",
- "line": 82
- },
- "digest": "b8c2e035130102335a58e11e60562793",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"resellers\": {\n \"doc_count\": 2,\n \"min_price\": {\n \"value\": 350\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 13
- },
- "digest": "1db086021e83205b6eab3b7765911cc2",
- "lang": "console",
- "found": [],
- "source": "PUT parent_example\n{\n \"mappings\": {\n \"properties\": {\n \"join\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": \"answer\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/parent_example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "join": {
- "type": "join",
- "relations": {
- "question": "answer"
- }
- }
- }
- }
- },
- "params": {
- "index": "parent_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 36
- },
- "digest": "c9afa715021f2e6450e72ac73271960c",
- "lang": "console",
- "found": [],
- "source": "PUT parent_example/_doc/1\n{\n \"join\": {\n \"name\": \"question\"\n },\n \"body\": \"
I have Windows 2003 server and i bought a new Windows 2008 server...\",\n \"title\": \"Whats the best way to file transfer my site from server to a newer one?\",\n \"tags\": [\n \"windows-server-2003\",\n \"windows-server-2008\",\n \"file-transfer\"\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/parent_example/_doc/1",
- "query": null,
- "body": {
- "join": {
- "name": "question"
- },
- "body": "I have Windows 2003 server and i bought a new Windows 2008 server...",
- "title": "Whats the best way to file transfer my site from server to a newer one?",
- "tags": [
- "windows-server-2003",
- "windows-server-2008",
- "file-transfer"
- ]
- },
- "params": {
- "index": "parent_example",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 56
- },
- "digest": "d8310e5606c61e7a6e64a90838b1a830",
- "lang": "console",
- "found": [],
- "source": "PUT parent_example/_doc/2?routing=1\n{\n \"join\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n },\n \"owner\": {\n \"location\": \"Norfolk, United Kingdom\",\n \"display_name\": \"Sam\",\n \"id\": 48\n },\n \"body\": \"
Unfortunately you're pretty much limited to FTP...\",\n \"creation_date\": \"2009-05-04T13:45:37.030\"\n}\n\nPUT parent_example/_doc/3?routing=1&refresh\n{\n \"join\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n },\n \"owner\": {\n \"location\": \"Norfolk, United Kingdom\",\n \"display_name\": \"Troll\",\n \"id\": 49\n },\n \"body\": \"
Use Linux...\",\n \"creation_date\": \"2009-05-05T13:45:37.030\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/parent_example/_doc/2",
- "query": {
- "routing": "1"
- },
- "body": {
- "join": {
- "name": "answer",
- "parent": "1"
- },
- "owner": {
- "location": "Norfolk, United Kingdom",
- "display_name": "Sam",
- "id": 48
- },
- "body": "Unfortunately you're pretty much limited to FTP...",
- "creation_date": "2009-05-04T13:45:37.030"
- },
- "params": {
- "index": "parent_example",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/parent_example/_doc/3",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "join": {
- "name": "answer",
- "parent": "1"
- },
- "owner": {
- "location": "Norfolk, United Kingdom",
- "display_name": "Troll",
- "id": 49
- },
- "body": "Use Linux...",
- "creation_date": "2009-05-05T13:45:37.030"
- },
- "params": {
- "index": "parent_example",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 92
- },
- "digest": "686bc640b877de845c46bef372a9866c",
- "lang": "console",
- "found": [],
- "source": "POST parent_example/_search?size=0\n{\n \"aggs\": {\n \"top-names\": {\n \"terms\": {\n \"field\": \"owner.display_name.keyword\",\n \"size\": 10\n },\n \"aggs\": {\n \"to-questions\": {\n \"parent\": {\n \"type\" : \"answer\" <1>\n },\n \"aggs\": {\n \"top-tags\": {\n \"terms\": {\n \"field\": \"tags.keyword\",\n \"size\": 10\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/parent_example/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "top-names": {
- "terms": {
- "field": "owner.display_name.keyword",
- "size": 10
- },
- "aggs": {
- "to-questions": {
- "parent": {
- "type": "answer"
- },
- "aggs": {
- "top-tags": {
- "terms": {
- "field": "tags.keyword",
- "size": 10
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "parent_example"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/parent-aggregation.asciidoc",
- "line": 129
- },
- "digest": "cc544f17f55e9cce00a7b680e3129e6b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 9,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": []\n },\n \"aggregations\": {\n \"top-names\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"Sam\",\n \"doc_count\": 1, <1>\n \"to-questions\": {\n \"doc_count\": 1, <2>\n \"top-tags\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"file-transfer\",\n \"doc_count\": 1\n },\n {\n \"key\": \"windows-server-2003\",\n \"doc_count\": 1\n },\n {\n \"key\": \"windows-server-2008\",\n \"doc_count\": 1\n }\n ]\n }\n }\n },\n {\n \"key\": \"Troll\",\n \"doc_count\": 1,\n \"to-questions\": {\n \"doc_count\": 1,\n \"top-tags\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"file-transfer\",\n \"doc_count\": 1\n },\n {\n \"key\": \"windows-server-2003\",\n \"doc_count\": 1\n },\n {\n \"key\": \"windows-server-2008\",\n \"doc_count\": 1\n }\n ]\n }\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 10
- },
- "digest": "e84a496049274a0fed24e319da7a864c",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"ranges\" : [\n { \"to\" : 100.0 },\n { \"from\" : 100.0, \"to\" : 200.0 },\n { \"from\" : 200.0 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 200
- },
- {
- "from": 200
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 33
- },
- "digest": "0170a04f76751c506abe44b491039445",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"price_ranges\" : {\n \"buckets\": [\n {\n \"key\": \"*-100.0\",\n \"to\": 100.0,\n \"doc_count\": 2\n },\n {\n \"key\": \"100.0-200.0\",\n \"from\": 100.0,\n \"to\": 200.0,\n \"doc_count\": 2\n },\n {\n \"key\": \"200.0-*\",\n \"from\": 200.0,\n \"doc_count\": 3\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 67
- },
- "digest": "d637c754aec195a1df39cafca49cbe7e",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"keyed\" : true,\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 200 },\n { \"from\" : 200 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "keyed": true,
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 200
- },
- {
- "from": 200
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 91
- },
- "digest": "7c2e63b7e2abf60a0c56c14ed429b76b",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"price_ranges\" : {\n \"buckets\": {\n \"*-100.0\": {\n \"to\": 100.0,\n \"doc_count\": 2\n },\n \"100.0-200.0\": {\n \"from\": 100.0,\n \"to\": 200.0,\n \"doc_count\": 2\n },\n \"200.0-*\": {\n \"from\": 200.0,\n \"doc_count\": 3\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 120
- },
- "digest": "4d147b4a4dabef9b0a8a13cbe8174e09",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"keyed\" : true,\n \"ranges\" : [\n { \"key\" : \"cheap\", \"to\" : 100 },\n { \"key\" : \"average\", \"from\" : 100, \"to\" : 200 },\n { \"key\" : \"expensive\", \"from\" : 200 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "keyed": true,
- "ranges": [
- {
- "key": "cheap",
- "to": 100
- },
- {
- "key": "average",
- "from": 100,
- "to": 200
- },
- {
- "key": "expensive",
- "from": 200
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 144
- },
- "digest": "6ee98bc1060e69be5e539af493e197b1",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"price_ranges\" : {\n \"buckets\": {\n \"cheap\": {\n \"to\": 100.0,\n \"doc_count\": 2\n },\n \"average\": {\n \"from\": 100.0,\n \"to\": 200.0,\n \"doc_count\": 2\n },\n \"expensive\": {\n \"from\": 200.0,\n \"doc_count\": 3\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 178
- },
- "digest": "bdf31f63d0941a4183ceae1cc2342c39",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['price'].value\"\n },\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 200 },\n { \"from\" : 200 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "script": {
- "lang": "painless",
- "source": "doc['price'].value"
- },
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 200
- },
- {
- "from": 200
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 202
- },
- "digest": "4c9c453c92431a05b413bfc0163104b4",
- "lang": "console",
- "found": [],
- "source": "POST /_scripts/convert_currency\n{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc[params.field].value * params.conversion_rate\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/convert_currency",
- "query": null,
- "body": {
- "script": {
- "lang": "painless",
- "source": "doc[params.field].value * params.conversion_rate"
- }
- },
- "params": {
- "id": "convert_currency"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 216
- },
- "digest": "7a6d758654eecbc3a1a76744b4de0a23",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"script\" : {\n \"id\": \"convert_currency\", <1>\n \"params\": { <2>\n \"field\": \"price\",\n \"conversion_rate\": 0.835526591\n }\n },\n \"ranges\" : [\n { \"from\" : 0, \"to\" : 100 },\n { \"from\" : 100 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "script": {
- "id": "convert_currency",
- "params": {
- "field": "price",
- "conversion_rate": 0.835526591
- }
- },
- "ranges": [
- {
- "from": 0,
- "to": 100
- },
- {
- "from": 100
- }
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 275
- },
- "digest": "022956b81fa70e72b56c66be16d0e982",
- "lang": "console",
- "found": [],
- "source": "GET /sales/_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"script\" : {\n \"source\": \"_value * params.conversion_rate\",\n \"params\" : {\n \"conversion_rate\" : 0.8\n }\n },\n \"ranges\" : [\n { \"to\" : 35 },\n { \"from\" : 35, \"to\" : 70 },\n { \"from\" : 70 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "script": {
- "source": "_value * params.conversion_rate",
- "params": {
- "conversion_rate": 0.8
- }
- },
- "ranges": [
- {
- "to": 35
- },
- {
- "from": 35,
- "to": 70
- },
- {
- "from": 70
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 305
- },
- "digest": "3b52f4f7ea4abfa6db6bf54199b15f53",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"price_ranges\" : {\n \"range\" : {\n \"field\" : \"price\",\n \"ranges\" : [\n { \"to\" : 100 },\n { \"from\" : 100, \"to\" : 200 },\n { \"from\" : 200 }\n ]\n },\n \"aggs\" : {\n \"price_stats\" : {\n \"stats\" : { \"field\" : \"price\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "ranges": [
- {
- "to": 100
- },
- {
- "from": 100,
- "to": 200
- },
- {
- "from": 200
- }
- ]
- },
- "aggs": {
- "price_stats": {
- "stats": {
- "field": "price"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-aggregation.asciidoc",
- "line": 333
- },
- "digest": "a1638e5183344dadbe748f97763d360a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"price_ranges\": {\n \"buckets\": [\n {\n \"key\": \"*-100.0\",\n \"to\": 100.0,\n \"doc_count\": 2,\n \"price_stats\": {\n \"count\": 2,\n \"min\": 10.0,\n \"max\": 50.0,\n \"avg\": 30.0,\n \"sum\": 60.0\n }\n },\n {\n \"key\": \"100.0-200.0\",\n \"from\": 100.0,\n \"to\": 200.0,\n \"doc_count\": 2,\n \"price_stats\": {\n \"count\": 2,\n \"min\": 150.0,\n \"max\": 175.0,\n \"avg\": 162.5,\n \"sum\": 325.0\n }\n },\n {\n \"key\": \"200.0-*\",\n \"from\": 200.0,\n \"doc_count\": 3,\n \"price_stats\": {\n \"count\": 3,\n \"min\": 200.0,\n \"max\": 200.0,\n \"avg\": 200.0,\n \"sum\": 600.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 89
- },
- "digest": "91bbb85bc6add315fc9a044d8bcfec8a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 106
- },
- "digest": "26b9f1e42d3224132ae7ee3e92e1218d",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"genres\" : {\n \"buckets\" : [\n {\n \"key\" : \"swing\",\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 127
- },
- "digest": "0fa84243cd275a885298602aa8b4415f",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\",\n \"max_doc_count\": 2\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre",
- "max_doc_count": 2
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 145
- },
- "digest": "cd1105f195e06a0dcf6b984e5b5cb7ef",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"genres\" : {\n \"buckets\" : [\n {\n \"key\" : \"swing\",\n \"doc_count\" : 1\n },\n {\n \"key\" : \"jazz\",\n \"doc_count\" : 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 277
- },
- "digest": "b7207f557d5481db52d5df1aa0dae982",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\",\n \"include\" : \"swi*\",\n \"exclude\" : \"electro*\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre",
- "include": "swi*",
- "exclude": "electro*"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 305
- },
- "digest": "dea7ef16acd6d148a20876630a010522",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\",\n \"include\" : [\"swing\", \"rock\"],\n \"exclude\" : [\"jazz\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre",
- "include": [
- "swing",
- "rock"
- ],
- "exclude": [
- "jazz"
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/rare-terms-aggregation.asciidoc",
- "line": 328
- },
- "digest": "2eea6157a9fbc54a8987e5c1a4f14bbe",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"rare_terms\" : {\n \"field\" : \"genre\",\n \"missing\": \"N/A\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "rare_terms": {
- "field": "genre",
- "missing": "N/A"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/reverse-nested-aggregation.asciidoc",
- "line": 19
- },
- "digest": "817891bd13da04e5981a797247601145",
- "lang": "console",
- "found": [],
- "source": "PUT /issues\n{\n \"mappings\": {\n \"properties\" : {\n \"tags\" : { \"type\" : \"keyword\" },\n \"comments\" : { <1>\n \"type\" : \"nested\",\n \"properties\" : {\n \"username\" : { \"type\" : \"keyword\" },\n \"comment\" : { \"type\" : \"text\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/issues",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "tags": {
- "type": "keyword"
- },
- "comments": {
- "type": "nested",
- "properties": {
- "username": {
- "type": "keyword"
- },
- "comment": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "issues"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/reverse-nested-aggregation.asciidoc",
- "line": 54
- },
- "digest": "aee26dd62fbb6d614a0798f3344c0598",
- "lang": "console",
- "found": [],
- "source": "GET /issues/_search\n{\n \"query\": {\n \"match_all\": {}\n },\n \"aggs\": {\n \"comments\": {\n \"nested\": {\n \"path\": \"comments\"\n },\n \"aggs\": {\n \"top_usernames\": {\n \"terms\": {\n \"field\": \"comments.username\"\n },\n \"aggs\": {\n \"comment_to_issue\": {\n \"reverse_nested\": {}, <1>\n \"aggs\": {\n \"top_tags_per_comment\": {\n \"terms\": {\n \"field\": \"tags\"\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/issues/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "aggs": {
- "comments": {
- "nested": {
- "path": "comments"
- },
- "aggs": {
- "top_usernames": {
- "terms": {
- "field": "comments.username"
- },
- "aggs": {
- "comment_to_issue": {
- "reverse_nested": {},
- "aggs": {
- "top_tags_per_comment": {
- "terms": {
- "field": "tags"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "issues"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/reverse-nested-aggregation.asciidoc",
- "line": 102
- },
- "digest": "0a6d93e9cde7a4b1968057176a824c33",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"aggregations\": {\n \"comments\": {\n \"doc_count\": 1,\n \"top_usernames\": {\n \"doc_count_error_upper_bound\" : 0,\n \"sum_other_doc_count\" : 0,\n \"buckets\": [\n {\n \"key\": \"username_1\",\n \"doc_count\": 1,\n \"comment_to_issue\": {\n \"doc_count\": 1,\n \"top_tags_per_comment\": {\n \"doc_count_error_upper_bound\" : 0,\n \"sum_other_doc_count\" : 0,\n \"buckets\": [\n {\n \"key\": \"tag_1\",\n \"doc_count\": 1\n }\n ...\n ]\n }\n }\n }\n ...\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/sampler-aggregation.asciidoc",
- "line": 19
- },
- "digest": "28035a0e2a874f1b6739badf82a0ecc6",
- "lang": "console",
- "found": [],
- "source": "POST /stackoverflow/_search?size=0\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"tags:kibana OR tags:javascript\"\n }\n },\n \"aggs\": {\n \"sample\": {\n \"sampler\": {\n \"shard_size\": 200\n },\n \"aggs\": {\n \"keywords\": {\n \"significant_terms\": {\n \"field\": \"tags\",\n \"exclude\": [\"kibana\", \"javascript\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/stackoverflow/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "tags:kibana OR tags:javascript"
- }
- },
- "aggs": {
- "sample": {
- "sampler": {
- "shard_size": 200
- },
- "aggs": {
- "keywords": {
- "significant_terms": {
- "field": "tags",
- "exclude": [
- "kibana",
- "javascript"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "stackoverflow"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/sampler-aggregation.asciidoc",
- "line": 49
- },
- "digest": "5e98c5f7432fff06316e0401f9333b5a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"sample\": {\n \"doc_count\": 200,<1>\n \"keywords\": {\n \"doc_count\": 200,\n \"bg_count\": 650,\n \"buckets\": [\n {\n \"key\": \"elasticsearch\",\n \"doc_count\": 150,\n \"score\": 1.078125,\n \"bg_count\": 200\n },\n {\n \"key\": \"logstash\",\n \"doc_count\": 50,\n \"score\": 0.5625,\n \"bg_count\": 50\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/sampler-aggregation.asciidoc",
- "line": 88
- },
- "digest": "279f7af39b62c7d278f9f10b1f107dc0",
- "lang": "console",
- "found": [],
- "source": "POST /stackoverflow/_search?size=0\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"tags:kibana OR tags:javascript\"\n }\n },\n \"aggs\": {\n \"low_quality_keywords\": {\n \"significant_terms\": {\n \"field\": \"tags\",\n \"size\": 3,\n \"exclude\":[\"kibana\", \"javascript\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/stackoverflow/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "tags:kibana OR tags:javascript"
- }
- },
- "aggs": {
- "low_quality_keywords": {
- "significant_terms": {
- "field": "tags",
- "size": 3,
- "exclude": [
- "kibana",
- "javascript"
- ]
- }
- }
- }
- },
- "params": {
- "index": "stackoverflow"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/sampler-aggregation.asciidoc",
- "line": 112
- },
- "digest": "56a1852f2115cf1d0127aca4505f316f",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"low_quality_keywords\": {\n \"doc_count\": 600,\n \"bg_count\": 650,\n \"buckets\": [\n {\n \"key\": \"angular\",\n \"doc_count\": 200,\n \"score\": 0.02777,\n \"bg_count\": 200\n },\n {\n \"key\": \"jquery\",\n \"doc_count\": 200,\n \"score\": 0.02777,\n \"bg_count\": 200\n },\n {\n \"key\": \"logstash\",\n \"doc_count\": 50,\n \"score\": 0.0069,\n \"bg_count\": 50\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 67
- },
- "digest": "290b845e59368e8aa8d1a56d7379afd0",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"terms\" : {\"force\" : [ \"British Transport Police\" ]}\n },\n \"aggregations\" : {\n \"significant_crime_types\" : {\n \"significant_terms\" : { \"field\" : \"crime_type\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "force": [
- "British Transport Police"
- ]
- }
- },
- "aggregations": {
- "significant_crime_types": {
- "significant_terms": {
- "field": "crime_type"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 85
- },
- "digest": "f6bdfca1c491ca5933b00981738cf54f",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"significant_crime_types\" : {\n \"doc_count\": 47347,\n \"bg_count\": 5064554,\n \"buckets\" : [\n {\n \"key\": \"Bicycle theft\",\n \"doc_count\": 3640,\n \"score\": 0.371235374214817,\n \"bg_count\": 66799\n }\n ...\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 127
- },
- "digest": "b2af9784f8530a363ac6e9f95b39677d",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggregations\": {\n \"forces\": {\n \"terms\": {\"field\": \"force\"},\n \"aggregations\": {\n \"significant_crime_types\": {\n \"significant_terms\": {\"field\": \"crime_type\"}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggregations": {
- "forces": {
- "terms": {
- "field": "force"
- },
- "aggregations": {
- "significant_crime_types": {
- "significant_terms": {
- "field": "crime_type"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 147
- },
- "digest": "e084e62bff969d42d542681f4b2dc5ee",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"forces\": {\n \"doc_count_error_upper_bound\": 1375,\n \"sum_other_doc_count\": 7879845,\n \"buckets\": [\n {\n \"key\": \"Metropolitan Police Service\",\n \"doc_count\": 894038,\n \"significant_crime_types\": {\n \"doc_count\": 894038,\n \"bg_count\": 5064554,\n \"buckets\": [\n {\n \"key\": \"Robbery\",\n \"doc_count\": 27617,\n \"score\": 0.0599,\n \"bg_count\": 53182\n }\n ...\n ]\n }\n },\n {\n \"key\": \"British Transport Police\",\n \"doc_count\": 47347,\n \"significant_crime_types\": {\n \"doc_count\": 47347,\n \"bg_count\": 5064554,\n \"buckets\": [\n {\n \"key\": \"Bicycle theft\",\n \"doc_count\": 3640,\n \"score\": 0.371,\n \"bg_count\": 66799\n }\n ...\n ]\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 204
- },
- "digest": "0868d8ac2fb5351e633184f897ee6866",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\": {\n \"hotspots\": {\n \"geohash_grid\": {\n \"field\": \"location\",\n \"precision\": 5\n },\n \"aggs\": {\n \"significant_crime_types\": {\n \"significant_terms\": {\"field\": \"crime_type\"}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "hotspots": {
- "geohash_grid": {
- "field": "location",
- "precision": 5
- },
- "aggs": {
- "significant_crime_types": {
- "significant_terms": {
- "field": "crime_type"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 464
- },
- "digest": "09d4a753140ee5a9ab9f4fc09047b588",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"significant_terms\" : {\n \"field\" : \"tag\",\n \"min_doc_count\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "significant_terms": {
- "field": "tag",
- "min_doc_count": 10
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 507
- },
- "digest": "3fdaac87eb741a79f747633b5065323a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\" : {\n \"city\" : \"madrid\"\n }\n },\n \"aggs\" : {\n \"tags\" : {\n \"significant_terms\" : {\n \"field\" : \"tag\",\n \"background_filter\": {\n \t\"term\" : { \"text\" : \"spain\"}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "city": "madrid"
- }
- },
- "aggs": {
- "tags": {
- "significant_terms": {
- "field": "tag",
- "background_filter": {
- "term": {
- "text": "spain"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significantterms-aggregation.asciidoc",
- "line": 565
- },
- "digest": "11a21cd0b9d31da7eda77c9384a29208",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"significant_terms\" : {\n \"field\" : \"tags\",\n \"execution_hint\": \"map\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "significant_terms": {
- "field": "tags",
- "execution_hint": "map"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 36
- },
- "digest": "68f0c7c77b65bfdded348bbd397831b7",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\" : {\n \"match\" : {\"content\" : \"Bird flu\"}\n },\n \"aggregations\" : {\n \"my_sample\" : {\n \"sampler\" : {\n \"shard_size\" : 100\n },\n \"aggregations\": {\n \"keywords\" : {\n \"significant_text\" : { \"field\" : \"content\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "content": "Bird flu"
- }
- },
- "aggregations": {
- "my_sample": {
- "sampler": {
- "shard_size": 100
- },
- "aggregations": {
- "keywords": {
- "significant_text": {
- "field": "content"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 62
- },
- "digest": "adabe4ea803f7bed66405f1783047825",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 9,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\" : {\n \"my_sample\": {\n \"doc_count\": 100,\n \"keywords\" : {\n \"doc_count\": 100,\n \"buckets\" : [\n {\n \"key\": \"h5n1\",\n \"doc_count\": 4,\n \"score\": 4.71235374214817,\n \"bg_count\": 5\n }\n ...\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 150
- },
- "digest": "d44ecc69090c0b2bc08a6cbc2e3467c5",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\": {\n \"simple_query_string\": {\n \"query\": \"+elasticsearch +pozmantier\"\n }\n },\n \"_source\": [\n \"title\",\n \"source\"\n ],\n \"highlight\": {\n \"fields\": {\n \"content\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "query": "+elasticsearch +pozmantier"
- }
- },
- "_source": [
- "title",
- "source"
- ],
- "highlight": {
- "fields": {
- "content": {}
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 218
- },
- "digest": "805f5550b90e75aa5cc82b90d8c6c242",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\": {\n \"match\": {\n \"content\": \"elasticsearch\"\n }\n },\n \"aggs\": {\n \"sample\": {\n \"sampler\": {\n \"shard_size\": 100\n },\n \"aggs\": {\n \"keywords\": {\n \"significant_text\": {\n \"field\": \"content\",\n \"filter_duplicate_text\": true\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "content": "elasticsearch"
- }
- },
- "aggs": {
- "sample": {
- "sampler": {
- "shard_size": 100
- },
- "aggs": {
- "keywords": {
- "significant_text": {
- "field": "content",
- "filter_duplicate_text": true
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 420
- },
- "digest": "5f4cab20671ebac9233812f9e35d9c8b",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\" : {\n \"match\" : {\n \"content\" : \"madrid\"\n }\n },\n \"aggs\" : {\n \"tags\" : {\n \"significant_text\" : {\n \"field\" : \"content\",\n \"background_filter\": {\n \"term\" : { \"content\" : \"spain\"}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "content": "madrid"
- }
- },
- "aggs": {
- "tags": {
- "significant_text": {
- "field": "content",
- "background_filter": {
- "term": {
- "content": "spain"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/significanttext-aggregation.asciidoc",
- "line": 458
- },
- "digest": "b3e6d6f7f6d65d1efb60ca7503a20b16",
- "lang": "console",
- "found": [],
- "source": "GET news/_search\n{\n \"query\" : {\n \"match\" : {\n \"custom_all\" : \"elasticsearch\"\n }\n },\n \"aggs\" : {\n \"tags\" : {\n \"significant_text\" : {\n \"field\" : \"custom_all\",\n \"source_fields\": [\"content\" , \"title\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/news/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "custom_all": "elasticsearch"
- }
- },
- "aggs": {
- "tags": {
- "significant_text": {
- "field": "custom_all",
- "source_fields": [
- "content",
- "title"
- ]
- }
- }
- }
- },
- "params": {
- "index": "news"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 57
- },
- "digest": "9a8995fd31351045d99c78e40444c8ea",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : { \"field\" : \"genre\" } <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 75
- },
- "digest": "4fb044223736e8694e364d3ccf4ffdc7",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"genres\" : {\n \"doc_count_error_upper_bound\": 0, <1>\n \"sum_other_doc_count\": 0, <2>\n \"buckets\" : [ <3>\n {\n \"key\" : \"electronic\",\n \"doc_count\" : 6\n },\n {\n \"key\" : \"rock\",\n \"doc_count\" : 3\n },\n {\n \"key\" : \"jazz\",\n \"doc_count\" : 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 162
- },
- "digest": "35e8da9410b8432cf4095f2541ad7b1d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"products\" : {\n \"terms\" : {\n \"field\" : \"product\",\n \"size\" : 5,\n \"show_term_doc_count_error\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "products": {
- "terms": {
- "field": "product",
- "size": 5,
- "show_term_doc_count_error": true
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 207
- },
- "digest": "6a4679531e64c492fce16dc12de6dcb0",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"order\" : { \"_count\" : \"asc\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "order": {
- "_count": "asc"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 224
- },
- "digest": "93f1bdd72e79827dcf9a34efa02fd977",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"order\" : { \"_key\" : \"asc\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "order": {
- "_key": "asc"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 243
- },
- "digest": "71b5b2ba9557d0f296ff2de91727d2f6",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"order\" : { \"max_play_count\" : \"desc\" }\n },\n \"aggs\" : {\n \"max_play_count\" : { \"max\" : { \"field\" : \"play_count\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "order": {
- "max_play_count": "desc"
- }
- },
- "aggs": {
- "max_play_count": {
- "max": {
- "field": "play_count"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 263
- },
- "digest": "34efeade38445b2834749ced59782e25",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"order\" : { \"playback_stats.max\" : \"desc\" }\n },\n \"aggs\" : {\n \"playback_stats\" : { \"stats\" : { \"field\" : \"play_count\" } }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "order": {
- "playback_stats.max": "desc"
- }
- },
- "aggs": {
- "playback_stats": {
- "stats": {
- "field": "play_count"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 309
- },
- "digest": "dc15e2373e5ecbe09b4ea0858eb63d47",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"countries\" : {\n \"terms\" : {\n \"field\" : \"artist.country\",\n \"order\" : { \"rock>playback_stats.avg\" : \"desc\" }\n },\n \"aggs\" : {\n \"rock\" : {\n \"filter\" : { \"term\" : { \"genre\" : \"rock\" }},\n \"aggs\" : {\n \"playback_stats\" : { \"stats\" : { \"field\" : \"play_count\" }}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "countries": {
- "terms": {
- "field": "artist.country",
- "order": {
- "rock>playback_stats.avg": "desc"
- }
- },
- "aggs": {
- "rock": {
- "filter": {
- "term": {
- "genre": "rock"
- }
- },
- "aggs": {
- "playback_stats": {
- "stats": {
- "field": "play_count"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 336
- },
- "digest": "028f6d6ac2594e20b78b8a8f8cbad49d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"countries\" : {\n \"terms\" : {\n \"field\" : \"artist.country\",\n \"order\" : [ { \"rock>playback_stats.avg\" : \"desc\" }, { \"_count\" : \"desc\" } ]\n },\n \"aggs\" : {\n \"rock\" : {\n \"filter\" : { \"term\" : { \"genre\" : \"rock\" }},\n \"aggs\" : {\n \"playback_stats\" : { \"stats\" : { \"field\" : \"play_count\" }}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "countries": {
- "terms": {
- "field": "artist.country",
- "order": [
- {
- "rock>playback_stats.avg": "desc"
- },
- {
- "_count": "desc"
- }
- ]
- },
- "aggs": {
- "rock": {
- "filter": {
- "term": {
- "genre": "rock"
- }
- },
- "aggs": {
- "playback_stats": {
- "stats": {
- "field": "play_count"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 369
- },
- "digest": "527324766814561b75aaee853ede49a7",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"terms\" : {\n \"field\" : \"tags\",\n \"min_doc_count\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "terms": {
- "field": "tags",
- "min_doc_count": 10
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 410
- },
- "digest": "033778305d52746f5ce0a2a922c8e521",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"script\" : {\n \"source\": \"doc['genre'].value\",\n \"lang\": \"painless\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "script": {
- "source": "doc['genre'].value",
- "lang": "painless"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 444
- },
- "digest": "4646764bf09911fee7d58630c72d3137",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"script\" : {\n \"id\": \"my_script\",\n \"params\": {\n \"field\": \"genre\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "script": {
- "id": "my_script",
- "params": {
- "field": "genre"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 466
- },
- "digest": "a49169b4622918992411fab4ec48191b",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"genres\" : {\n \"terms\" : {\n \"field\" : \"genre\",\n \"script\" : {\n \"source\" : \"'Genre: ' +_value\",\n \"lang\" : \"painless\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "genres": {
- "terms": {
- "field": "genre",
- "script": {
- "source": "'Genre: ' +_value",
- "lang": "painless"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 492
- },
- "digest": "0afaf1cad692e6201aa574c8feb6e622",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"terms\" : {\n \"field\" : \"tags\",\n \"include\" : \".*sport.*\",\n \"exclude\" : \"water_.*\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "terms": {
- "field": "tags",
- "include": ".*sport.*",
- "exclude": "water_.*"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 520
- },
- "digest": "98b121bf47cebd85671a2cb519688d28",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"JapaneseCars\" : {\n \"terms\" : {\n \"field\" : \"make\",\n \"include\" : [\"mazda\", \"honda\"]\n }\n },\n \"ActiveCarManufacturers\" : {\n \"terms\" : {\n \"field\" : \"make\",\n \"exclude\" : [\"rover\", \"jensen\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "JapaneseCars": {
- "terms": {
- "field": "make",
- "include": [
- "mazda",
- "honda"
- ]
- }
- },
- "ActiveCarManufacturers": {
- "terms": {
- "field": "make",
- "exclude": [
- "rover",
- "jensen"
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 549
- },
- "digest": "5d9d7b84e2fec7ecd832145cbb951cf1",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"expired_sessions\": {\n \"terms\": {\n \"field\": \"account_id\",\n \"include\": {\n \"partition\": 0,\n \"num_partitions\": 20\n },\n \"size\": 10000,\n \"order\": {\n \"last_access\": \"asc\"\n }\n },\n \"aggs\": {\n \"last_access\": {\n \"max\": {\n \"field\": \"access_date\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "expired_sessions": {
- "terms": {
- "field": "account_id",
- "include": {
- "partition": 0,
- "num_partitions": 20
- },
- "size": 10000,
- "order": {
- "last_access": "asc"
- }
- },
- "aggs": {
- "last_access": {
- "max": {
- "field": "access_date"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 641
- },
- "digest": "7f28f8ae8fcdbd807dadde0b5b007a6d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"actors\" : {\n \"terms\" : {\n \"field\" : \"actors\",\n \"size\" : 10\n },\n \"aggs\" : {\n \"costars\" : {\n \"terms\" : {\n \"field\" : \"actors\",\n \"size\" : 5\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "actors": {
- "terms": {
- "field": "actors",
- "size": 10
- },
- "aggs": {
- "costars": {
- "terms": {
- "field": "actors",
- "size": 5
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 672
- },
- "digest": "cd5bc5bf7cd58d7b1492c9c298b345f6",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"actors\" : {\n \"terms\" : {\n \"field\" : \"actors\",\n \"size\" : 10,\n \"collect_mode\" : \"breadth_first\" <1>\n },\n \"aggs\" : {\n \"costars\" : {\n \"terms\" : {\n \"field\" : \"actors\",\n \"size\" : 5\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "actors": {
- "terms": {
- "field": "actors",
- "size": 10,
- "collect_mode": "breadth_first"
- },
- "aggs": {
- "costars": {
- "terms": {
- "field": "actors",
- "size": 5
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 723
- },
- "digest": "774d715155cd13713e6e327adf6ce328",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"terms\" : {\n \"field\" : \"tags\",\n \"execution_hint\": \"map\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "terms": {
- "field": "tags",
- "execution_hint": "map"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/terms-aggregation.asciidoc",
- "line": 748
- },
- "digest": "f085fb032dae56a3b104ab874eaea2ad",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"aggs\" : {\n \"tags\" : {\n \"terms\" : {\n \"field\" : \"tags\",\n \"missing\": \"N/A\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "tags": {
- "terms": {
- "field": "tags",
- "missing": "N/A"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/variablewidthhistogram-aggregation.asciidoc",
- "line": 17
- },
- "digest": "2203f0435921c054416c67a617cd53e7",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search?size=0\n{\n \"aggs\" : {\n \"prices\" : {\n \"variable_width_histogram\" : {\n \"field\" : \"price\",\n \"buckets\" : 2\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "prices": {
- "variable_width_histogram": {
- "field": "price",
- "buckets": 2
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/variablewidthhistogram-aggregation.asciidoc",
- "line": 35
- },
- "digest": "8798d7fad689bea783acad01f3e044b8",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"prices\" : {\n \"buckets\": [\n {\n \"min\": 10.0,\n \"key\": 30.0,\n \"max\": 50.0,\n \"doc_count\": 2\n },\n {\n \"min\": 150.0,\n \"key\": 185.0,\n \"max\": 200.0,\n \"doc_count\": 5\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 12
- },
- "digest": "dbcd8892dd01c43d5a60c94173574faf",
- "lang": "console",
- "found": [],
- "source": "PUT range_index\n{\n \"settings\": {\n \"number_of_shards\": 2\n },\n \"mappings\": {\n \"properties\": {\n \"expected_attendees\": {\n \"type\": \"integer_range\"\n },\n \"time_frame\": {\n \"type\": \"date_range\",\n \"format\": \"yyyy-MM-dd||epoch_millis\"\n }\n }\n }\n}\n\nPUT range_index/_doc/1?refresh\n{\n \"expected_attendees\" : {\n \"gte\" : 10,\n \"lte\" : 20\n },\n \"time_frame\" : {\n \"gte\" : \"2019-10-28\",\n \"lte\" : \"2019-11-04\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/range_index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 2
- },
- "mappings": {
- "properties": {
- "expected_attendees": {
- "type": "integer_range"
- },
- "time_frame": {
- "type": "date_range",
- "format": "yyyy-MM-dd||epoch_millis"
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/range_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "expected_attendees": {
- "gte": 10,
- "lte": 20
- },
- "time_frame": {
- "gte": "2019-10-28",
- "lte": "2019-11-04"
- }
- },
- "params": {
- "index": "range_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 49
- },
- "digest": "cf1872035b9acf6a214310badae345f7",
- "lang": "console",
- "found": [],
- "source": "POST /range_index/_search?size=0\n{\n \"aggs\" : {\n \"range_histo\" : {\n \"histogram\" : {\n \"field\" : \"expected_attendees\",\n \"interval\" : 5\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/range_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "aggs": {
- "range_histo": {
- "histogram": {
- "field": "expected_attendees",
- "interval": 5
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 67
- },
- "digest": "44f937e080bb7db49a571fea57f594cf",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"range_histo\" : {\n \"buckets\" : [\n {\n \"key\" : 10.0,\n \"doc_count\" : 1\n },\n {\n \"key\" : 15.0,\n \"doc_count\" : 1\n },\n {\n \"key\" : 20.0,\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 105
- },
- "digest": "620ffff06483f13e5143dfddaa8b7b30",
- "lang": "console",
- "found": [],
- "source": "POST /range_index/_search?size=0\n{\n \"query\": {\n \"range\": {\n \"time_frame\": {\n \"gte\": \"2019-11-01\",\n \"format\": \"yyyy-MM-dd\"\n }\n }\n },\n \"aggs\" : {\n \"november_data\" : {\n \"date_histogram\" : {\n \"field\" : \"time_frame\",\n \"calendar_interval\" : \"day\",\n \"format\": \"yyyy-MM-dd\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/range_index/_search",
- "query": {
- "size": "0"
- },
- "body": {
- "query": {
- "range": {
- "time_frame": {
- "gte": "2019-11-01",
- "format": "yyyy-MM-dd"
- }
- }
- },
- "aggs": {
- "november_data": {
- "date_histogram": {
- "field": "time_frame",
- "calendar_interval": "day",
- "format": "yyyy-MM-dd"
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/bucket/range-field-note.asciidoc",
- "line": 133
- },
- "digest": "e41428c2d6096287a7e8f356a18488cc",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\" : {\n \"november_data\" : {\n \"buckets\" : [\n {\n \"key_as_string\" : \"2019-10-28\",\n \"key\" : 1572220800000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-10-29\",\n \"key\" : 1572307200000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-10-30\",\n \"key\" : 1572393600000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-10-31\",\n \"key\" : 1572480000000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-11-01\",\n \"key\" : 1572566400000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-11-02\",\n \"key\" : 1572652800000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-11-03\",\n \"key\" : 1572739200000,\n \"doc_count\" : 1\n },\n {\n \"key_as_string\" : \"2019-11-04\",\n \"key\" : 1572825600000,\n \"doc_count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 54
- },
- "digest": "ec20b1c236955a545476eeeea747d9de",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"timestamp\",\n \"calendar_interval\":\"day\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"lemmings\" } <1>\n },\n \"the_deriv\":{\n \"derivative\":{ \"buckets_path\": \"the_sum\" } <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "lemmings"
- }
- },
- "the_deriv": {
- "derivative": {
- "buckets_path": "the_sum"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 84
- },
- "digest": "11be7655fdafcf4c1454a0e9ad8ddf63",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"max_monthly_sales\": {\n \"max_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "max_monthly_sales": {
- "max_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 119
- },
- "digest": "88a6b6f721b91f0919127a34ee2fbe0e",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sale_type\": {\n \"terms\": {\n \"field\": \"type\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"hat_vs_bag_ratio\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"hats\": \"sale_type['hat']>sales\", <1>\n \"bags\": \"sale_type['bag']>sales\" <1>\n },\n \"script\": \"params.hats / params.bags\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sale_type": {
- "terms": {
- "field": "type"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "hat_vs_bag_ratio": {
- "bucket_script": {
- "buckets_path": {
- "hats": "sale_type['hat']>sales",
- "bags": "sale_type['bag']>sales"
- },
- "script": "params.hats / params.bags"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 168
- },
- "digest": "f3dd309ab027e86048b476b54f0d4ca1",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"aggs\": {\n \"my_date_histo\": {\n \"date_histogram\": {\n \"field\":\"timestamp\",\n \"calendar_interval\":\"day\"\n },\n \"aggs\": {\n \"the_deriv\": {\n \"derivative\": { \"buckets_path\": \"_count\" } <1>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "the_deriv": {
- "derivative": {
- "buckets_path": "_count"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline.asciidoc",
- "line": 194
- },
- "digest": "2afc1231679898bd864d06679d9e951b",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"histo\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"day\"\n },\n \"aggs\": {\n \"categories\": {\n \"terms\": {\n \"field\": \"category\"\n }\n },\n \"min_bucket_selector\": {\n \"bucket_selector\": {\n \"buckets_path\": {\n \"count\": \"categories._bucket_count\" <1>\n },\n \"script\": {\n \"source\": \"params.count != 0\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "day"
- },
- "aggs": {
- "categories": {
- "terms": {
- "field": "category"
- }
- },
- "min_bucket_selector": {
- "bucket_selector": {
- "buckets_path": {
- "count": "categories._bucket_count"
- },
- "script": {
- "source": "params.count != 0"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-script-aggregation.asciidoc",
- "line": 45
- },
- "digest": "c2d90e1c88ff5b1857ed4a5b169c9689",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"total_sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"t-shirts\": {\n \"filter\": {\n \"term\": {\n \"type\": \"t-shirt\"\n }\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"t-shirt-percentage\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"tShirtSales\": \"t-shirts>sales\",\n \"totalSales\": \"total_sales\"\n },\n \"script\": \"params.tShirtSales / params.totalSales * 100\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "total_sales": {
- "sum": {
- "field": "price"
- }
- },
- "t-shirts": {
- "filter": {
- "term": {
- "type": "t-shirt"
- }
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "t-shirt-percentage": {
- "bucket_script": {
- "buckets_path": {
- "tShirtSales": "t-shirts>sales",
- "totalSales": "total_sales"
- },
- "script": "params.tShirtSales / params.totalSales * 100"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-script-aggregation.asciidoc",
- "line": 94
- },
- "digest": "327c42605491ee053c73152d9de513f9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"total_sales\": {\n \"value\": 550.0\n },\n \"t-shirts\": {\n \"doc_count\": 1,\n \"sales\": {\n \"value\": 200.0\n }\n },\n \"t-shirt-percentage\": {\n \"value\": 36.36363636363637\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 60.0\n },\n \"t-shirts\": {\n \"doc_count\": 1,\n \"sales\": {\n \"value\": 10.0\n }\n },\n \"t-shirt-percentage\": {\n \"value\": 16.666666666666664\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 375.0\n },\n \"t-shirts\": {\n \"doc_count\": 1,\n \"sales\": {\n \"value\": 175.0\n }\n },\n \"t-shirt-percentage\": {\n \"value\": 46.666666666666664\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-selector-aggregation.asciidoc",
- "line": 48
- },
- "digest": "7851d52ed462f0a1bdfd4f676e4a4363",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"total_sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_bucket_filter\": {\n \"bucket_selector\": {\n \"buckets_path\": {\n \"totalSales\": \"total_sales\"\n },\n \"script\": \"params.totalSales > 200\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "total_sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_bucket_filter": {
- "bucket_selector": {
- "buckets_path": {
- "totalSales": "total_sales"
- },
- "script": "params.totalSales > 200"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-selector-aggregation.asciidoc",
- "line": 82
- },
- "digest": "3b86c66c8dfd53deb341999ab24f4040",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"total_sales\": {\n \"value\": 550.0\n }\n },<1>\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 375.0\n },\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-sort-aggregation.asciidoc",
- "line": 51
- },
- "digest": "7881659b181997486731d92712fbdca9",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"total_sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_bucket_sort\": {\n \"bucket_sort\": {\n \"sort\": [\n {\"total_sales\": {\"order\": \"desc\"}}<1>\n ],\n \"size\": 3<2>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "total_sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_bucket_sort": {
- "bucket_sort": {
- "sort": [
- {
- "total_sales": {
- "order": "desc"
- }
- }
- ],
- "size": 3
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-sort-aggregation.asciidoc",
- "line": 88
- },
- "digest": "cd97449455a4e17f5356f2c8796e1361",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 82,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"total_sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 375.0\n },\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"total_sales\": {\n \"value\": 60.0\n },\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-sort-aggregation.asciidoc",
- "line": 139
- },
- "digest": "541c4f4fb5959cf88423196e51c7e0ef",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"bucket_truncate\": {\n \"bucket_sort\": {\n \"from\": 1,\n \"size\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "bucket_truncate": {
- "bucket_sort": {
- "from": 1,
- "size": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/bucket-sort-aggregation.asciidoc",
- "line": 166
- },
- "digest": "787cc8a92d371323d88b89eb331bc96b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/avg-bucket-aggregation.asciidoc",
- "line": 37
- },
- "digest": "b3e8697874ed65ed6cb62f2568bcc55e",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"sales_per_month\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"avg_monthly_sales\": {\n \"avg_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "avg_monthly_sales": {
- "avg_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/avg-bucket-aggregation.asciidoc",
- "line": 72
- },
- "digest": "8877745bbaa0907a8437b856217264e3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"avg_monthly_sales\": {\n \"value\": 328.33333333333333\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/max-bucket-aggregation.asciidoc",
- "line": 37
- },
- "digest": "ce5d556d90d0fb077ab078e055005f3a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"max_monthly_sales\": {\n \"max_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "max_monthly_sales": {
- "max_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/max-bucket-aggregation.asciidoc",
- "line": 71
- },
- "digest": "e0765c7c1155bc3da07dd84aa7a5033f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"max_monthly_sales\": {\n \"keys\": [\"2015/01/01 00:00:00\"], <1>\n \"value\": 550.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/min-bucket-aggregation.asciidoc",
- "line": 37
- },
- "digest": "e668549ff72fd0b9568667d1a817fc6e",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"min_monthly_sales\": {\n \"min_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "min_monthly_sales": {
- "min_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/min-bucket-aggregation.asciidoc",
- "line": 71
- },
- "digest": "9128fb8c19494741f8eb9906450586e5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"min_monthly_sales\": {\n \"keys\": [\"2015/02/01 00:00:00\"], <1>\n \"value\": 60.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/sum-bucket-aggregation.asciidoc",
- "line": 36
- },
- "digest": "612a9f6a05186fc89ed1a75139d3a8b7",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"sum_monthly_sales\": {\n \"sum_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "sum_monthly_sales": {
- "sum_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/sum-bucket-aggregation.asciidoc",
- "line": 70
- },
- "digest": "7da035d02f2d2267dd7b5de974555459",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"sum_monthly_sales\": {\n \"value\": 985.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc",
- "line": 42
- },
- "digest": "4d8d2c66e4f3ccd760bfe3008c5a4b65",
- "lang": "console",
- "found": [],
- "source": "GET /user_hits/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"users_per_day\" : {\n \"date_histogram\" : {\n \"field\" : \"timestamp\",\n \"calendar_interval\" : \"day\"\n },\n \"aggs\": {\n \"distinct_users\": {\n \"cardinality\": {\n \"field\": \"user_id\"\n }\n },\n \"total_new_users\": {\n \"cumulative_cardinality\": {\n \"buckets_path\": \"distinct_users\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/user_hits/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "users_per_day": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "distinct_users": {
- "cardinality": {
- "field": "user_id"
- }
- },
- "total_new_users": {
- "cumulative_cardinality": {
- "buckets_path": "distinct_users"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "user_hits"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc",
- "line": 75
- },
- "digest": "bedf4afad2a9787d01085d6869c44751",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"users_per_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2019-01-01T00:00:00.000Z\",\n \"key\": 1546300800000,\n \"doc_count\": 2,\n \"distinct_users\": {\n \"value\": 2\n },\n \"total_new_users\": {\n \"value\": 2\n }\n },\n {\n \"key_as_string\": \"2019-01-02T00:00:00.000Z\",\n \"key\": 1546387200000,\n \"doc_count\": 2,\n \"distinct_users\": {\n \"value\": 2\n },\n \"total_new_users\": {\n \"value\": 3\n }\n },\n {\n \"key_as_string\": \"2019-01-03T00:00:00.000Z\",\n \"key\": 1546473600000,\n \"doc_count\": 3,\n \"distinct_users\": {\n \"value\": 3\n },\n \"total_new_users\": {\n \"value\": 4\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc",
- "line": 141
- },
- "digest": "dd5d84526ecb6a33e96ff2c047b8066d",
- "lang": "console",
- "found": [],
- "source": "GET /user_hits/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"users_per_day\" : {\n \"date_histogram\" : {\n \"field\" : \"timestamp\",\n \"calendar_interval\" : \"day\"\n },\n \"aggs\": {\n \"distinct_users\": {\n \"cardinality\": {\n \"field\": \"user_id\"\n }\n },\n \"total_new_users\": {\n \"cumulative_cardinality\": {\n \"buckets_path\": \"distinct_users\"\n }\n },\n \"incremental_new_users\": {\n \"derivative\": {\n \"buckets_path\": \"total_new_users\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/user_hits/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "users_per_day": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "distinct_users": {
- "cardinality": {
- "field": "user_id"
- }
- },
- "total_new_users": {
- "cumulative_cardinality": {
- "buckets_path": "distinct_users"
- }
- },
- "incremental_new_users": {
- "derivative": {
- "buckets_path": "total_new_users"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "user_hits"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc",
- "line": 178
- },
- "digest": "de7cfdf9934fbb000486b00a8d40fa63",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"users_per_day\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2019-01-01T00:00:00.000Z\",\n \"key\": 1546300800000,\n \"doc_count\": 2,\n \"distinct_users\": {\n \"value\": 2\n },\n \"total_new_users\": {\n \"value\": 2\n }\n },\n {\n \"key_as_string\": \"2019-01-02T00:00:00.000Z\",\n \"key\": 1546387200000,\n \"doc_count\": 2,\n \"distinct_users\": {\n \"value\": 2\n },\n \"total_new_users\": {\n \"value\": 3\n },\n \"incremental_new_users\": {\n \"value\": 1.0\n }\n },\n {\n \"key_as_string\": \"2019-01-03T00:00:00.000Z\",\n \"key\": 1546473600000,\n \"doc_count\": 3,\n \"distinct_users\": {\n \"value\": 3\n },\n \"total_new_users\": {\n \"value\": 4\n },\n \"incremental_new_users\": {\n \"value\": 1.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-sum-aggregation.asciidoc",
- "line": 35
- },
- "digest": "1ae73d3fcc39bef9ddc654bb82d5d239",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"cumulative_sales\": {\n \"cumulative_sum\": {\n \"buckets_path\": \"sales\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- },
- "cumulative_sales": {
- "cumulative_sum": {
- "buckets_path": "sales"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/cumulative-sum-aggregation.asciidoc",
- "line": 68
- },
- "digest": "0a9f95fcb384ff3833e3866fd72ed1e4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n },\n \"cumulative_sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n },\n \"cumulative_sales\": {\n \"value\": 610.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n },\n \"cumulative_sales\": {\n \"value\": 985.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 38
- },
- "digest": "469bc2e7b9e65b3b1e38a547f63bd2f9",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_deriv\": {\n \"derivative\": {\n \"buckets_path\": \"sales\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_deriv": {
- "derivative": {
- "buckets_path": "sales"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 71
- },
- "digest": "4bfd88c9b9dc88bce96bc8a16c198542",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n } <1>\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n },\n \"sales_deriv\": {\n \"value\": -490.0 <2>\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2, <3>\n \"sales\": {\n \"value\": 375.0\n },\n \"sales_deriv\": {\n \"value\": 315.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 131
- },
- "digest": "d683ed8c4a72f82200bbad0c3921e427",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_deriv\": {\n \"derivative\": {\n \"buckets_path\": \"sales\"\n }\n },\n \"sales_2nd_deriv\": {\n \"derivative\": {\n \"buckets_path\": \"sales_deriv\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_deriv": {
- "derivative": {
- "buckets_path": "sales"
- }
- },
- "sales_2nd_deriv": {
- "derivative": {
- "buckets_path": "sales_deriv"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 169
- },
- "digest": "99e2d1cad66f9e34d7069748cc24fbe3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 50,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n } <1>\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n },\n \"sales_deriv\": {\n \"value\": -490.0\n } <1>\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n },\n \"sales_deriv\": {\n \"value\": 315.0\n },\n \"sales_2nd_deriv\": {\n \"value\": 805.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 230
- },
- "digest": "8553b0c396e9de7d841fcc6373e017e2",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"sales_deriv\": {\n \"derivative\": {\n \"buckets_path\": \"sales\",\n \"unit\": \"day\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- },
- "sales_deriv": {
- "derivative": {
- "buckets_path": "sales",
- "unit": "day"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/derivative-aggregation.asciidoc",
- "line": 263
- },
- "digest": "929c90aa5f2a6e9102d28a8ec3cfba05",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 50,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n } <1>\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n },\n \"sales_deriv\": {\n \"value\": -490.0, <1>\n \"normalized_value\": -15.806451612903226 <2>\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n },\n \"sales_deriv\": {\n \"value\": 315.0,\n \"normalized_value\": 11.25\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/percentiles-bucket-aggregation.asciidoc",
- "line": 38
- },
- "digest": "cff65c0f9fbc53c26c60abe9fb7e4044",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"percentiles_monthly_sales\": {\n \"percentiles_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\", <1>\n \"percents\": [ 25.0, 50.0, 75.0 ] <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "percentiles_monthly_sales": {
- "percentiles_bucket": {
- "buckets_path": "sales_per_month>sales",
- "percents": [
- 25,
- 50,
- 75
- ]
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/percentiles-bucket-aggregation.asciidoc",
- "line": 74
- },
- "digest": "8a255d25302b6ec629381efb6dc3de4b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"percentiles_monthly_sales\": {\n \"values\" : {\n \"25.0\": 375.0,\n \"50.0\": 375.0,\n \"75.0\": 550.0\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 42
- },
- "digest": "5903a75a28cec4b60c54662457c6d405",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{ <1>\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" } <2>\n },\n \"the_movfn\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\", <3>\n \"window\": 10,\n \"script\": \"MovingFunctions.unweightedAvg(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movfn": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.unweightedAvg(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 82
- },
- "digest": "195ee5116e8fcff0a70fb82bbcc42b58",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"my_date_histo\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"the_sum\": {\n \"value\": 550.0\n },\n \"the_movfn\": {\n \"value\": null\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"the_sum\": {\n \"value\": 60.0\n },\n \"the_movfn\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"the_sum\": {\n \"value\": 375.0\n },\n \"the_movfn\": {\n \"value\": 305.0\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 143
- },
- "digest": "93c9711ee6c0554cd775c013c3837f13",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"return values.length > 0 ? values[0] : Double.NaN\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "return values.length > 0 ? values[0] : Double.NaN"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 213
- },
- "digest": "13fd394e3e9a3398cac21ac1064fc154",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_moving_max\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.max(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_moving_max": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.max(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 255
- },
- "digest": "c8bebf3c45fc9e75e161bf4e516a957a",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_moving_min\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.min(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_moving_min": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.min(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 297
- },
- "digest": "d0897840a5702b4ec0616e6c90acfe1e",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_moving_sum\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.sum(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_moving_sum": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.sum(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 341
- },
- "digest": "46c4d95fc06cd0eb0401caa1e0bdc8f0",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_moving_sum\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.stdDev(values, MovingFunctions.unweightedAvg(values))\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_moving_sum": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.stdDev(values, MovingFunctions.unweightedAvg(values))"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 392
- },
- "digest": "beea9d59a7cbe53d5d4c4ec2a49487b2",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.unweightedAvg(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.unweightedAvg(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 437
- },
- "digest": "bbbbe980b6dcd2a77ff16cc8a081e472",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.linearWeightedAvg(values)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.linearWeightedAvg(values)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 488
- },
- "digest": "d84ea140bbe8abfb156a72c1c963ea00",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.ewma(values, 0.3)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.ewma(values, 0.3)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 545
- },
- "digest": "76fc9f5a879772ffcc4ec0c99bf74277",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"MovingFunctions.holt(values, 0.3, 0.1)\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "MovingFunctions.holt(values, 0.3, 0.1)"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/movfn-aggregation.asciidoc",
- "line": 610
- },
- "digest": "af25b173c8bcc73a3bfbfddacb218478",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_sum\":{\n \"sum\":{ \"field\": \"price\" }\n },\n \"the_movavg\": {\n \"moving_fn\": {\n \"buckets_path\": \"the_sum\",\n \"window\": 10,\n \"script\": \"if (values.length > 5*2) {MovingFunctions.holtWinters(values, 0.3, 0.1, 0.1, 5, false)}\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "price"
- }
- },
- "the_movavg": {
- "moving_fn": {
- "buckets_path": "the_sum",
- "window": 10,
- "script": "if (values.length > 5*2) {MovingFunctions.holtWinters(values, 0.3, 0.1, 0.1, 5, false)}"
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/moving-percentiles-aggregation.asciidoc",
- "line": 41
- },
- "digest": "b3ccf004ec109e930aebebd653364f74",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\":{ <1>\n \"date_histogram\":{\n \"field\":\"date\",\n \"calendar_interval\":\"1M\"\n },\n \"aggs\":{\n \"the_percentile\":{ <2>\n \"percentiles\":{\n \"field\": \"price\",\n \"percents\": [ 1.0, 99.0 ]\n }\n },\n \"the_movperc\": {\n \"moving_percentiles\": {\n \"buckets_path\": \"the_percentile\", <3>\n \"window\": 10\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1M"
- },
- "aggs": {
- "the_percentile": {
- "percentiles": {
- "field": "price",
- "percents": [
- 1,
- 99
- ]
- }
- },
- "the_movperc": {
- "moving_percentiles": {
- "buckets_path": "the_percentile",
- "window": 10
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/moving-percentiles-aggregation.asciidoc",
- "line": 83
- },
- "digest": "8f0857cc216394eae9d8640515fdd043",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"my_date_histo\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"the_percentile\": {\n \"values\": {\n \"1.0\": 150.0,\n \"99.0\": 200.0\n }\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"the_percentile\": {\n \"values\": {\n \"1.0\": 10.0,\n \"99.0\": 50.0\n }\n },\n \"the_movperc\": {\n \"values\": {\n \"1.0\": 150.0,\n \"99.0\": 200.0\n }\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"the_percentile\": {\n \"values\": {\n \"1.0\": 175.0,\n \"99.0\": 200.0\n }\n },\n \"the_movperc\": {\n \"values\": {\n \"1.0\": 10.0,\n \"99.0\": 200.0\n }\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/normalize-aggregation.asciidoc",
- "line": 91
- },
- "digest": "8ea49742567a22f1cb57f895b3880e6a",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n },\n \"percent_of_total_sales\": {\n \"normalize\": {\n \"buckets_path\": \"sales\", <1>\n \"method\": \"percent_of_sum\", <2>\n \"format\": \"00.00%\" <3>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- },
- "percent_of_total_sales": {
- "normalize": {
- "buckets_path": "sales",
- "method": "percent_of_sum",
- "format": "00.00%"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/normalize-aggregation.asciidoc",
- "line": 130
- },
- "digest": "e71d90c66e83dd36141fd4c363303064",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n },\n \"percent_of_total_sales\": {\n \"value\": 0.5583756345177665,\n \"value_as_string\": \"55.84%\"\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n },\n \"percent_of_total_sales\": {\n \"value\": 0.06091370558375635,\n \"value_as_string\": \"06.09%\"\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n },\n \"percent_of_total_sales\": {\n \"value\": 0.38071065989847713,\n \"value_as_string\": \"38.07%\"\n }\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/serial-diff-aggregation.asciidoc",
- "line": 64
- },
- "digest": "b4da132cb934c33d61e2b60988c6d4a3",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"size\": 0,\n \"aggs\": {\n \"my_date_histo\": { <1>\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"calendar_interval\": \"day\"\n },\n \"aggs\": {\n \"the_sum\": {\n \"sum\": {\n \"field\": \"lemmings\" <2>\n }\n },\n \"thirtieth_difference\": {\n \"serial_diff\": { <3>\n \"buckets_path\": \"the_sum\",\n \"lag\" : 30\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "my_date_histo": {
- "date_histogram": {
- "field": "timestamp",
- "calendar_interval": "day"
- },
- "aggs": {
- "the_sum": {
- "sum": {
- "field": "lemmings"
- }
- },
- "thirtieth_difference": {
- "serial_diff": {
- "buckets_path": "the_sum",
- "lag": 30
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/stats-bucket-aggregation.asciidoc",
- "line": 36
- },
- "digest": "8a187c87964774530ef99f8962d83da5",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"stats_monthly_sales\": {\n \"stats_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "stats_monthly_sales": {
- "stats_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/stats-bucket-aggregation.asciidoc",
- "line": 70
- },
- "digest": "8a40309b0e17445519ad62f962926e24",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"stats_monthly_sales\": {\n \"count\": 3,\n \"min\": 60.0,\n \"max\": 550.0,\n \"avg\": 328.3333333333333,\n \"sum\": 985.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/extended-stats-bucket-aggregation.asciidoc",
- "line": 39
- },
- "digest": "b8f960415d10545f583d2eac94e07629",
- "lang": "console",
- "found": [],
- "source": "POST /sales/_search\n{\n \"size\": 0,\n \"aggs\" : {\n \"sales_per_month\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\" : \"month\"\n },\n \"aggs\": {\n \"sales\": {\n \"sum\": {\n \"field\": \"price\"\n }\n }\n }\n },\n \"stats_monthly_sales\": {\n \"extended_stats_bucket\": {\n \"buckets_path\": \"sales_per_month>sales\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "sales_per_month": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "month"
- },
- "aggs": {
- "sales": {
- "sum": {
- "field": "price"
- }
- }
- }
- },
- "stats_monthly_sales": {
- "extended_stats_bucket": {
- "buckets_path": "sales_per_month>sales"
- }
- }
- }
- },
- "params": {
- "index": "sales"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/pipeline/extended-stats-bucket-aggregation.asciidoc",
- "line": 73
- },
- "digest": "c41cb2ebb176a11861f4ef1a428dc4be",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 11,\n \"timed_out\": false,\n \"_shards\": ...,\n \"hits\": ...,\n \"aggregations\": {\n \"sales_per_month\": {\n \"buckets\": [\n {\n \"key_as_string\": \"2015/01/01 00:00:00\",\n \"key\": 1420070400000,\n \"doc_count\": 3,\n \"sales\": {\n \"value\": 550.0\n }\n },\n {\n \"key_as_string\": \"2015/02/01 00:00:00\",\n \"key\": 1422748800000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 60.0\n }\n },\n {\n \"key_as_string\": \"2015/03/01 00:00:00\",\n \"key\": 1425168000000,\n \"doc_count\": 2,\n \"sales\": {\n \"value\": 375.0\n }\n }\n ]\n },\n \"stats_monthly_sales\": {\n \"count\": 3,\n \"min\": 60.0,\n \"max\": 550.0,\n \"avg\": 328.3333333333333,\n \"sum\": 985.0,\n \"sum_of_squares\": 446725.0,\n \"variance\": 41105.55555555556,\n \"variance_population\": 41105.55555555556,\n \"variance_sampling\": 61658.33333333334,\n \"std_deviation\": 202.74505063146563,\n \"std_deviation_population\": 202.74505063146563,\n \"std_deviation_sampling\": 248.3109609609156,\n \"std_deviation_bounds\": {\n \"upper\": 733.8234345962646,\n \"lower\": -77.15676792959795,\n \"upper_population\" : 733.8234345962646,\n \"lower_population\" : -77.15676792959795,\n \"upper_sampling\" : 824.9552552551645,\n \"lower_sampling\" : -168.28858858849787\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/matrix/stats-aggregation.asciidoc",
- "line": 39
- },
- "digest": "8ab89e635fcbc485d1728c13dfeeb1ae",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\": {\n \"statistics\": {\n \"matrix_stats\": {\n \"fields\": [\"poverty\", \"income\"]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "statistics": {
- "matrix_stats": {
- "fields": [
- "poverty",
- "income"
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/matrix/stats-aggregation.asciidoc",
- "line": 57
- },
- "digest": "2ded5f25c691e6722f8e02aa57e4a889",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"aggregations\": {\n \"statistics\": {\n \"doc_count\": 50,\n \"fields\": [{\n \"name\": \"income\",\n \"count\": 50,\n \"mean\": 51985.1,\n \"variance\": 7.383377037755103E7,\n \"skewness\": 0.5595114003506483,\n \"kurtosis\": 2.5692365287787124,\n \"covariance\": {\n \"income\": 7.383377037755103E7,\n \"poverty\": -21093.65836734694\n },\n \"correlation\": {\n \"income\": 1.0,\n \"poverty\": -0.8352655256272504\n }\n }, {\n \"name\": \"poverty\",\n \"count\": 50,\n \"mean\": 12.732000000000001,\n \"variance\": 8.637730612244896,\n \"skewness\": 0.4516049811903419,\n \"kurtosis\": 2.8615929677997767,\n \"covariance\": {\n \"income\": -21093.65836734694,\n \"poverty\": 8.637730612244896\n },\n \"correlation\": {\n \"income\": -0.8352655256272504,\n \"poverty\": 1.0\n }\n }]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "aggregations/matrix/stats-aggregation.asciidoc",
- "line": 122
- },
- "digest": "7ee2877f8f031b9a4e56a40b371421fb",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"aggs\": {\n \"matrixstats\": {\n \"matrix_stats\": {\n \"fields\": [\"poverty\", \"income\"],\n \"missing\": {\"income\" : 50000} <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "aggs": {
- "matrixstats": {
- "matrix_stats": {
- "fields": [
- "poverty",
- "income"
- ],
- "missing": {
- "income": 50000
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 19
- },
- "digest": "0827fcf75228b6d0206a1ffe6bf7d263",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"my_agg\": {\n \"terms\": {\n \"field\": \"text\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "my_agg": {
- "terms": {
- "field": "text"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 45
- },
- "digest": "2d39331333f64fcc31fa298ac59b161f",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"titles\": {\n \"terms\": {\n \"field\": \"title\"\n },\n \"meta\": {\n \"color\": \"blue\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "titles": {
- "terms": {
- "field": "title"
- },
- "meta": {
- "color": "blue"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 66
- },
- "digest": "0e349e31fe27f0af20c2b3604b5ecd6e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"aggregations\": {\n \"titles\": {\n \"meta\": {\n \"color\" : \"blue\"\n },\n \"doc_count_error_upper_bound\" : 0,\n \"sum_other_doc_count\" : 0,\n \"buckets\": [\n ]\n }\n },\n ...\n}"
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 96
- },
- "digest": "ea447f43ebd5f72c65de699904474d0d",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search?typed_keys\n{\n \"aggregations\": {\n \"tweets_over_time\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"year\"\n },\n \"aggregations\": {\n \"top_users\": {\n \"top_hits\": {\n \"size\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "typed_keys": true
- },
- "body": {
- "aggregations": {
- "tweets_over_time": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "year"
- },
- "aggregations": {
- "top_users": {
- "top_hits": {
- "size": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "aggregations/misc.asciidoc",
- "line": 122
- },
- "digest": "609a1426592d38b830f5a2fbf7b24641",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"aggregations\": {\n \"date_histogram#tweets_over_time\": { <1>\n \"buckets\" : [\n {\n \"key_as_string\" : \"2009-01-01T00:00:00.000Z\",\n \"key\" : 1230768000000,\n \"doc_count\" : 5,\n \"top_hits#top_users\" : { <2>\n \"hits\" : {\n \"total\" : {\n \"value\": 5,\n \"relation\": \"eq\"\n },\n \"max_score\" : 1.0,\n \"hits\" : [\n {\n \"_index\": \"twitter\",\n \"_id\": \"0\",\n \"_score\": 1.0,\n \"_source\": {\n \"date\": \"2009-11-15T14:12:12\",\n \"message\": \"trying out Elasticsearch\",\n \"user\": \"kimchy\",\n \"likes\": 0\n }\n }\n ]\n }\n }\n }\n ]\n }\n },\n ...\n}"
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 24
- },
- "digest": "e62cf588bfc891504bbf933af86eed7c",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"my_field\": 5\n}\n\nGET my_index/_search\n{\n \"script_fields\": {\n \"my_doubled_field\": {\n \"script\": {\n \"lang\": \"expression\",\n \"source\": \"doc['my_field'] * multiplier\",\n \"params\": {\n \"multiplier\": 2\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_field": 5
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "script_fields": {
- "my_doubled_field": {
- "script": {
- "lang": "expression",
- "source": "doc['my_field'] * multiplier",
- "params": {
- "multiplier": 2
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 157
- },
- "digest": "40a2bbc35a887d6c7dda3cca1fe7aa58",
- "lang": "console",
- "found": [],
- "source": "POST _scripts/calculate-score\n{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params.my_modifier\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/calculate-score",
- "query": null,
- "body": {
- "script": {
- "lang": "painless",
- "source": "Math.log(_score * 2) + params.my_modifier"
- }
- },
- "params": {
- "id": "calculate-score"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 173
- },
- "digest": "548a09b4630ae38cf8af33581ae614e6",
- "lang": "console",
- "found": [],
- "source": "POST _scripts/calculate-score/score\n{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params.my_modifier\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/calculate-score/score",
- "query": null,
- "body": {
- "script": {
- "lang": "painless",
- "source": "Math.log(_score * 2) + params.my_modifier"
- }
- },
- "params": {
- "id": "calculate-score",
- "context": "score"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 187
- },
- "digest": "08e08feb514b24006e13f258d617d873",
- "lang": "console",
- "found": [],
- "source": "GET _scripts/calculate-score",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_scripts/calculate-score",
- "query": null,
- "body": null,
- "params": {
- "id": "calculate-score"
- },
- "api": "get_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 195
- },
- "digest": "b3423b00c6336ee0a1720b4ed7031cd7",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"query\": {\n \"script_score\": {\n \"query\": {\n \"match\": {\n \"message\": \"some message\"\n }\n },\n \"script\": {\n \"id\": \"calculate-score\",\n \"params\": {\n \"my_modifier\": 2\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "match": {
- "message": "some message"
- }
- },
- "script": {
- "id": "calculate-score",
- "params": {
- "my_modifier": 2
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/using.asciidoc",
- "line": 220
- },
- "digest": "4061fd5ba7221ca85805ed14d59a6bc5",
- "lang": "console",
- "found": [],
- "source": "DELETE _scripts/calculate-score",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_scripts/calculate-score",
- "query": null,
- "body": null,
- "params": {
- "id": "calculate-score"
- },
- "api": "delete_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/fields.asciidoc",
- "line": 48
- },
- "digest": "729f4abc0b4edaf6b58bd9e7b3fd5a8b",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"text\": \"quick brown fox\",\n \"popularity\": 1\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"text\": \"quick fox\",\n \"popularity\": 5\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": {\n \"match\": {\n \"text\": \"quick brown fox\"\n }\n },\n \"script_score\": {\n \"script\": {\n \"lang\": \"expression\",\n \"source\": \"_score * doc['popularity']\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "quick brown fox",
- "popularity": 1
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "quick fox",
- "popularity": 5
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match": {
- "text": "quick brown fox"
- }
- },
- "script_score": {
- "script": {
- "lang": "expression",
- "source": "_score * doc['popularity']"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/fields.asciidoc",
- "line": 92
- },
- "digest": "0dfe9d6724c7bd11094bb4a0796e7ac7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"cost_price\": 100\n}\n\nGET my_index/_search\n{\n \"script_fields\": {\n \"sales_price\": {\n \"script\": {\n \"lang\": \"expression\",\n \"source\": \"doc['cost_price'] * markup\",\n \"params\": {\n \"markup\": 0.2\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "cost_price": 100
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "script_fields": {
- "sales_price": {
- "script": {
- "lang": "expression",
- "source": "doc['cost_price'] * markup",
- "params": {
- "markup": 0.2
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/fields.asciidoc",
- "line": 169
- },
- "digest": "9790a85b52fa851c8abe20d00ba03bc1",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"first_name\": {\n \"type\": \"text\"\n },\n \"last_name\": {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1?refresh\n{\n \"first_name\": \"Barry\",\n \"last_name\": \"White\"\n}\n\nGET my_index/_search\n{\n \"script_fields\": {\n \"full_name\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"params._source.first_name + ' ' + params._source.last_name\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "first_name": {
- "type": "text"
- },
- "last_name": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "first_name": "Barry",
- "last_name": "White"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "script_fields": {
- "full_name": {
- "script": {
- "lang": "painless",
- "source": "params._source.first_name + ' ' + params._source.last_name"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/fields.asciidoc",
- "line": 212
- },
- "digest": "2548b8591b3e0d7ac95cafebac63a2a9",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"full_name\": {\n \"type\": \"text\",\n \"store\": true\n },\n \"title\": {\n \"type\": \"text\",\n \"store\": true\n }\n }\n }\n}\n\nPUT my_index/_doc/1?refresh\n{\n \"full_name\": \"Alice Ball\",\n \"title\": \"Professor\"\n}\n\nGET my_index/_search\n{\n \"script_fields\": {\n \"name_with_title\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"params._fields['title'].value + ' ' + params._fields['full_name'].value\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "full_name": {
- "type": "text",
- "store": true
- },
- "title": {
- "type": "text",
- "store": true
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "full_name": "Alice Ball",
- "title": "Professor"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "script_fields": {
- "name_with_title": {
- "script": {
- "lang": "painless",
- "source": "params._fields['title'].value + ' ' + params._fields['full_name'].value"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "scripting/engine.asciidoc",
- "line": 28
- },
- "digest": "d9de409a4a197ce7cbe3714e07155d34",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"query\": {\n \"function_score\": {\n \"query\": {\n \"match\": {\n \"body\": \"foo\"\n }\n },\n \"functions\": [\n {\n \"script_score\": {\n \"script\": {\n \"source\": \"pure_df\",\n \"lang\" : \"expert_scripts\",\n \"params\": {\n \"field\": \"body\",\n \"term\": \"foo\"\n }\n }\n }\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "function_score": {
- "query": {
- "match": {
- "body": "foo"
- }
- },
- "functions": [
- {
- "script_score": {
- "script": {
- "source": "pure_df",
- "lang": "expert_scripts",
- "params": {
- "field": "body",
- "term": "foo"
- }
- }
- }
- }
- ]
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 147
- },
- "digest": "d8b2a88b5eca99d3691ad3cd40266736",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my-index\n{\n \"mappings\": {\n \"properties\": {\n \"age\": { \"type\": \"integer\" }, <1>\n \"email\": { \"type\": \"keyword\" }, <2>\n \"name\": { \"type\": \"text\" } <3>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "age": {
- "type": "integer"
- },
- "email": {
- "type": "keyword"
- },
- "name": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 176
- },
- "digest": "71ba9033107882f61cdc3b32fc73568d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my-index/_mapping\n{\n \"properties\": {\n \"employee-id\": {\n \"type\": \"keyword\",\n \"index\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "employee-id": {
- "type": "keyword",
- "index": false
- }
- }
- },
- "params": {
- "index": "my-index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 217
- },
- "digest": "609260ad1d5998be2ca09ff1fe237efa",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /my-index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my-index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 225
- },
- "digest": "df61238ba28b6aaf41edf247b01aa893",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my-index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"age\" : {\n \"type\" : \"integer\"\n },\n \"email\" : {\n \"type\" : \"keyword\"\n },\n \"employee-id\" : {\n \"type\" : \"keyword\",\n \"index\" : false\n },\n \"name\" : {\n \"type\" : \"text\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 263
- },
- "digest": "99a52be903945b17e734a1d02a57e958",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /my-index/_mapping/field/employee-id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my-index/_mapping/field/employee-id",
- "query": null,
- "body": null,
- "params": {
- "index": "my-index",
- "fields": "employee-id"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping.asciidoc",
- "line": 271
- },
- "digest": "47a0f4c64e6debd190796fc38e58c9c0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my-index\" : {\n \"mappings\" : {\n \"employee-id\" : {\n \"full_name\" : \"employee-id\",\n \"mapping\" : {\n \"employee-id\" : {\n \"type\" : \"keyword\",\n \"index\" : false\n }\n }\n }\n }\n }\n}\n"
- },
- {
- "source_location": {
- "file": "mapping/types/alias.asciidoc",
- "line": 12
- },
- "digest": "2716453454dbf9c6dde2ea6850a62214",
- "lang": "console",
- "found": [],
- "source": "PUT trips\n{\n \"mappings\": {\n \"properties\": {\n \"distance\": {\n \"type\": \"long\"\n },\n \"route_length_miles\": {\n \"type\": \"alias\",\n \"path\": \"distance\" <1>\n },\n \"transit_mode\": {\n \"type\": \"keyword\"\n }\n }\n }\n}\n\nGET _search\n{\n \"query\": {\n \"range\" : {\n \"route_length_miles\" : {\n \"gte\" : 39\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/trips",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "distance": {
- "type": "long"
- },
- "route_length_miles": {
- "type": "alias",
- "path": "distance"
- },
- "transit_mode": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "trips"
- },
- "api": "indices.create"
- },
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "route_length_miles": {
- "gte": 39
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/alias.asciidoc",
- "line": 55
- },
- "digest": "a2dabdcbb661e7690166ae6d0de27e46",
- "lang": "console",
- "found": [],
- "source": "GET trips/_field_caps?fields=route_*,transit_mode",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/trips/_field_caps",
- "query": {
- "fields": "route_*,transit_mode"
- },
- "body": null,
- "params": {
- "index": "trips"
- },
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/alias.asciidoc",
- "line": 86
- },
- "digest": "f6c9d72fa26cbedd0c3f9fa64a88c38a",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match_all\": {}\n },\n \"_source\": \"route_length_miles\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "_source": "route_length_miles"
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/array.asciidoc",
- "line": 42
- },
- "digest": "4d6997c70a1851f9151443c0d38b532e",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index/_doc/1\n{\n \"message\": \"some arrays in this document...\",\n \"tags\": [ \"elasticsearch\", \"wow\" ], <1>\n \"lists\": [ <2>\n {\n \"name\": \"prog_list\",\n \"description\": \"programming list\"\n },\n {\n \"name\": \"cool_list\",\n \"description\": \"cool stuff list\"\n }\n ]\n}\n\nPUT my_index/_doc/2 <3>\n{\n \"message\": \"no arrays in this document...\",\n \"tags\": \"elasticsearch\",\n \"lists\": {\n \"name\": \"prog_list\",\n \"description\": \"programming list\"\n }\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"tags\": \"elasticsearch\" <4>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "message": "some arrays in this document...",
- "tags": [
- "elasticsearch",
- "wow"
- ],
- "lists": [
- {
- "name": "prog_list",
- "description": "programming list"
- },
- {
- "name": "cool_list",
- "description": "cool stuff list"
- }
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "message": "no arrays in this document...",
- "tags": "elasticsearch",
- "lists": {
- "name": "prog_list",
- "description": "programming list"
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "tags": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/binary.asciidoc",
- "line": 12
- },
- "digest": "9296dd085f411739f5b0ec80eb9b9e27",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"name\": {\n \"type\": \"text\"\n },\n \"blob\": {\n \"type\": \"binary\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"name\": \"Some binary blob\",\n \"blob\": \"U29tZSBiaW5hcnkgYmxvYg==\" <1>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "type": "text"
- },
- "blob": {
- "type": "binary"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "name": "Some binary blob",
- "blob": "U29tZSBiaW5hcnkgYmxvYg=="
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/boolean.asciidoc",
- "line": 22
- },
- "digest": "1c1be1df747c9f8ecc9f82e980387d8f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"is_published\": {\n \"type\": \"boolean\"\n }\n }\n }\n}\n\nPOST my_index/_doc/1\n{\n \"is_published\": \"true\" <1>\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"is_published\": true <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "is_published": {
- "type": "boolean"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "is_published": "true"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "is_published": true
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/boolean.asciidoc",
- "line": 58
- },
- "digest": "636ec3c018ac15ec11caf6f3d835a08c",
- "lang": "console",
- "found": [],
- "source": "POST my_index/_doc/1\n{\n \"is_published\": true\n}\n\nPOST my_index/_doc/2\n{\n \"is_published\": false\n}\n\nGET my_index/_search\n{\n \"aggs\": {\n \"publish_state\": {\n \"terms\": {\n \"field\": \"is_published\"\n }\n }\n },\n \"script_fields\": {\n \"is_published\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['is_published'].value\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "is_published": true
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "is_published": false
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "aggs": {
- "publish_state": {
- "terms": {
- "field": "is_published"
- }
- }
- },
- "script_fields": {
- "is_published": {
- "script": {
- "lang": "painless",
- "source": "doc['is_published'].value"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/date.asciidoc",
- "line": 35
- },
- "digest": "645136747d37368a14ab34de8bd046c6",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"date\": \"2015-01-01\" } <2>\n\nPUT my_index/_doc/2\n{ \"date\": \"2015-01-01T12:10:30Z\" } <3>\n\nPUT my_index/_doc/3\n{ \"date\": 1420070400001 } <4>\n\nGET my_index/_search\n{\n \"sort\": { \"date\": \"asc\"} <5>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "date": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "date": "2015-01-01"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "date": "2015-01-01T12:10:30Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": null,
- "body": {
- "date": 1420070400001
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "sort": {
- "date": "asc"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/date.asciidoc",
- "line": 77
- },
- "digest": "e2a042c629429855c3bcaefffb26b7fa",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date\",\n \"format\": \"yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "date": {
- "type": "date",
- "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/date_nanos.asciidoc",
- "line": 34
- },
- "digest": "5e11eb4d328005434b19bbb9b11a3685",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date_nanos\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"date\": \"2015-01-01\" } <2>\n\nPUT my_index/_doc/2\n{ \"date\": \"2015-01-01T12:10:30.123456789Z\" } <3>\n\nPUT my_index/_doc/3\n{ \"date\": 1420070400 } <4>\n\nGET my_index/_search\n{\n \"sort\": { \"date\": \"asc\"} <5>\n}\n\nGET my_index/_search\n{\n \"script_fields\" : {\n \"my_field\" : {\n \"script\" : {\n \"lang\" : \"painless\",\n \"source\" : \"doc['date'].value.nano\" <6>\n }\n }\n }\n}\n\nGET my_index/_search\n{\n \"docvalue_fields\" : [\n {\n \"field\" : \"date\",\n \"format\": \"strict_date_time\" <7>\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "date": {
- "type": "date_nanos"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "date": "2015-01-01"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "date": "2015-01-01T12:10:30.123456789Z"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": null,
- "body": {
- "date": 1420070400
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "sort": {
- "date": "asc"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "script_fields": {
- "my_field": {
- "script": {
- "lang": "painless",
- "source": "doc['date'].value.nano"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "docvalue_fields": [
- {
- "field": "date",
- "format": "strict_date_time"
- }
- ]
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/dense-vector.asciidoc",
- "line": 20
- },
- "digest": "7c7b74084cc9f18b085c25a208bd1306",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_vector\": {\n \"type\": \"dense_vector\",\n \"dims\": 3 <1>\n },\n \"my_text\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"my_text\" : \"text1\",\n \"my_vector\" : [0.5, 10, 6]\n}\n\nPUT my_index/_doc/2\n{\n \"my_text\" : \"text2\",\n \"my_vector\" : [-0.5, 10, 10]\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_vector": {
- "type": "dense_vector",
- "dims": 3
- },
- "my_text": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_text": "text1",
- "my_vector": [
- 0.5,
- 10,
- 6
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "my_text": "text2",
- "my_vector": [
- -0.5,
- 10,
- 10
- ]
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/histogram.asciidoc",
- "line": 77
- },
- "digest": "fc3f5f40fa283559ca615cd0eb0a1755",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\" : {\n \"properties\" : {\n \"my_histogram\" : {\n \"type\" : \"histogram\"\n },\n \"my_text\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_histogram": {
- "type": "histogram"
- },
- "my_text": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/histogram.asciidoc",
- "line": 97
- },
- "digest": "09774dd1a8613672844caadb2bc8dc1e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"my_text\" : \"histogram_1\",\n \"my_histogram\" : {\n \"values\" : [0.1, 0.2, 0.3, 0.4, 0.5], <1>\n \"counts\" : [3, 7, 23, 12, 6] <2>\n }\n}\n\nPUT my_index/_doc/2\n{\n \"my_text\" : \"histogram_2\",\n \"my_histogram\" : {\n \"values\" : [0.1, 0.25, 0.35, 0.4, 0.45, 0.5], <1>\n \"counts\" : [8, 17, 8, 7, 6, 2] <2>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_text": "histogram_1",
- "my_histogram": {
- "values": [
- 0.1,
- 0.2,
- 0.3,
- 0.4,
- 0.5
- ],
- "counts": [
- 3,
- 7,
- 23,
- 12,
- 6
- ]
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "my_text": "histogram_2",
- "my_histogram": {
- "values": [
- 0.1,
- 0.25,
- 0.35,
- 0.4,
- 0.45,
- 0.5
- ],
- "counts": [
- 8,
- 17,
- 8,
- 7,
- 6,
- 2
- ]
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/flattened.asciidoc",
- "line": 38
- },
- "digest": "8aa74aee3dcf4b34028e4c5e1c1ed27b",
- "lang": "console",
- "found": [],
- "source": "PUT bug_reports\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\"\n },\n \"labels\": {\n \"type\": \"flattened\"\n }\n }\n }\n}\n\nPOST bug_reports/_doc/1\n{\n \"title\": \"Results are not sorted correctly.\",\n \"labels\": {\n \"priority\": \"urgent\",\n \"release\": [\"v1.2.5\", \"v1.3.0\"],\n \"timestamp\": {\n \"created\": 1541458026,\n \"closed\": 1541457010\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/bug_reports",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text"
- },
- "labels": {
- "type": "flattened"
- }
- }
- }
- },
- "params": {
- "index": "bug_reports"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/bug_reports/_doc/1",
- "query": null,
- "body": {
- "title": "Results are not sorted correctly.",
- "labels": {
- "priority": "urgent",
- "release": [
- "v1.2.5",
- "v1.3.0"
- ],
- "timestamp": {
- "created": 1541458026,
- "closed": 1541457010
- }
- }
- },
- "params": {
- "index": "bug_reports",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/flattened.asciidoc",
- "line": 76
- },
- "digest": "169b39bb889ecd47541bed3e48725488",
- "lang": "console",
- "found": [],
- "source": "POST bug_reports/_search\n{\n \"query\": {\n \"term\": {\"labels\": \"urgent\"}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/bug_reports/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "labels": "urgent"
- }
- }
- },
- "params": {
- "index": "bug_reports"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/flattened.asciidoc",
- "line": 88
- },
- "digest": "2f4a55dfeba8851b306ef9c1b216ef54",
- "lang": "console",
- "found": [],
- "source": "POST bug_reports/_search\n{\n \"query\": {\n \"term\": {\"labels.release\": \"v1.3.0\"}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/bug_reports/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "labels.release": "v1.3.0"
- }
- }
- },
- "params": {
- "index": "bug_reports"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-point.asciidoc",
- "line": 20
- },
- "digest": "f1b512400f2f7ca0b0f2e4bb45a8b2fe",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Geo-point as an object\",\n \"location\": { <1>\n \"lat\": 41.12,\n \"lon\": -71.34\n }\n}\n\nPUT my_index/_doc/2\n{\n \"text\": \"Geo-point as a string\",\n \"location\": \"41.12,-71.34\" <2>\n}\n\nPUT my_index/_doc/3\n{\n \"text\": \"Geo-point as a geohash\",\n \"location\": \"drm3btev3e86\" <3>\n}\n\nPUT my_index/_doc/4\n{\n \"text\": \"Geo-point as an array\",\n \"location\": [ -71.34, 41.12 ] <4>\n}\n\nPUT my_index/_doc/5\n{\n \"text\": \"Geo-point as a WKT POINT primitive\",\n \"location\" : \"POINT (-71.34 41.12)\" <5>\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"geo_bounding_box\": { <6>\n \"location\": {\n \"top_left\": {\n \"lat\": 42,\n \"lon\": -72\n },\n \"bottom_right\": {\n \"lat\": 40,\n \"lon\": -74\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Geo-point as an object",
- "location": {
- "lat": 41.12,
- "lon": -71.34
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "text": "Geo-point as a string",
- "location": "41.12,-71.34"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": null,
- "body": {
- "text": "Geo-point as a geohash",
- "location": "drm3btev3e86"
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/4",
- "query": null,
- "body": {
- "text": "Geo-point as an array",
- "location": [
- -71.34,
- 41.12
- ]
- },
- "params": {
- "index": "my_index",
- "id": "4"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/5",
- "query": null,
- "body": {
- "text": "Geo-point as a WKT POINT primitive",
- "location": "POINT (-71.34 41.12)"
- },
- "params": {
- "index": "my_index",
- "id": "5"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "geo_bounding_box": {
- "location": {
- "top_left": {
- "lat": 42,
- "lon": -72
- },
- "bottom_right": {
- "lat": 40,
- "lon": -74
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 212
- },
- "digest": "3fef996cf6795e881918ffedc273c642",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 304
- },
- "digest": "f851d1be5d5e5fe5455ba81344d01133",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"point\",\n \"coordinates\" : [-77.03653, 38.897676]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "point",
- "coordinates": [
- -77.03653,
- 38.897676
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 317
- },
- "digest": "d673a2c008015ac6f754661ae336131c",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POINT (-77.03653 38.897676)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POINT (-77.03653 38.897676)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 334
- },
- "digest": "21a9348800406e09b8bdaab192245096",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"linestring\",\n \"coordinates\" : [[-77.03653, 38.897676], [-77.009051, 38.889939]]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "linestring",
- "coordinates": [
- [
- -77.03653,
- 38.897676
- ],
- [
- -77.009051,
- 38.889939
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 347
- },
- "digest": "48625e23b05d33977451cde7b98b634a",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"LINESTRING (-77.03653 38.897676, -77.009051 38.889939)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "LINESTRING (-77.03653 38.897676, -77.009051 38.889939)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 366
- },
- "digest": "1d6ee162260a21f6e4597eadbea88650",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- 100,
- 0
- ],
- [
- 101,
- 0
- ],
- [
- 101,
- 1
- ],
- [
- 100,
- 1
- ],
- [
- 100,
- 0
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 381
- },
- "digest": "18c34a2c5820e330a125dfddf2624c69",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 393
- },
- "digest": "f83e3ea198f6e87046aab2c5dea60d61",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],\n [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- 100,
- 0
- ],
- [
- 101,
- 0
- ],
- [
- 101,
- 1
- ],
- [
- 100,
- 1
- ],
- [
- 100,
- 0
- ]
- ],
- [
- [
- 100.2,
- 0.2
- ],
- [
- 100.8,
- 0.2
- ],
- [
- 100.8,
- 0.8
- ],
- [
- 100.2,
- 0.8
- ],
- [
- 100.2,
- 0.2
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 409
- },
- "digest": "00eb71b03b73e605da6368041a64a8ad",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 436
- },
- "digest": "4c42c8835876a2271e7ba63d6bd3149f",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [-177.0, 10.0], [176.0, 15.0], [172.0, 0.0], [176.0, -15.0], [-177.0, -10.0], [-177.0, 10.0] ],\n [ [178.2, 8.2], [-178.8, 8.2], [-180.8, -8.8], [178.2, 8.8] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- -177,
- 10
- ],
- [
- 176,
- 15
- ],
- [
- 172,
- 0
- ],
- [
- 176,
- -15
- ],
- [
- -177,
- -10
- ],
- [
- -177,
- 10
- ]
- ],
- [
- [
- 178.2,
- 8.2
- ],
- [
- -178.8,
- 8.2
- ],
- [
- -180.8,
- -8.8
- ],
- [
- 178.2,
- 8.8
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 455
- },
- "digest": "60294ea29c96c432047d4fffcb3cc8b4",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"orientation\" : \"clockwise\",\n \"coordinates\" : [\n [ [100.0, 0.0], [100.0, 1.0], [101.0, 1.0], [101.0, 0.0], [100.0, 0.0] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "orientation": "clockwise",
- "coordinates": [
- [
- [
- 100,
- 0
- ],
- [
- 100,
- 1
- ],
- [
- 101,
- 1
- ],
- [
- 101,
- 0
- ],
- [
- 100,
- 0
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 475
- },
- "digest": "2eca42af76c6ddc657fca3948f3865bd",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multipoint\",\n \"coordinates\" : [\n [102.0, 2.0], [103.0, 2.0]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multipoint",
- "coordinates": [
- [
- 102,
- 2
- ],
- [
- 103,
- 2
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 490
- },
- "digest": "f1e1f4f37194a899e7056d0782804790",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTIPOINT (102.0 2.0, 103.0 2.0)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTIPOINT (102.0 2.0, 103.0 2.0)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 504
- },
- "digest": "c4ba19b62e87ed837dc6f1f9fe184244",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multilinestring\",\n \"coordinates\" : [\n [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0] ],\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0] ],\n [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multilinestring",
- "coordinates": [
- [
- [
- 102,
- 2
- ],
- [
- 103,
- 2
- ],
- [
- 103,
- 3
- ],
- [
- 102,
- 3
- ]
- ],
- [
- [
- 100,
- 0
- ],
- [
- 101,
- 0
- ],
- [
- 101,
- 1
- ],
- [
- 100,
- 1
- ]
- ],
- [
- [
- 100.2,
- 0.2
- ],
- [
- 100.8,
- 0.2
- ],
- [
- 100.8,
- 0.8
- ],
- [
- 100.2,
- 0.8
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 521
- },
- "digest": "117096e1830e7acedf38bd6a92a9c8b4",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 535
- },
- "digest": "4be91bb5ac3a1b83b767a060c58e0b12",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multipolygon\",\n \"coordinates\" : [\n [ [[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]] ],\n [ [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],\n [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multipolygon",
- "coordinates": [
- [
- [
- [
- 102,
- 2
- ],
- [
- 103,
- 2
- ],
- [
- 103,
- 3
- ],
- [
- 102,
- 3
- ],
- [
- 102,
- 2
- ]
- ]
- ],
- [
- [
- [
- 100,
- 0
- ],
- [
- 101,
- 0
- ],
- [
- 101,
- 1
- ],
- [
- 100,
- 1
- ],
- [
- 100,
- 0
- ]
- ],
- [
- [
- 100.2,
- 0.2
- ],
- [
- 100.8,
- 0.2
- ],
- [
- 100.8,
- 0.8
- ],
- [
- 100.2,
- 0.8
- ],
- [
- 100.2,
- 0.2
- ]
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 552
- },
- "digest": "9290410340f0e66e67fa96aacc83bbdc",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTIPOLYGON (((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTIPOLYGON (((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 566
- },
- "digest": "a99750fb5d296fa8df97ee71a34c698c",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\": \"geometrycollection\",\n \"geometries\": [\n {\n \"type\": \"point\",\n \"coordinates\": [100.0, 0.0]\n },\n {\n \"type\": \"linestring\",\n \"coordinates\": [ [101.0, 0.0], [102.0, 1.0] ]\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "geometrycollection",
- "geometries": [
- {
- "type": "point",
- "coordinates": [
- 100,
- 0
- ]
- },
- {
- "type": "linestring",
- "coordinates": [
- [
- 101,
- 0
- ],
- [
- 102,
- 1
- ]
- ]
- }
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 588
- },
- "digest": "71bb89f56d847b636a050c553c0cd0a7",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"GEOMETRYCOLLECTION (POINT (100.0 0.0), LINESTRING (101.0 0.0, 102.0 1.0))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "GEOMETRYCOLLECTION (POINT (100.0 0.0), LINESTRING (101.0 0.0, 102.0 1.0))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 604
- },
- "digest": "f893fffd649507119d0a9afd98a0cf87",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"envelope\",\n \"coordinates\" : [ [100.0, 1.0], [101.0, 0.0] ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "envelope",
- "coordinates": [
- [
- 100,
- 1
- ],
- [
- 101,
- 0
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 619
- },
- "digest": "65208190e9640cb4ca67271f1694814d",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"BBOX (100.0, 102.0, 2.0, 0.0)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "BBOX (100.0, 102.0, 2.0, 0.0)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/geo-shape.asciidoc",
- "line": 636
- },
- "digest": "76039c2fd422a6bb6340848cc0a78bbd",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"circle\",\n \"coordinates\" : [101.0, 1.0],\n \"radius\" : \"100m\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "circle",
- "coordinates": [
- 101,
- 1
- ],
- "radius": "100m"
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/ip.asciidoc",
- "line": 11
- },
- "digest": "ef38d941f9d914c095e729046a2e2d95",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"ip_addr\": {\n \"type\": \"ip\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"ip_addr\": \"192.168.1.1\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"ip_addr\": \"192.168.0.0/16\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "ip_addr": {
- "type": "ip"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "ip_addr": "192.168.1.1"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "ip_addr": "192.168.0.0/16"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/ip.asciidoc",
- "line": 77
- },
- "digest": "96d3e3ee5d410507ca6ffb64a7e3d88e",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"ip_addr\": \"192.168.0.0/16\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "ip_addr": "192.168.0.0/16"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/ip.asciidoc",
- "line": 91
- },
- "digest": "f880cf334c8d355edc3abf196d9a8b67",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"ip_addr\": \"2001:db8::/48\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "ip_addr": "2001:db8::/48"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/ip.asciidoc",
- "line": 108
- },
- "digest": "db5fe7de772a7607b8d104cc35a6bc6c",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"query_string\" : {\n \"query\": \"ip_addr:\\\"2001:db8::/48\\\"\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "ip_addr:\"2001:db8::/48\""
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 14
- },
- "digest": "adbb85423739e45e6d072fd6bebb140e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_id\": {\n \"type\": \"keyword\"\n },\n \"my_join_field\": { <1>\n \"type\": \"join\",\n \"relations\": {\n \"question\": \"answer\" <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_id": {
- "type": "keyword"
- },
- "my_join_field": {
- "type": "join",
- "relations": {
- "question": "answer"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 41
- },
- "digest": "ce09baf41be8157b688e19e36b6050c9",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"my_id\": \"1\",\n \"text\": \"This is a question\",\n \"my_join_field\": {\n \"name\": \"question\" <1>\n }\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"my_id\": \"2\",\n \"text\": \"This is another question\",\n \"my_join_field\": {\n \"name\": \"question\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "my_id": "1",
- "text": "This is a question",
- "my_join_field": {
- "name": "question"
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "my_id": "2",
- "text": "This is another question",
- "my_join_field": {
- "name": "question"
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 68
- },
- "digest": "34a90fc67bf423c562cfbc91ca1016cf",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"my_id\": \"1\",\n \"text\": \"This is a question\",\n \"my_join_field\": \"question\" <1>\n}\n\nPUT my_index/_doc/2?refresh\n{\n \"my_id\": \"2\",\n \"text\": \"This is another question\",\n \"my_join_field\": \"question\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "my_id": "1",
- "text": "This is a question",
- "my_join_field": "question"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "my_id": "2",
- "text": "This is another question",
- "my_join_field": "question"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 96
- },
- "digest": "f2b074b37e37cc12abf1b5c795965912",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/3?routing=1&refresh <1>\n{\n \"my_id\": \"3\",\n \"text\": \"This is an answer\",\n \"my_join_field\": {\n \"name\": \"answer\", <2>\n \"parent\": \"1\" <3>\n }\n}\n\nPUT my_index/_doc/4?routing=1&refresh\n{\n \"my_id\": \"4\",\n \"text\": \"This is another answer\",\n \"my_join_field\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "my_id": "3",
- "text": "This is an answer",
- "my_join_field": {
- "name": "answer",
- "parent": "1"
- }
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/4",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "my_id": "4",
- "text": "This is another answer",
- "my_join_field": {
- "name": "answer",
- "parent": "1"
- }
- },
- "params": {
- "index": "my_index",
- "id": "4"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 165
- },
- "digest": "275353b0245fde574d0b11f2aba2836e",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"match_all\": {}\n },\n \"sort\": [\"my_id\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "sort": [
- "my_id"
- ]
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 179
- },
- "digest": "e3d73c2ed2f1f17f401fbe06127a415f",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...,\n \"hits\": {\n \"total\" : {\n \"value\": 4,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": [\n {\n \"_index\": \"my_index\",\n \"_id\": \"1\",\n \"_score\": null,\n \"_source\": {\n \"my_id\": \"1\",\n \"text\": \"This is a question\",\n \"my_join_field\": \"question\" <1>\n },\n \"sort\": [\n \"1\"\n ]\n },\n {\n \"_index\": \"my_index\",\n \"_id\": \"2\",\n \"_score\": null,\n \"_source\": {\n \"my_id\": \"2\",\n \"text\": \"This is another question\",\n \"my_join_field\": \"question\" <2>\n },\n \"sort\": [\n \"2\"\n ]\n },\n {\n \"_index\": \"my_index\",\n \"_id\": \"3\",\n \"_score\": null,\n \"_routing\": \"1\",\n \"_source\": {\n \"my_id\": \"3\",\n \"text\": \"This is an answer\",\n \"my_join_field\": {\n \"name\": \"answer\", <3>\n \"parent\": \"1\" <4>\n }\n },\n \"sort\": [\n \"3\"\n ]\n },\n {\n \"_index\": \"my_index\",\n \"_id\": \"4\",\n \"_score\": null,\n \"_routing\": \"1\",\n \"_source\": {\n \"my_id\": \"4\",\n \"text\": \"This is another answer\",\n \"my_join_field\": {\n \"name\": \"answer\",\n \"parent\": \"1\"\n }\n },\n \"sort\": [\n \"4\"\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 272
- },
- "digest": "26fe7b3c9aeab972725b6d708cc6df22",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"parent_id\": { <1>\n \"type\": \"answer\",\n \"id\": \"1\"\n }\n },\n \"aggs\": {\n \"parents\": {\n \"terms\": {\n \"field\": \"my_join_field#question\", <2>\n \"size\": 10\n }\n }\n },\n \"script_fields\": {\n \"parent\": {\n \"script\": {\n \"source\": \"doc['my_join_field#question']\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "parent_id": {
- "type": "answer",
- "id": "1"
- }
- },
- "aggs": {
- "parents": {
- "terms": {
- "field": "my_join_field#question",
- "size": 10
- }
- }
- },
- "script_fields": {
- "parent": {
- "script": {
- "source": "doc['my_join_field#question']"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 325
- },
- "digest": "e0b414b45460d424ab838b5136492fa1",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_join_field\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": \"answer\"\n },\n \"eager_global_ordinals\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_join_field": {
- "type": "join",
- "relations": {
- "question": "answer"
- },
- "eager_global_ordinals": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 346
- },
- "digest": "2c090fe7ec7b66b3f5c178d71c46323b",
- "lang": "console",
- "found": [],
- "source": "# Per-index\nGET _stats/fielddata?human&fields=my_join_field#question\n\n# Per-node per-index\nGET _nodes/stats/indices/fielddata?human&fields=my_join_field#question",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats/fielddata",
- "query": {
- "human": true,
- "fields": "my_join_field"
- },
- "body": null,
- "params": {
- "metric": "fielddata"
- },
- "api": "indices.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "human": true,
- "fields": "my_join_field"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 360
- },
- "digest": "bc358cfd219faf9353cb65820981a0df",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_join_field\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": [\"answer\", \"comment\"] <1>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_join_field": {
- "type": "join",
- "relations": {
- "question": [
- "answer",
- "comment"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 387
- },
- "digest": "1cc03b9715d9a3f876f7b7bb7fe66394",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_join_field\": {\n \"type\": \"join\",\n \"relations\": {\n \"question\": [\"answer\", \"comment\"], <1>\n \"answer\": \"vote\" <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_join_field": {
- "type": "join",
- "relations": {
- "question": [
- "answer",
- "comment"
- ],
- "answer": "vote"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/parent-join.asciidoc",
- "line": 422
- },
- "digest": "6eecf0fbf95d132beb0f49b3181da419",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/3?routing=1&refresh <1>\n{\n \"text\": \"This is a vote\",\n \"my_join_field\": {\n \"name\": \"vote\",\n \"parent\": \"2\" <2>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/3",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "text": "This is a vote",
- "my_join_field": {
- "name": "vote",
- "parent": "2"
- }
- },
- "params": {
- "index": "my_index",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/keyword.asciidoc",
- "line": 20
- },
- "digest": "46c4b0dfb674825f9579203d41e7f404",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"tags\": {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "tags": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/nested.asciidoc",
- "line": 22
- },
- "digest": "8baccd8688a6bad1749b8935f9601ea4",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index/_doc/1\n{\n \"group\" : \"fans\",\n \"user\" : [ <1>\n {\n \"first\" : \"John\",\n \"last\" : \"Smith\"\n },\n {\n \"first\" : \"Alice\",\n \"last\" : \"White\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "group": "fans",
- "user": [
- {
- "first": "John",
- "last": "Smith"
- },
- {
- "first": "Alice",
- "last": "White"
- }
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/nested.asciidoc",
- "line": 58
- },
- "digest": "b214942b938e47f2c486e523546cb574",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": [\n { \"match\": { \"user.first\": \"Alice\" }},\n { \"match\": { \"user.last\": \"Smith\" }}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "user.first": "Alice"
- }
- },
- {
- "match": {
- "user.last": "Smith"
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/nested.asciidoc",
- "line": 85
- },
- "digest": "b919f88e6f47a40d5793479440a90ba6",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"user\": {\n \"type\": \"nested\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"group\" : \"fans\",\n \"user\" : [\n {\n \"first\" : \"John\",\n \"last\" : \"Smith\"\n },\n {\n \"first\" : \"Alice\",\n \"last\" : \"White\"\n }\n ]\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"user\",\n \"query\": {\n \"bool\": {\n \"must\": [\n { \"match\": { \"user.first\": \"Alice\" }},\n { \"match\": { \"user.last\": \"Smith\" }} <2>\n ]\n }\n }\n }\n }\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"user\",\n \"query\": {\n \"bool\": {\n \"must\": [\n { \"match\": { \"user.first\": \"Alice\" }},\n { \"match\": { \"user.last\": \"White\" }} <3>\n ]\n }\n },\n \"inner_hits\": { <4>\n \"highlight\": {\n \"fields\": {\n \"user.first\": {}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user": {
- "type": "nested"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "group": "fans",
- "user": [
- {
- "first": "John",
- "last": "Smith"
- },
- {
- "first": "Alice",
- "last": "White"
- }
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "user",
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "user.first": "Alice"
- }
- },
- {
- "match": {
- "user.last": "Smith"
- }
- }
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "user",
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "user.first": "Alice"
- }
- },
- {
- "match": {
- "user.last": "White"
- }
- }
- ]
- }
- },
- "inner_hits": {
- "highlight": {
- "fields": {
- "user.first": {}
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/numeric.asciidoc",
- "line": 22
- },
- "digest": "a71c438cc4df1cafe3109ccff475afdb",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"number_of_bytes\": {\n \"type\": \"integer\"\n },\n \"time_in_seconds\": {\n \"type\": \"float\"\n },\n \"price\": {\n \"type\": \"scaled_float\",\n \"scaling_factor\": 100\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "number_of_bytes": {
- "type": "integer"
- },
- "time_in_seconds": {
- "type": "float"
- },
- "price": {
- "type": "scaled_float",
- "scaling_factor": 100
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/object.asciidoc",
- "line": 11
- },
- "digest": "9bb2dc0500011e0774f4bdfebf57a7a0",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{ <1>\n \"region\": \"US\",\n \"manager\": { <2>\n \"age\": 30,\n \"name\": { <3>\n \"first\": \"John\",\n \"last\": \"Smith\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "region": "US",
- "manager": {
- "age": 30,
- "name": {
- "first": "John",
- "last": "Smith"
- }
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/object.asciidoc",
- "line": 46
- },
- "digest": "8e907d7533581efadf7831b05dd9f794",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": { <1>\n \"region\": {\n \"type\": \"keyword\"\n },\n \"manager\": { <2>\n \"properties\": {\n \"age\": { \"type\": \"integer\" },\n \"name\": { <3>\n \"properties\": {\n \"first\": { \"type\": \"text\" },\n \"last\": { \"type\": \"text\" }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "region": {
- "type": "keyword"
- },
- "manager": {
- "properties": {
- "age": {
- "type": "integer"
- },
- "name": {
- "properties": {
- "first": {
- "type": "text"
- },
- "last": {
- "type": "text"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 20
- },
- "digest": "05c14dd0bda732cfa36f7fb88138d98e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"query\": {\n \"type\": \"percolator\"\n },\n \"field\": {\n \"type\": \"text\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "field": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 40
- },
- "digest": "dc1f917924b43416a9ec7f8c9505f885",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/match_value\n{\n \"query\" : {\n \"match\" : {\n \"field\" : \"value\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/match_value",
- "query": null,
- "body": {
- "query": {
- "match": {
- "field": "value"
- }
- }
- },
- "params": {
- "index": "my_index",
- "id": "match_value"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 70
- },
- "digest": "3eb4cdd4a799a117ac1ff5f02b18a512",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"query\" : {\n \"type\" : \"percolator\"\n },\n \"body\" : {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPOST _aliases\n{\n \"actions\": [\n {\n \"add\": {\n \"index\": \"index\",\n \"alias\": \"queries\" <1>\n }\n }\n ]\n}\n\nPUT queries/_doc/1?refresh\n{\n \"query\" : {\n \"match\" : {\n \"body\" : \"quick brown fox\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "body": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "index",
- "alias": "queries"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- },
- {
- "method": "PUT",
- "url": "/queries/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "body": "quick brown fox"
- }
- }
- },
- "params": {
- "index": "queries",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 115
- },
- "digest": "f09817fd13ff3dce52eb79d0722409c3",
- "lang": "console",
- "found": [],
- "source": "PUT new_index\n{\n \"mappings\": {\n \"properties\": {\n \"query\" : {\n \"type\" : \"percolator\"\n },\n \"body\" : {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPOST /_reindex?refresh\n{\n \"source\": {\n \"index\": \"index\"\n },\n \"dest\": {\n \"index\": \"new_index\"\n }\n}\n\nPOST _aliases\n{\n \"actions\": [ <1>\n {\n \"remove\": {\n \"index\" : \"index\",\n \"alias\": \"queries\"\n }\n },\n {\n \"add\": {\n \"index\": \"new_index\",\n \"alias\": \"queries\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/new_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "body": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "new_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/_reindex",
- "query": {
- "refresh": true
- },
- "body": {
- "source": {
- "index": "index"
- },
- "dest": {
- "index": "new_index"
- }
- },
- "params": null,
- "api": "reindex"
- },
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "remove": {
- "index": "index",
- "alias": "queries"
- }
- },
- {
- "add": {
- "index": "new_index",
- "alias": "queries"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 165
- },
- "digest": "60cab62af1540db2ad3b696b0ee1d7a8",
- "lang": "console",
- "found": [],
- "source": "GET /queries/_search\n{\n \"query\": {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"body\" : \"fox jumps over the lazy dog\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/queries/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "body": "fox jumps over the lazy dog"
- }
- }
- }
- },
- "params": {
- "index": "queries"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 183
- },
- "digest": "8bb3c37f6c007d069b7107b6c1e306b2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 3,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.13076457,\n \"hits\": [\n {\n \"_index\": \"new_index\", <1>\n \"_id\": \"1\",\n \"_score\": 0.13076457,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"body\": \"quick brown fox\"\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 262
- },
- "digest": "360c4f373e72ba861584ee85bd218124",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\" : {\n \"tokenizer\": \"standard\",\n \"filter\" : [\"lowercase\", \"porter_stem\"]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"query\" : {\n \"type\": \"percolator\"\n },\n \"body\" : {\n \"type\": \"text\",\n \"analyzer\": \"my_analyzer\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "porter_stem"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "body": {
- "type": "text",
- "analyzer": "my_analyzer"
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 295
- },
- "digest": "3e13c8a81f40a537eddc0b57633b45f8",
- "lang": "console",
- "found": [],
- "source": "POST /test_index/_analyze\n{\n \"analyzer\" : \"my_analyzer\",\n \"text\" : \"missing bicycles\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "missing bicycles"
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 307
- },
- "digest": "d674b0d80bef84b374861ff1023e8ac6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"miss\",\n \"start_offset\": 0,\n \"end_offset\": 7,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"bicycl\",\n \"start_offset\": 8,\n \"end_offset\": 16,\n \"type\": \"\",\n \"position\": 1\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 331
- },
- "digest": "7a2b9a7b2b6553a48bd4db60a939c0fc",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index/_doc/1?refresh\n{\n \"query\" : {\n \"match\" : {\n \"body\" : {\n \"query\" : \"miss bicycl\",\n \"analyzer\" : \"whitespace\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "body": {
- "query": "miss bicycl",
- "analyzer": "whitespace"
- }
- }
- }
- },
- "params": {
- "index": "test_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 355
- },
- "digest": "45813d971bfa890ffa2f51f3f480cce5",
- "lang": "console",
- "found": [],
- "source": "GET /test_index/_search\n{\n \"query\": {\n \"percolate\" : {\n \"field\" : \"query\",\n \"document\" : {\n \"body\" : \"Bycicles are missing\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test_index/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "body": "Bycicles are missing"
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 373
- },
- "digest": "6c36ac2864631f76aa6b04ac6b4d18a4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 6,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.13076457,\n \"hits\": [\n {\n \"_index\": \"test_index\",\n \"_id\": \"1\",\n \"_score\": 0.13076457,\n \"_source\": {\n \"query\": {\n \"match\": {\n \"body\": {\n \"query\": \"miss bicycl\",\n \"analyzer\": \"whitespace\"\n }\n }\n }\n },\n \"fields\" : {\n \"_percolator_document_slot\" : [0]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 427
- },
- "digest": "a04a8d90f8245ff5f30a9983909faa1d",
- "lang": "console",
- "found": [],
- "source": "PUT my_queries1\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"wildcard_prefix\": { <1>\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"wildcard_edge_ngram\"\n ]\n }\n },\n \"filter\": {\n \"wildcard_edge_ngram\": { <2>\n \"type\": \"edge_ngram\",\n \"min_gram\": 1,\n \"max_gram\": 32\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"query\": {\n \"type\": \"percolator\"\n },\n \"my_field\": {\n \"type\": \"text\",\n \"fields\": {\n \"prefix\": { <3>\n \"type\": \"text\",\n \"analyzer\": \"wildcard_prefix\",\n \"search_analyzer\": \"standard\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_queries1",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "wildcard_prefix": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "wildcard_edge_ngram"
- ]
- }
- },
- "filter": {
- "wildcard_edge_ngram": {
- "type": "edge_ngram",
- "min_gram": 1,
- "max_gram": 32
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "my_field": {
- "type": "text",
- "fields": {
- "prefix": {
- "type": "text",
- "analyzer": "wildcard_prefix",
- "search_analyzer": "standard"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_queries1"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 495
- },
- "digest": "ed688d86eeaa4d7969acb0f574eb917f",
- "lang": "console",
- "found": [],
- "source": "PUT /my_queries1/_doc/1?refresh\n{\n \"query\": {\n \"term\": {\n \"my_field.prefix\": \"abc\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_queries1/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "term": {
- "my_field.prefix": "abc"
- }
- }
- },
- "params": {
- "index": "my_queries1",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 513
- },
- "digest": "d2f6040c058a9555dfa62bb42d896a8f",
- "lang": "console",
- "found": [],
- "source": "GET /my_queries1/_search\n{\n \"query\": {\n \"percolate\": {\n \"field\": \"query\",\n \"document\": {\n \"my_field\": \"abcd\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_queries1/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "my_field": "abcd"
- }
- }
- }
- },
- "params": {
- "index": "my_queries1"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 529
- },
- "digest": "c314bccc7efd6cdf7fed6aa2585900c7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 6,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.18864399,\n \"hits\": [\n {\n \"_index\": \"my_queries1\",\n \"_id\": \"1\",\n \"_score\": 0.18864399,\n \"_source\": {\n \"query\": {\n \"term\": {\n \"my_field.prefix\": \"abc\"\n }\n }\n },\n \"fields\": {\n \"_percolator_document_slot\": [\n 0\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 574
- },
- "digest": "343dd09a8c76987e586858be3bdc51eb",
- "lang": "console",
- "found": [],
- "source": "PUT my_queries2\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"wildcard_suffix\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"reverse\",\n \"wildcard_edge_ngram\"\n ]\n },\n \"wildcard_suffix_search_time\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"reverse\"\n ]\n }\n },\n \"filter\": {\n \"wildcard_edge_ngram\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 1,\n \"max_gram\": 32\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"query\": {\n \"type\": \"percolator\"\n },\n \"my_field\": {\n \"type\": \"text\",\n \"fields\": {\n \"suffix\": {\n \"type\": \"text\",\n \"analyzer\": \"wildcard_suffix\",\n \"search_analyzer\": \"wildcard_suffix_search_time\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_queries2",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "wildcard_suffix": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "reverse",
- "wildcard_edge_ngram"
- ]
- },
- "wildcard_suffix_search_time": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "reverse"
- ]
- }
- },
- "filter": {
- "wildcard_edge_ngram": {
- "type": "edge_ngram",
- "min_gram": 1,
- "max_gram": 32
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "query": {
- "type": "percolator"
- },
- "my_field": {
- "type": "text",
- "fields": {
- "suffix": {
- "type": "text",
- "analyzer": "wildcard_suffix",
- "search_analyzer": "wildcard_suffix_search_time"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_queries2"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 649
- },
- "digest": "bd7330af2609bdd8aa10958f5e640b93",
- "lang": "console",
- "found": [],
- "source": "PUT /my_queries2/_doc/2?refresh\n{\n \"query\": {\n \"match\": { <1>\n \"my_field.suffix\": \"xyz\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_queries2/_doc/2",
- "query": {
- "refresh": true
- },
- "body": {
- "query": {
- "match": {
- "my_field.suffix": "xyz"
- }
- }
- },
- "params": {
- "index": "my_queries2",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/percolator.asciidoc",
- "line": 668
- },
- "digest": "4aa81a694266fb634904224d14cd9a87",
- "lang": "console",
- "found": [],
- "source": "GET /my_queries2/_search\n{\n \"query\": {\n \"percolate\": {\n \"field\": \"query\",\n \"document\": {\n \"my_field\": \"wxyz\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_queries2/_search",
- "query": null,
- "body": {
- "query": {
- "percolate": {
- "field": "query",
- "document": {
- "my_field": "wxyz"
- }
- }
- }
- },
- "params": {
- "index": "my_queries2"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 21
- },
- "digest": "2b371fbf0654d76436d49f5703d6c137",
- "lang": "console",
- "found": [],
- "source": "PUT range_index\n{\n \"settings\": {\n \"number_of_shards\": 2\n },\n \"mappings\": {\n \"properties\": {\n \"expected_attendees\": {\n \"type\": \"integer_range\"\n },\n \"time_frame\": {\n \"type\": \"date_range\", <1>\n \"format\": \"yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis\"\n }\n }\n }\n}\n\nPUT range_index/_doc/1?refresh\n{\n \"expected_attendees\" : { <2>\n \"gte\" : 10,\n \"lte\" : 20\n },\n \"time_frame\" : { <3>\n \"gte\" : \"2015-10-31 12:00:00\", <4>\n \"lte\" : \"2015-11-01\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/range_index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 2
- },
- "mappings": {
- "properties": {
- "expected_attendees": {
- "type": "integer_range"
- },
- "time_frame": {
- "type": "date_range",
- "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/range_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "expected_attendees": {
- "gte": 10,
- "lte": 20
- },
- "time_frame": {
- "gte": "2015-10-31 12:00:00",
- "lte": "2015-11-01"
- }
- },
- "params": {
- "index": "range_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 62
- },
- "digest": "84edb44c5b74426f448b2baa101092d6",
- "lang": "console",
- "found": [],
- "source": "GET range_index/_search\n{\n \"query\" : {\n \"term\" : {\n \"expected_attendees\" : {\n \"value\": 12\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/range_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "expected_attendees": {
- "value": 12
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 78
- },
- "digest": "570b8a6473120ec5941ccae33072efd7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\" : {\n \"total\": 2,\n \"successful\": 2,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\" : 1.0,\n \"hits\" : [\n {\n \"_index\" : \"range_index\",\n \"_id\" : \"1\",\n \"_score\" : 1.0,\n \"_source\" : {\n \"expected_attendees\" : {\n \"gte\" : 10, \"lte\" : 20\n },\n \"time_frame\" : {\n \"gte\" : \"2015-10-31 12:00:00\", \"lte\" : \"2015-11-01\"\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 117
- },
- "digest": "1572696b97822d3332be51700e09672f",
- "lang": "console",
- "found": [],
- "source": "GET range_index/_search\n{\n \"query\" : {\n \"range\" : {\n \"time_frame\" : { <1>\n \"gte\" : \"2015-10-31\",\n \"lte\" : \"2015-11-01\",\n \"relation\" : \"within\" <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/range_index/_search",
- "query": null,
- "body": {
- "query": {
- "range": {
- "time_frame": {
- "gte": "2015-10-31",
- "lte": "2015-11-01",
- "relation": "within"
- }
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 139
- },
- "digest": "570b8a6473120ec5941ccae33072efd7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 13,\n \"timed_out\": false,\n \"_shards\" : {\n \"total\": 2,\n \"successful\": 2,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\" : 1.0,\n \"hits\" : [\n {\n \"_index\" : \"range_index\",\n \"_id\" : \"1\",\n \"_score\" : 1.0,\n \"_source\" : {\n \"expected_attendees\" : {\n \"gte\" : 10, \"lte\" : 20\n },\n \"time_frame\" : {\n \"gte\" : \"2015-10-31 12:00:00\", \"lte\" : \"2015-11-01\"\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/range.asciidoc",
- "line": 182
- },
- "digest": "7f514e9e785e4323d16396359cb184f2",
- "lang": "console",
- "found": [],
- "source": "PUT range_index/_mapping\n{\n \"properties\": {\n \"ip_allowlist\": {\n \"type\": \"ip_range\"\n }\n }\n}\n\nPUT range_index/_doc/2\n{\n \"ip_allowlist\" : \"192.168.0.0/16\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/range_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "ip_allowlist": {
- "type": "ip_range"
- }
- }
- },
- "params": {
- "index": "range_index"
- },
- "api": "indices.put_mapping"
- },
- {
- "method": "PUT",
- "url": "/range_index/_doc/2",
- "query": null,
- "body": {
- "ip_allowlist": "192.168.0.0/16"
- },
- "params": {
- "index": "range_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/rank-feature.asciidoc",
- "line": 11
- },
- "digest": "1e088f892b20697fd6e537a3ecf624ee",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"pagerank\": {\n \"type\": \"rank_feature\" <1>\n },\n \"url_length\": {\n \"type\": \"rank_feature\",\n \"positive_score_impact\": false <2>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"pagerank\": 8,\n \"url_length\": 22\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"pagerank\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "pagerank": {
- "type": "rank_feature"
- },
- "url_length": {
- "type": "rank_feature",
- "positive_score_impact": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "pagerank": 8,
- "url_length": 22
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "pagerank"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/rank-features.asciidoc",
- "line": 16
- },
- "digest": "17867d05695ddeaee5d5aea2263ac589",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"topics\": {\n \"type\": \"rank_features\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"topics\": { <2>\n \"politics\": 20,\n \"economics\": 50.8\n }\n}\n\nPUT my_index/_doc/2\n{\n \"topics\": {\n \"politics\": 5.2,\n \"sports\": 80.1\n }\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"rank_feature\": {\n \"field\": \"topics.politics\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "topics": {
- "type": "rank_features"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "topics": {
- "politics": 20,
- "economics": 50.8
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "topics": {
- "politics": 5.2,
- "sports": 80.1
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "rank_feature": {
- "field": "topics.politics"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 18
- },
- "digest": "6f31f9cfe0dd741ccad4af62ba8f815e",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_field\": {\n \"type\": \"search_as_you_type\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_field": {
- "type": "search_as_you_type"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 71
- },
- "digest": "867e5fad9c57055712fe2b69fa69a97c",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"my_field\": \"quick brown fox jump lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "my_field": "quick brown fox jump lazy dog"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 87
- },
- "digest": "9bd25962f177e86dbc5a8030a420cc31",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"multi_match\": {\n \"query\": \"brown f\",\n \"type\": \"bool_prefix\",\n \"fields\": [\n \"my_field\",\n \"my_field._2gram\",\n \"my_field._3gram\"\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "brown f",
- "type": "bool_prefix",
- "fields": [
- "my_field",
- "my_field._2gram",
- "my_field._3gram"
- ]
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 106
- },
- "digest": "cf032a0749b770fb4f77af46d1059c18",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 44,\n \"timed_out\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 1,\n \"relation\" : \"eq\"\n },\n \"max_score\" : 0.8630463,\n \"hits\" : [\n {\n \"_index\" : \"my_index\",\n \"_id\" : \"1\",\n \"_score\" : 0.8630463,\n \"_source\" : {\n \"my_field\" : \"quick brown fox jump lazy dog\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/types/search-as-you-type.asciidoc",
- "line": 147
- },
- "digest": "0ced86822f8c0a479af5e1fe28dfc2ec",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"match_phrase_prefix\": {\n \"my_field\": \"brown f\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase_prefix": {
- "my_field": "brown f"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/text.asciidoc",
- "line": 22
- },
- "digest": "24ea1c6cdf10165228951e562b7ec0ef",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"full_name\": {\n \"type\": \"text\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "full_name": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/token-count.asciidoc",
- "line": 14
- },
- "digest": "98c3d643f71c1fd71238ebb748e846e7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"name\": { <1>\n \"type\": \"text\",\n \"fields\": {\n \"length\": { <2>\n \"type\": \"token_count\",\n \"analyzer\": \"standard\"\n }\n }\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"name\": \"John Smith\" }\n\nPUT my_index/_doc/2\n{ \"name\": \"Rachel Alice Williams\" }\n\nGET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"name.length\": 3 <3>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "type": "text",
- "fields": {
- "length": {
- "type": "token_count",
- "analyzer": "standard"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "name": "John Smith"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "name": "Rachel Alice Williams"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "name.length": 3
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 77
- },
- "digest": "04409304cd13f4cfa8efbed87aea9b15",
- "lang": "console",
- "found": [],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"geometry\": {\n \"type\": \"shape\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geometry": {
- "type": "shape"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 141
- },
- "digest": "a55bdc75b139d947d64b32dc9824e558",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"point\",\n \"coordinates\" : [-377.03653, 389.897676]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "point",
- "coordinates": [
- -377.03653,
- 389.897676
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 154
- },
- "digest": "8fb11f30a609b13c1373ce4a26124159",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POINT (-377.03653 389.897676)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POINT (-377.03653 389.897676)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 171
- },
- "digest": "bff745b32238691bae88de22530643cb",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"linestring\",\n \"coordinates\" : [[-377.03653, 389.897676], [-377.009051, 389.889939]]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "linestring",
- "coordinates": [
- [
- -377.03653,
- 389.897676
- ],
- [
- -377.009051,
- 389.889939
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 184
- },
- "digest": "c4f62c66f967c6e0da3616957efbeccf",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"LINESTRING (-377.03653 389.897676, -377.009051 389.889939)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "LINESTRING (-377.03653 389.897676, -377.009051 389.889939)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 200
- },
- "digest": "567829f263dd472bf76500db05d2200a",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [1000.0, -1001.0], [1001.0, -1001.0], [1001.0, -1000.0], [1000.0, -1000.0], [1000.0, -1001.0] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- 1000,
- -1001
- ],
- [
- 1001,
- -1001
- ],
- [
- 1001,
- -1000
- ],
- [
- 1000,
- -1000
- ],
- [
- 1000,
- -1001
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 215
- },
- "digest": "ae5f9956a525e976bfc37dcb4e7414ae",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POLYGON ((1000.0 -1001.0, 1001.0 -1001.0, 1001.0 -1000.0, 1000.0 -1000.0, 1000.0 -1001.0))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POLYGON ((1000.0 -1001.0, 1001.0 -1001.0, 1001.0 -1000.0, 1000.0 -1000.0, 1000.0 -1001.0))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 227
- },
- "digest": "4f869e56eb25586ac402ccfb00aa0359",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"coordinates\" : [\n [ [1000.0, -1001.0], [1001.0, -1001.0], [1001.0, -1000.0], [1000.0, -1000.0], [1000.0, -1001.0] ],\n [ [1000.2, -1001.2], [1000.8, -1001.2], [1000.8, -1001.8], [1000.2, -1001.8], [1000.2, -1001.2] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "coordinates": [
- [
- [
- 1000,
- -1001
- ],
- [
- 1001,
- -1001
- ],
- [
- 1001,
- -1000
- ],
- [
- 1000,
- -1000
- ],
- [
- 1000,
- -1001
- ]
- ],
- [
- [
- 1000.2,
- -1001.2
- ],
- [
- 1000.8,
- -1001.2
- ],
- [
- 1000.8,
- -1001.8
- ],
- [
- 1000.2,
- -1001.8
- ],
- [
- 1000.2,
- -1001.2
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 243
- },
- "digest": "a5816a58c1fa769c23c6211ab449e6f3",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"POLYGON ((1000.0 1000.0, 1001.0 1000.0, 1001.0 1001.0, 1000.0 1001.0, 1000.0 1000.0), (1000.2 1000.2, 1000.8 1000.2, 1000.8 1000.8, 1000.2 1000.8, 1000.2 1000.2))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "POLYGON ((1000.0 1000.0, 1001.0 1000.0, 1001.0 1001.0, 1000.0 1001.0, 1000.0 1000.0), (1000.2 1000.2, 1000.8 1000.2, 1000.8 1000.8, 1000.2 1000.8, 1000.2 1000.2))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 265
- },
- "digest": "1f1ccd9af526b2251bf960a85288fc97",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"polygon\",\n \"orientation\" : \"clockwise\",\n \"coordinates\" : [\n [ [1000.0, 1000.0], [1000.0, 1001.0], [1001.0, 1001.0], [1001.0, 1000.0], [1000.0, 1000.0] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "polygon",
- "orientation": "clockwise",
- "coordinates": [
- [
- [
- 1000,
- 1000
- ],
- [
- 1000,
- 1001
- ],
- [
- 1001,
- 1001
- ],
- [
- 1001,
- 1000
- ],
- [
- 1000,
- 1000
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 285
- },
- "digest": "02da8c5d098d9e7cc263efac344a96de",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multipoint\",\n \"coordinates\" : [\n [1002.0, 1002.0], [1003.0, 2000.0]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multipoint",
- "coordinates": [
- [
- 1002,
- 1002
- ],
- [
- 1003,
- 2000
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 300
- },
- "digest": "577b09f45256ff855252d29e1d1cd433",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTIPOINT (1002.0 2000.0, 1003.0 2000.0)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTIPOINT (1002.0 2000.0, 1003.0 2000.0)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 314
- },
- "digest": "76c551d13c3d907ad6dc56b85bec76de",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multilinestring\",\n \"coordinates\" : [\n [ [1002.0, 200.0], [1003.0, 200.0], [1003.0, 300.0], [1002.0, 300.0] ],\n [ [1000.0, 100.0], [1001.0, 100.0], [1001.0, 100.0], [1000.0, 100.0] ],\n [ [1000.2, 100.2], [1000.8, 100.2], [1000.8, 100.8], [1000.2, 100.8] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multilinestring",
- "coordinates": [
- [
- [
- 1002,
- 200
- ],
- [
- 1003,
- 200
- ],
- [
- 1003,
- 300
- ],
- [
- 1002,
- 300
- ]
- ],
- [
- [
- 1000,
- 100
- ],
- [
- 1001,
- 100
- ],
- [
- 1001,
- 100
- ],
- [
- 1000,
- 100
- ]
- ],
- [
- [
- 1000.2,
- 100.2
- ],
- [
- 1000.8,
- 100.2
- ],
- [
- 1000.8,
- 100.8
- ],
- [
- 1000.2,
- 100.8
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 331
- },
- "digest": "9aeca1d56bb2ff0701587b269163311e",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTILINESTRING ((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0), (1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0), (1000.2 0.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTILINESTRING ((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0), (1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0), (1000.2 0.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 345
- },
- "digest": "9d2464f0dce99d47f2699d953ee55b37",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"multipolygon\",\n \"coordinates\" : [\n [ [[1002.0, 200.0], [1003.0, 200.0], [1003.0, 300.0], [1002.0, 300.0], [1002.0, 200.0]] ],\n [ [[1000.0, 200.0], [1001.0, 100.0], [1001.0, 100.0], [1000.0, 100.0], [1000.0, 100.0]],\n [[1000.2, 200.2], [1000.8, 100.2], [1000.8, 100.8], [1000.2, 100.8], [1000.2, 100.2]] ]\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "multipolygon",
- "coordinates": [
- [
- [
- [
- 1002,
- 200
- ],
- [
- 1003,
- 200
- ],
- [
- 1003,
- 300
- ],
- [
- 1002,
- 300
- ],
- [
- 1002,
- 200
- ]
- ]
- ],
- [
- [
- [
- 1000,
- 200
- ],
- [
- 1001,
- 100
- ],
- [
- 1001,
- 100
- ],
- [
- 1000,
- 100
- ],
- [
- 1000,
- 100
- ]
- ],
- [
- [
- 1000.2,
- 200.2
- ],
- [
- 1000.8,
- 100.2
- ],
- [
- 1000.8,
- 100.8
- ],
- [
- 1000.2,
- 100.8
- ],
- [
- 1000.2,
- 100.2
- ]
- ]
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 362
- },
- "digest": "e7f366d76e3e53b4c0c30f7b0c21fbc0",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"MULTIPOLYGON (((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0, 102.0 200.0)), ((1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0, 1000.0 100.0), (1000.2 100.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8, 1000.2 100.2)))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "MULTIPOLYGON (((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0, 102.0 200.0)), ((1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0, 1000.0 100.0), (1000.2 100.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8, 1000.2 100.2)))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 376
- },
- "digest": "4b3ef0f1d3cb9598a3fb94c03948e9e2",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\": \"geometrycollection\",\n \"geometries\": [\n {\n \"type\": \"point\",\n \"coordinates\": [1000.0, 100.0]\n },\n {\n \"type\": \"linestring\",\n \"coordinates\": [ [1001.0, 100.0], [1002.0, 100.0] ]\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "geometrycollection",
- "geometries": [
- {
- "type": "point",
- "coordinates": [
- 1000,
- 100
- ]
- },
- {
- "type": "linestring",
- "coordinates": [
- [
- 1001,
- 100
- ],
- [
- 1002,
- 100
- ]
- ]
- }
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 398
- },
- "digest": "72ef8c634b3594963f203d2b3631c12e",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"GEOMETRYCOLLECTION (POINT (1000.0 100.0), LINESTRING (1001.0 100.0, 1002.0 100.0))\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "GEOMETRYCOLLECTION (POINT (1000.0 100.0), LINESTRING (1001.0 100.0, 1002.0 100.0))"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 413
- },
- "digest": "6dd3c5a716302fdd39fcf5c150b826bc",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : {\n \"type\" : \"envelope\",\n \"coordinates\" : [ [1000.0, 100.0], [1001.0, 100.0] ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": {
- "type": "envelope",
- "coordinates": [
- [
- 1000,
- 100
- ],
- [
- 1001,
- 100
- ]
- ]
- }
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/shape.asciidoc",
- "line": 428
- },
- "digest": "70932f56df27fb502d2095fefcaa83d6",
- "lang": "console",
- "found": [],
- "source": "POST /example/_doc\n{\n \"location\" : \"BBOX (1000.0, 1002.0, 2000.0, 1000.0)\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/example/_doc",
- "query": null,
- "body": {
- "location": "BBOX (1000.0, 1002.0, 2000.0, 1000.0)"
- },
- "params": {
- "index": "example"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/constant-keyword.asciidoc",
- "line": 14
- },
- "digest": "6b0d492c0f50103fefeab385a7bebd01",
- "lang": "console",
- "found": [],
- "source": "PUT logs-debug\n{\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n },\n \"message\": {\n \"type\": \"text\"\n },\n \"level\": {\n \"type\": \"constant_keyword\",\n \"value\": \"debug\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs-debug",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- },
- "message": {
- "type": "text"
- },
- "level": {
- "type": "constant_keyword",
- "value": "debug"
- }
- }
- }
- },
- "params": {
- "index": "logs-debug"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/constant-keyword.asciidoc",
- "line": 43
- },
- "digest": "134384b8c63cfbd8d762fb01757bb3f9",
- "lang": "console",
- "found": [],
- "source": "POST logs-debug/_doc\n{\n \"date\": \"2019-12-12\",\n \"message\": \"Starting up Elasticsearch\",\n \"level\": \"debug\"\n}\n\nPOST logs-debug/_doc\n{\n \"date\": \"2019-12-12\",\n \"message\": \"Starting up Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs-debug/_doc",
- "query": null,
- "body": {
- "date": "2019-12-12",
- "message": "Starting up Elasticsearch",
- "level": "debug"
- },
- "params": {
- "index": "logs-debug"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/logs-debug/_doc",
- "query": null,
- "body": {
- "date": "2019-12-12",
- "message": "Starting up Elasticsearch"
- },
- "params": {
- "index": "logs-debug"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/types/wildcard.asciidoc",
- "line": 23
- },
- "digest": "4f272d2d69153037c3eba5864745b23e",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_wildcard\": {\n \"type\": \"wildcard\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"my_wildcard\" : \"This string can be quite lengthy\"\n}\n\nPOST my_index/_doc/_search\n{\n \"query\": {\n \"wildcard\" : \"*quite*lengthy\"\n }\n}\n\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_wildcard": {
- "type": "wildcard"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_wildcard": "This string can be quite lengthy"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/my_index/_doc/_search",
- "query": null,
- "body": {
- "query": {
- "wildcard": "*quite*lengthy"
- }
- },
- "params": {
- "index": "my_index",
- "id": "_search"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/ignored-field.asciidoc",
- "line": 18
- },
- "digest": "3fe0fb38f75d2a34fb1e6ac9bedbcdbc",
- "lang": "console",
- "found": [],
- "source": "GET _search\n{\n \"query\": {\n \"exists\": {\n \"field\": \"_ignored\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "exists": {
- "field": "_ignored"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/ignored-field.asciidoc",
- "line": 33
- },
- "digest": "cf47cd4a39cd62a3ecad919e54a67bca",
- "lang": "console",
- "found": [],
- "source": "GET _search\n{\n \"query\": {\n \"term\": {\n \"_ignored\": \"@timestamp\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "_ignored": "@timestamp"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/id-field.asciidoc",
- "line": 12
- },
- "digest": "8d9a63d7c31f08bd27d92ece3de1649c",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "# Example documents\nPUT my_index/_doc/1\n{\n \"text\": \"Document with ID 1\"\n}\n\nPUT my_index/_doc/2?refresh=true\n{\n \"text\": \"Document with ID 2\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"terms\": {\n \"_id\": [ \"1\", \"2\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Document with ID 1"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": {
- "refresh": "true"
- },
- "body": {
- "text": "Document with ID 2"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "_id": [
- "1",
- "2"
- ]
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/index-field.asciidoc",
- "line": 11
- },
- "digest": "3c04f75bcbb07125d51b21b9b2c9f6f0",
- "lang": "console",
- "found": [],
- "source": "PUT index_1/_doc/1\n{\n \"text\": \"Document in index 1\"\n}\n\nPUT index_2/_doc/2?refresh=true\n{\n \"text\": \"Document in index 2\"\n}\n\nGET index_1,index_2/_search\n{\n \"query\": {\n \"terms\": {\n \"_index\": [\"index_1\", \"index_2\"] <1>\n }\n },\n \"aggs\": {\n \"indices\": {\n \"terms\": {\n \"field\": \"_index\", <2>\n \"size\": 10\n }\n }\n },\n \"sort\": [\n {\n \"_index\": { <3>\n \"order\": \"asc\"\n }\n }\n ],\n \"script_fields\": {\n \"index_name\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['_index']\" <4>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_1/_doc/1",
- "query": null,
- "body": {
- "text": "Document in index 1"
- },
- "params": {
- "index": "index_1",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index_2/_doc/2",
- "query": {
- "refresh": "true"
- },
- "body": {
- "text": "Document in index 2"
- },
- "params": {
- "index": "index_2",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/index_1,index_2/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "_index": [
- "index_1",
- "index_2"
- ]
- }
- },
- "aggs": {
- "indices": {
- "terms": {
- "field": "_index",
- "size": 10
- }
- }
- },
- "sort": [
- {
- "_index": {
- "order": "asc"
- }
- }
- ],
- "script_fields": {
- "index_name": {
- "script": {
- "lang": "painless",
- "source": "doc['_index']"
- }
- }
- }
- },
- "params": {
- "index": "index_1,index_2"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/meta-field.asciidoc",
- "line": 9
- },
- "digest": "e10d7f411744eb1d5ddaa2f70a368490",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"_meta\": { <1>\n \"class\": \"MyApp::User\",\n \"version\": {\n \"min\": \"1.0\",\n \"max\": \"1.3\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "_meta": {
- "class": "MyApp::User",
- "version": {
- "min": "1.0",
- "max": "1.3"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/meta-field.asciidoc",
- "line": 31
- },
- "digest": "019eab381444c3d77ad3bb4e39edfac6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_mapping\n{\n \"_meta\": {\n \"class\": \"MyApp2::User3\",\n \"version\": {\n \"min\": \"1.3\",\n \"max\": \"1.5\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "_meta": {
- "class": "MyApp2::User3",
- "version": {
- "min": "1.3",
- "max": "1.5"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/routing-field.asciidoc",
- "line": 15
- },
- "digest": "b684073ea8d34359c290c663d2a5e798",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?routing=user1&refresh=true <1>\n{\n \"title\": \"This is a document\"\n}\n\nGET my_index/_doc/1?routing=user1 <2>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "routing": "user1",
- "refresh": "true"
- },
- "body": {
- "title": "This is a document"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/1",
- "query": {
- "routing": "user1"
- },
- "body": null,
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/routing-field.asciidoc",
- "line": 33
- },
- "digest": "6817609dd2fcb73b9920327c5cf5ec77",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"terms\": {\n \"_routing\": [ \"user1\" ] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "terms": {
- "_routing": [
- "user1"
- ]
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/routing-field.asciidoc",
- "line": 56
- },
- "digest": "134bdbfb50c81dd3c487514faabc81d3",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search?routing=user1,user2 <1>\n{\n \"query\": {\n \"match\": {\n \"title\": \"document\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": {
- "routing": "user1,user2"
- },
- "body": {
- "query": {
- "match": {
- "title": "document"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/routing-field.asciidoc",
- "line": 81
- },
- "digest": "4f3089b403945e391f03280ae2f360a4",
- "lang": "console",
- "found": [],
- "source": "PUT my_index2\n{\n \"mappings\": {\n \"_routing\": {\n \"required\": true <1>\n }\n }\n}\n\nPUT my_index2/_doc/1 <2>\n{\n \"text\": \"No routing value provided\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index2",
- "query": null,
- "body": {
- "mappings": {
- "_routing": {
- "required": true
- }
- }
- },
- "params": {
- "index": "my_index2"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index2/_doc/1",
- "query": null,
- "body": {
- "text": "No routing value provided"
- },
- "params": {
- "index": "my_index2",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/source-field.asciidoc",
- "line": 16
- },
- "digest": "50246e04b49dab320409b95526e6e34c",
- "lang": "console",
- "found": [],
- "source": "PUT tweets\n{\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/tweets",
- "query": null,
- "body": {
- "mappings": {
- "_source": {
- "enabled": false
- }
- }
- },
- "params": {
- "index": "tweets"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/source-field.asciidoc",
- "line": 85
- },
- "digest": "b557f114e21dbc6f531d4e7621a08e8f",
- "lang": "console",
- "found": [],
- "source": "PUT logs\n{\n \"mappings\": {\n \"_source\": {\n \"includes\": [\n \"*.count\",\n \"meta.*\"\n ],\n \"excludes\": [\n \"meta.description\",\n \"meta.other.*\"\n ]\n }\n }\n}\n\nPUT logs/_doc/1\n{\n \"requests\": {\n \"count\": 10,\n \"foo\": \"bar\" <1>\n },\n \"meta\": {\n \"name\": \"Some metric\",\n \"description\": \"Some metric description\", <1>\n \"other\": {\n \"foo\": \"one\", <1>\n \"baz\": \"two\" <1>\n }\n }\n}\n\nGET logs/_search\n{\n \"query\": {\n \"match\": {\n \"meta.other.foo\": \"one\" <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs",
- "query": null,
- "body": {
- "mappings": {
- "_source": {
- "includes": [
- "*.count",
- "meta.*"
- ],
- "excludes": [
- "meta.description",
- "meta.other.*"
- ]
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/logs/_doc/1",
- "query": null,
- "body": {
- "requests": {
- "count": 10,
- "foo": "bar"
- },
- "meta": {
- "name": "Some metric",
- "description": "Some metric description",
- "other": {
- "foo": "one",
- "baz": "two"
- }
- }
- },
- "params": {
- "index": "logs",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/logs/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "meta.other.foo": "one"
- }
- }
- },
- "params": {
- "index": "logs"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/type-field.asciidoc",
- "line": 14
- },
- "digest": "cb639c02d28945379ba10dbfb982186f",
- "lang": "console",
- "found": [],
- "source": "# Example documents\n\nPUT my_index/_doc/1?refresh=true\n{\n \"text\": \"Document with type 'doc'\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": "true"
- },
- "body": {
- "text": "Document with type 'doc'"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/fields/type-field.asciidoc",
- "line": 25
- },
- "digest": "0d7b0f40446e2001c63bef29f84530eb",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"_type\": \"_doc\" <1>\n }\n },\n \"aggs\": {\n \"types\": {\n \"terms\": {\n \"field\": \"_type\", <2>\n \"size\": 10\n }\n }\n },\n \"sort\": [\n {\n \"_type\": { <3>\n \"order\": \"desc\"\n }\n }\n ],\n \"script_fields\": {\n \"type\": {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"doc['_type']\" <4>\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "_type": "_doc"
- }
- },
- "aggs": {
- "types": {
- "terms": {
- "field": "_type",
- "size": 10
- }
- }
- },
- "sort": [
- {
- "_type": {
- "order": "desc"
- }
- }
- ],
- "script_fields": {
- "type": {
- "script": {
- "lang": "painless",
- "source": "doc['_type']"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/analyzer.asciidoc",
- "line": 35
- },
- "digest": "5bf1e4194dce1e15eb7f48fd72b1fc6b",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\":{\n \"analysis\":{\n \"analyzer\":{\n \"my_analyzer\":{ <1>\n \"type\":\"custom\",\n \"tokenizer\":\"standard\",\n \"filter\":[\n \"lowercase\"\n ]\n },\n \"my_stop_analyzer\":{ <2>\n \"type\":\"custom\",\n \"tokenizer\":\"standard\",\n \"filter\":[\n \"lowercase\",\n \"english_stop\"\n ]\n }\n },\n \"filter\":{\n \"english_stop\":{\n \"type\":\"stop\",\n \"stopwords\":\"_english_\"\n }\n }\n }\n },\n \"mappings\":{\n \"properties\":{\n \"title\": {\n \"type\":\"text\",\n \"analyzer\":\"my_analyzer\", <3>\n \"search_analyzer\":\"my_stop_analyzer\", <4>\n \"search_quote_analyzer\":\"my_analyzer\" <5>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"title\":\"The Quick Brown Fox\"\n}\n\nPUT my_index/_doc/2\n{\n \"title\":\"A Quick Brown Fox\"\n}\n\nGET my_index/_search\n{\n \"query\":{\n \"query_string\":{\n \"query\":\"\\\"the quick brown fox\\\"\" <6>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase"
- ]
- },
- "my_stop_analyzer": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "english_stop"
- ]
- }
- },
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": "_english_"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "analyzer": "my_analyzer",
- "search_analyzer": "my_stop_analyzer",
- "search_quote_analyzer": "my_analyzer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "title": "The Quick Brown Fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "title": "A Quick Brown Fox"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "\"the quick brown fox\""
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/coerce.asciidoc",
- "line": 19
- },
- "digest": "5c734d4a7252cc155f8dc90c4785f491",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"number_one\": {\n \"type\": \"integer\"\n },\n \"number_two\": {\n \"type\": \"integer\",\n \"coerce\": false\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"number_one\": \"10\" <1>\n}\n\nPUT my_index/_doc/2\n{\n \"number_two\": \"10\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "number_one": {
- "type": "integer"
- },
- "number_two": {
- "type": "integer",
- "coerce": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "number_one": "10"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "number_two": "10"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/coerce.asciidoc",
- "line": 60
- },
- "digest": "dad2db81c728827a782a3fefd3399849",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"index.mapping.coerce\": false\n },\n \"mappings\": {\n \"properties\": {\n \"number_one\": {\n \"type\": \"integer\",\n \"coerce\": true\n },\n \"number_two\": {\n \"type\": \"integer\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"number_one\": \"10\" } <1>\n\nPUT my_index/_doc/2\n{ \"number_two\": \"10\" } <2>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.mapping.coerce": false
- },
- "mappings": {
- "properties": {
- "number_one": {
- "type": "integer",
- "coerce": true
- },
- "number_two": {
- "type": "integer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "number_one": "10"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "number_two": "10"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/copy-to.asciidoc",
- "line": 10
- },
- "digest": "363d200a378f8c3acc6d8a77df42eba7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"first_name\": {\n \"type\": \"text\",\n \"copy_to\": \"full_name\" <1>\n },\n \"last_name\": {\n \"type\": \"text\",\n \"copy_to\": \"full_name\" <1>\n },\n \"full_name\": {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"first_name\": \"John\",\n \"last_name\": \"Smith\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"full_name\": { <2>\n \"query\": \"John Smith\",\n \"operator\": \"and\"\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "first_name": {
- "type": "text",
- "copy_to": "full_name"
- },
- "last_name": {
- "type": "text",
- "copy_to": "full_name"
- },
- "full_name": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "first_name": "John",
- "last_name": "Smith"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "full_name": {
- "query": "John Smith",
- "operator": "and"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/doc-values.asciidoc",
- "line": 25
- },
- "digest": "4e75503583efc222045e0be4430a2863",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"status_code\": { <1>\n \"type\": \"keyword\"\n },\n \"session_id\": { <2>\n \"type\": \"keyword\",\n \"doc_values\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "status_code": {
- "type": "keyword"
- },
- "session_id": {
- "type": "keyword",
- "doc_values": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/dynamic.asciidoc",
- "line": 9
- },
- "digest": "e65e9805b8b17f72616f099e11a5c337",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1 <1>\n{\n \"username\": \"johnsmith\",\n \"name\": {\n \"first\": \"John\",\n \"last\": \"Smith\"\n }\n}\n\nGET my_index/_mapping <2>\n\nPUT my_index/_doc/2 <3>\n{\n \"username\": \"marywhite\",\n \"email\": \"mary@white.com\",\n \"name\": {\n \"first\": \"Mary\",\n \"middle\": \"Alice\",\n \"last\": \"White\"\n }\n}\n\nGET my_index/_mapping <4>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "username": "johnsmith",
- "name": {
- "first": "John",
- "last": "Smith"
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "username": "marywhite",
- "email": "mary@white.com",
- "name": {
- "first": "Mary",
- "middle": "Alice",
- "last": "White"
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/dynamic.asciidoc",
- "line": 60
- },
- "digest": "4b478d9b1231513362d2fa8c766cd0a5",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic\": false, <1>\n \"properties\": {\n \"user\": { <2>\n \"properties\": {\n \"name\": {\n \"type\": \"text\"\n },\n \"social_networks\": { <3>\n \"dynamic\": true,\n \"properties\": {}\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic": false,
- "properties": {
- "user": {
- "properties": {
- "name": {
- "type": "text"
- },
- "social_networks": {
- "dynamic": true,
- "properties": {}
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/eager-global-ordinals.asciidoc",
- "line": 53
- },
- "digest": "f7682345a4e36a4c6e553902039a9410",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_mapping\n{\n \"properties\": {\n \"tags\": {\n \"type\": \"keyword\",\n \"eager_global_ordinals\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "tags": {
- "type": "keyword",
- "eager_global_ordinals": true
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/eager-global-ordinals.asciidoc",
- "line": 76
- },
- "digest": "9c9221059c06dd26041a95b93ec9b6df",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_mapping\n{\n \"properties\": {\n \"tags\": {\n \"type\": \"keyword\",\n \"eager_global_ordinals\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "tags": {
- "type": "keyword",
- "eager_global_ordinals": false
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/enabled.asciidoc",
- "line": 17
- },
- "digest": "b0b00ab5b673d747d36deabbc4359859",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"user_id\": {\n \"type\": \"keyword\"\n },\n \"last_updated\": {\n \"type\": \"date\"\n },\n \"session_data\": { <1>\n \"type\": \"object\",\n \"enabled\": false\n }\n }\n }\n}\n\nPUT my_index/_doc/session_1\n{\n \"user_id\": \"kimchy\",\n \"session_data\": { <2>\n \"arbitrary_object\": {\n \"some_array\": [ \"foo\", \"bar\", { \"baz\": 2 } ]\n }\n },\n \"last_updated\": \"2015-12-06T18:20:22\"\n}\n\nPUT my_index/_doc/session_2\n{\n \"user_id\": \"jpountz\",\n \"session_data\": \"none\", <3>\n \"last_updated\": \"2015-12-06T18:22:13\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "keyword"
- },
- "last_updated": {
- "type": "date"
- },
- "session_data": {
- "type": "object",
- "enabled": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/session_1",
- "query": null,
- "body": {
- "user_id": "kimchy",
- "session_data": {
- "arbitrary_object": {
- "some_array": [
- "foo",
- "bar",
- {
- "baz": 2
- }
- ]
- }
- },
- "last_updated": "2015-12-06T18:20:22"
- },
- "params": {
- "index": "my_index",
- "id": "session_1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/session_2",
- "query": null,
- "body": {
- "user_id": "jpountz",
- "session_data": "none",
- "last_updated": "2015-12-06T18:22:13"
- },
- "params": {
- "index": "my_index",
- "id": "session_2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/enabled.asciidoc",
- "line": 64
- },
- "digest": "d31274ad53af4baa23ec3e5000783cbd",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"enabled\": false <1>\n }\n}\n\nPUT my_index/_doc/session_1\n{\n \"user_id\": \"kimchy\",\n \"session_data\": {\n \"arbitrary_object\": {\n \"some_array\": [ \"foo\", \"bar\", { \"baz\": 2 } ]\n }\n },\n \"last_updated\": \"2015-12-06T18:20:22\"\n}\n\nGET my_index/_doc/session_1 <2>\n\nGET my_index/_mapping <3>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "enabled": false
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/session_1",
- "query": null,
- "body": {
- "user_id": "kimchy",
- "session_data": {
- "arbitrary_object": {
- "some_array": [
- "foo",
- "bar",
- {
- "baz": 2
- }
- ]
- }
- },
- "last_updated": "2015-12-06T18:20:22"
- },
- "params": {
- "index": "my_index",
- "id": "session_1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/session_1",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "session_1"
- },
- "api": "get"
- },
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/enabled.asciidoc",
- "line": 99
- },
- "digest": "e93514654ea0c7c9f15cda0eed61a292",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"session_data\": {\n \"type\": \"object\",\n \"enabled\": false\n }\n }\n }\n}\n\nPUT my_index/_doc/session_1\n{\n \"session_data\": \"foo bar\" <1>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "session_data": {
- "type": "object",
- "enabled": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/session_1",
- "query": null,
- "body": {
- "session_data": "foo bar"
- },
- "params": {
- "index": "my_index",
- "id": "session_1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/fielddata.asciidoc",
- "line": 56
- },
- "digest": "ef9111c1648d7820925f12e07d1346c5",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"my_field\": { <1>\n \"type\": \"text\",\n \"fields\": {\n \"keyword\": { <2>\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_field": {
- "type": "text",
- "fields": {
- "keyword": {
- "type": "keyword"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/fielddata.asciidoc",
- "line": 84
- },
- "digest": "a7c15fe6b5779c84ce9a34bf4b2a7ab7",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index/_mapping\n{\n \"properties\": {\n \"my_field\": { <1>\n \"type\": \"text\",\n \"fielddata\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "my_field": {
- "type": "text",
- "fielddata": true
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/fielddata.asciidoc",
- "line": 117
- },
- "digest": "6a81d00f0d73bc5985e76b3cadab645e",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"tag\": {\n \"type\": \"text\",\n \"fielddata\": true,\n \"fielddata_frequency_filter\": {\n \"min\": 0.001,\n \"max\": 0.1,\n \"min_segment_size\": 500\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "tag": {
- "type": "text",
- "fielddata": true,
- "fielddata_frequency_filter": {
- "min": 0.001,
- "max": 0.1,
- "min_segment_size": 500
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/format.asciidoc",
- "line": 13
- },
- "digest": "7f465b7e8ed42df6c42251b4481e699e",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date\",\n \"format\": \"yyyy-MM-dd\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "date": {
- "type": "date",
- "format": "yyyy-MM-dd"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/ignore-above.asciidoc",
- "line": 10
- },
- "digest": "17a77b9c39526c865d7bd6b72cf4a79f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\",\n \"ignore_above\": 20 <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1 <2>\n{\n \"message\": \"Syntax error\"\n}\n\nPUT my_index/_doc/2 <3>\n{\n \"message\": \"Syntax error with some long stacktrace\"\n}\n\nGET my_index/_search <4>\n{\n \"aggs\": {\n \"messages\": {\n \"terms\": {\n \"field\": \"message\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "message": {
- "type": "keyword",
- "ignore_above": 20
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "message": "Syntax error"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "message": "Syntax error with some long stacktrace"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "aggs": {
- "messages": {
- "terms": {
- "field": "message"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/ignore-malformed.asciidoc",
- "line": 16
- },
- "digest": "56af112ba65955f3ca5ef61a199c0daa",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"number_one\": {\n \"type\": \"integer\",\n \"ignore_malformed\": true\n },\n \"number_two\": {\n \"type\": \"integer\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Some text value\",\n \"number_one\": \"foo\" <1>\n}\n\nPUT my_index/_doc/2\n{\n \"text\": \"Some text value\",\n \"number_two\": \"foo\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "number_one": {
- "type": "integer",
- "ignore_malformed": true
- },
- "number_two": {
- "type": "integer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Some text value",
- "number_one": "foo"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "text": "Some text value",
- "number_two": "foo"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/ignore-malformed.asciidoc",
- "line": 69
- },
- "digest": "835faff0d2e8874b7b9693376fa7fc57",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"index.mapping.ignore_malformed\": true <1>\n },\n \"mappings\": {\n \"properties\": {\n \"number_one\": { <1>\n \"type\": \"byte\"\n },\n \"number_two\": {\n \"type\": \"integer\",\n \"ignore_malformed\": false <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.mapping.ignore_malformed": true
- },
- "mappings": {
- "properties": {
- "number_one": {
- "type": "byte"
- },
- "number_two": {
- "type": "integer",
- "ignore_malformed": false
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/index-options.asciidoc",
- "line": 34
- },
- "digest": "3a24ebb542f657420fcd8fdf3f757ce6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"index_options\": \"offsets\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Quick brown fox\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"text\": \"brown fox\"\n }\n },\n \"highlight\": {\n \"fields\": {\n \"text\": {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "index_options": "offsets"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Quick brown fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "text": "brown fox"
- }
- },
- "highlight": {
- "fields": {
- "text": {}
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/index-prefixes.asciidoc",
- "line": 21
- },
- "digest": "ff5d15a265855b1c11cb20ceef6a1b58",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"body_text\": {\n \"type\": \"text\",\n \"index_prefixes\": { } <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "body_text": {
- "type": "text",
- "index_prefixes": {}
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/index-prefixes.asciidoc",
- "line": 41
- },
- "digest": "b19ec4a20c19082e5c40e3b1f28bfbcb",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"full_name\": {\n \"type\": \"text\",\n \"index_prefixes\": {\n \"min_chars\" : 1,\n \"max_chars\" : 10\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "full_name": {
- "type": "text",
- "index_prefixes": {
- "min_chars": 1,
- "max_chars": 10
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/meta.asciidoc",
- "line": 9
- },
- "digest": "bb49cbbeef6afe2dae0db46c4a10df3b",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"latency\": {\n \"type\": \"long\",\n \"meta\": {\n \"unit\": \"ms\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "latency": {
- "type": "long",
- "meta": {
- "unit": "ms"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/multi-fields.asciidoc",
- "line": 10
- },
- "digest": "5271f4ff29bb48838396e5a674664ee0",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"city\": {\n \"type\": \"text\",\n \"fields\": {\n \"raw\": { <1>\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"city\": \"New York\"\n}\n\nPUT my_index/_doc/2\n{\n \"city\": \"York\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"city\": \"york\" <2>\n }\n },\n \"sort\": {\n \"city.raw\": \"asc\" <3>\n },\n \"aggs\": {\n \"Cities\": {\n \"terms\": {\n \"field\": \"city.raw\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "city": {
- "type": "text",
- "fields": {
- "raw": {
- "type": "keyword"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "city": "New York"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "city": "York"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "city": "york"
- }
- },
- "sort": {
- "city.raw": "asc"
- },
- "aggs": {
- "Cities": {
- "terms": {
- "field": "city.raw"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/multi-fields.asciidoc",
- "line": 75
- },
- "digest": "fc8097bdfb6f3a4017bf4186ccca8a84",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"text\": { <1>\n \"type\": \"text\",\n \"fields\": {\n \"english\": { <2>\n \"type\": \"text\",\n \"analyzer\": \"english\"\n }\n }\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{ \"text\": \"quick brown fox\" } <3>\n\nPUT my_index/_doc/2\n{ \"text\": \"quick brown foxes\" } <3>\n\nGET my_index/_search\n{\n \"query\": {\n \"multi_match\": {\n \"query\": \"quick brown foxes\",\n \"fields\": [ <4>\n \"text\",\n \"text.english\"\n ],\n \"type\": \"most_fields\" <4>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "fields": {
- "english": {
- "type": "text",
- "analyzer": "english"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "quick brown fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "text": "quick brown foxes"
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "multi_match": {
- "query": "quick brown foxes",
- "fields": [
- "text",
- "text.english"
- ],
- "type": "most_fields"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/normalizer.asciidoc",
- "line": 18
- },
- "digest": "4cd40113e0fc90c37976f28d7e4a2327",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"settings\": {\n \"analysis\": {\n \"normalizer\": {\n \"my_normalizer\": {\n \"type\": \"custom\",\n \"char_filter\": [],\n \"filter\": [\"lowercase\", \"asciifolding\"]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\",\n \"normalizer\": \"my_normalizer\"\n }\n }\n }\n}\n\nPUT index/_doc/1\n{\n \"foo\": \"BÀR\"\n}\n\nPUT index/_doc/2\n{\n \"foo\": \"bar\"\n}\n\nPUT index/_doc/3\n{\n \"foo\": \"baz\"\n}\n\nPOST index/_refresh\n\nGET index/_search\n{\n \"query\": {\n \"term\": {\n \"foo\": \"BAR\"\n }\n }\n}\n\nGET index/_search\n{\n \"query\": {\n \"match\": {\n \"foo\": \"BAR\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "normalizer": {
- "my_normalizer": {
- "type": "custom",
- "char_filter": [],
- "filter": [
- "lowercase",
- "asciifolding"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "foo": {
- "type": "keyword",
- "normalizer": "my_normalizer"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "foo": "BÀR"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/2",
- "query": null,
- "body": {
- "foo": "bar"
- },
- "params": {
- "index": "index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/3",
- "query": null,
- "body": {
- "foo": "baz"
- },
- "params": {
- "index": "index",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.refresh"
- },
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "foo": "BAR"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "foo": "BAR"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/normalizer.asciidoc",
- "line": 82
- },
- "digest": "3088eb56d501a35ffbd654bc1016dbe2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": $body.took,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 2,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.4700036,\n \"hits\": [\n {\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 0.4700036,\n \"_source\": {\n \"foo\": \"BÀR\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"2\",\n \"_score\": 0.4700036,\n \"_source\": {\n \"foo\": \"bar\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/params/normalizer.asciidoc",
- "line": 125
- },
- "digest": "6f842819c50e8490080dd085e0c6aca3",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"size\": 0,\n \"aggs\": {\n \"foo_terms\": {\n \"terms\": {\n \"field\": \"foo\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "size": 0,
- "aggs": {
- "foo_terms": {
- "terms": {
- "field": "foo"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/normalizer.asciidoc",
- "line": 143
- },
- "digest": "c962116c8a4852673ef22e6d05659e9b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 43,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 3,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": []\n },\n \"aggregations\": {\n \"foo_terms\": {\n \"doc_count_error_upper_bound\": 0,\n \"sum_other_doc_count\": 0,\n \"buckets\": [\n {\n \"key\": \"bar\",\n \"doc_count\": 2\n },\n {\n \"key\": \"baz\",\n \"doc_count\": 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "mapping/params/norms.asciidoc",
- "line": 21
- },
- "digest": "f9d15004aba50331c595837c4546aeef",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_mapping\n{\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"norms\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "title": {
- "type": "text",
- "norms": false
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/null-value.asciidoc",
- "line": 12
- },
- "digest": "463e64093c0dfba910eb5b248085584f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"status_code\": {\n \"type\": \"keyword\",\n \"null_value\": \"NULL\" <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"status_code\": null\n}\n\nPUT my_index/_doc/2\n{\n \"status_code\": [] <2>\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"term\": {\n \"status_code\": \"NULL\" <3>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "status_code": {
- "type": "keyword",
- "null_value": "NULL"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "status_code": null
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "status_code": []
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "status_code": "NULL"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/position-increment-gap.asciidoc",
- "line": 15
- },
- "digest": "5e17abef396d757d65edf81dff5701b6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1\n{\n \"names\": [ \"John Abraham\", \"Lincoln Smith\"]\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match_phrase\": {\n \"names\": {\n \"query\": \"Abraham Lincoln\" <1>\n }\n }\n }\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match_phrase\": {\n \"names\": {\n \"query\": \"Abraham Lincoln\",\n \"slop\": 101 <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "names": [
- "John Abraham",
- "Lincoln Smith"
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "names": {
- "query": "Abraham Lincoln"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "names": {
- "query": "Abraham Lincoln",
- "slop": 101
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/position-increment-gap.asciidoc",
- "line": 53
- },
- "digest": "a37ed1648f68b69e2ea467b38ce21ffc",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"names\": {\n \"type\": \"text\",\n \"position_increment_gap\": 0 <1>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"names\": [ \"John Abraham\", \"Lincoln Smith\"]\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match_phrase\": {\n \"names\": \"Abraham Lincoln\" <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "names": {
- "type": "text",
- "position_increment_gap": 0
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "names": [
- "John Abraham",
- "Lincoln Smith"
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "names": "Abraham Lincoln"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/properties.asciidoc",
- "line": 17
- },
- "digest": "241df3bb0c16b4bd53ee569a45539184",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": { <1>\n \"manager\": {\n \"properties\": { <2>\n \"age\": { \"type\": \"integer\" },\n \"name\": { \"type\": \"text\" }\n }\n },\n \"employees\": {\n \"type\": \"nested\",\n \"properties\": { <3>\n \"age\": { \"type\": \"integer\" },\n \"name\": { \"type\": \"text\" }\n }\n }\n }\n }\n}\n\nPUT my_index/_doc/1 <4>\n{\n \"region\": \"US\",\n \"manager\": {\n \"name\": \"Alice White\",\n \"age\": 30\n },\n \"employees\": [\n {\n \"name\": \"John Smith\",\n \"age\": 34\n },\n {\n \"name\": \"Peter Brown\",\n \"age\": 26\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "manager": {
- "properties": {
- "age": {
- "type": "integer"
- },
- "name": {
- "type": "text"
- }
- }
- },
- "employees": {
- "type": "nested",
- "properties": {
- "age": {
- "type": "integer"
- },
- "name": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "region": "US",
- "manager": {
- "name": "Alice White",
- "age": 30
- },
- "employees": [
- {
- "name": "John Smith",
- "age": 34
- },
- {
- "name": "Peter Brown",
- "age": 26
- }
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/properties.asciidoc",
- "line": 74
- },
- "digest": "7f21b09b9306a03491ddcf0355f33860",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"manager.name\": \"Alice White\"\n }\n },\n \"aggs\": {\n \"Employees\": {\n \"nested\": {\n \"path\": \"employees\"\n },\n \"aggs\": {\n \"Employee Ages\": {\n \"histogram\": {\n \"field\": \"employees.age\",\n \"interval\": 5\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "manager.name": "Alice White"
- }
- },
- "aggs": {
- "Employees": {
- "nested": {
- "path": "employees"
- },
- "aggs": {
- "Employee Ages": {
- "histogram": {
- "field": "employees.age",
- "interval": 5
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/search-analyzer.asciidoc",
- "line": 16
- },
- "digest": "60677e5144fed659e8417b7fa9964285",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"autocomplete_filter\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 1,\n \"max_gram\": 20\n }\n },\n \"analyzer\": {\n \"autocomplete\": { <1>\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"autocomplete_filter\"\n ]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"analyzer\": \"autocomplete\", <2>\n \"search_analyzer\": \"standard\" <2>\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Quick Brown Fox\" <3>\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"text\": {\n \"query\": \"Quick Br\", <4>\n \"operator\": \"and\"\n }\n }\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "autocomplete_filter": {
- "type": "edge_ngram",
- "min_gram": 1,
- "max_gram": 20
- }
- },
- "analyzer": {
- "autocomplete": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "autocomplete_filter"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "analyzer": "autocomplete",
- "search_analyzer": "standard"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Quick Brown Fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "text": {
- "query": "Quick Br",
- "operator": "and"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/similarity.asciidoc",
- "line": 32
- },
- "digest": "e6e31dcdd1ca214c17e375c54069d513",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"default_field\": { <1>\n \"type\": \"text\"\n },\n \"boolean_sim_field\": {\n \"type\": \"text\",\n \"similarity\": \"boolean\" <2>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "default_field": {
- "type": "text"
- },
- "boolean_sim_field": {
- "type": "text",
- "similarity": "boolean"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/store.asciidoc",
- "line": 20
- },
- "digest": "ff26214b3981f7418688e4c8905d5068",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"store\": true <1>\n },\n \"date\": {\n \"type\": \"date\",\n \"store\": true <1>\n },\n \"content\": {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"title\": \"Some short title\",\n \"date\": \"2015-01-01\",\n \"content\": \"A very long content field...\"\n}\n\nGET my_index/_search\n{\n \"stored_fields\": [ \"title\", \"date\" ] <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "store": true
- },
- "date": {
- "type": "date",
- "store": true
- },
- "content": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "title": "Some short title",
- "date": "2015-01-01",
- "content": "A very long content field..."
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "stored_fields": [
- "title",
- "date"
- ]
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/params/term-vector.asciidoc",
- "line": 35
- },
- "digest": "325ce39f81c442a5447ce0ede550c44a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"term_vector\": \"with_positions_offsets\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"text\": \"Quick brown fox\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"text\": \"brown fox\"\n }\n },\n \"highlight\": {\n \"fields\": {\n \"text\": {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "term_vector": "with_positions_offsets"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "text": "Quick brown fox"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "text": "brown fox"
- }
- },
- "highlight": {
- "fields": {
- "text": {}
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic-mapping.asciidoc",
- "line": 11
- },
- "digest": "61c49cee90c6aa0eafbdd5cc03936e7d",
- "lang": "console",
- "found": [],
- "source": "PUT data/_doc/1 <1>\n{ \"count\": 5 }",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/data/_doc/1",
- "query": null,
- "body": {
- "count": 5
- },
- "params": {
- "index": "data",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/field-mapping.asciidoc",
- "line": 50
- },
- "digest": "4909bf2f9e86b4bdd6af1d0b13c0015d",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index/_doc/1\n{\n \"create_date\": \"2015/09/02\"\n}\n\nGET my_index/_mapping <1>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "create_date": "2015/09/02"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/field-mapping.asciidoc",
- "line": 68
- },
- "digest": "95fa846e5d0a75210f9ad1fa1acfa8f3",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"date_detection\": false\n }\n}\n\nPUT my_index/_doc/1 <1>\n{\n \"create\": \"2015/09/02\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "date_detection": false
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "create": "2015/09/02"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/field-mapping.asciidoc",
- "line": 90
- },
- "digest": "4eae628c9aaa259f80711c6e9cc6fd25",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_date_formats\": [\"MM/dd/yyyy\"]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"create_date\": \"09/25/2015\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_date_formats": [
- "MM/dd/yyyy"
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "create_date": "09/25/2015"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/field-mapping.asciidoc",
- "line": 115
- },
- "digest": "fa3cd4ffaec8273656a328ae29f32c65",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"numeric_detection\": true\n }\n}\n\nPUT my_index/_doc/1\n{\n \"my_float\": \"1.0\", <1>\n \"my_integer\": \"1\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "numeric_detection": true
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_float": "1.0",
- "my_integer": "1"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 85
- },
- "digest": "bb33e638fdeded7d721d9bbac2305fda",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"integers\": {\n \"match_mapping_type\": \"long\",\n \"mapping\": {\n \"type\": \"integer\"\n }\n }\n },\n {\n \"strings\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"text\",\n \"fields\": {\n \"raw\": {\n \"type\": \"keyword\",\n \"ignore_above\": 256\n }\n }\n }\n }\n }\n ]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"my_integer\": 5, <1>\n \"my_string\": \"Some string\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "integers": {
- "match_mapping_type": "long",
- "mapping": {
- "type": "integer"
- }
- }
- },
- {
- "strings": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "text",
- "fields": {
- "raw": {
- "type": "keyword",
- "ignore_above": 256
- }
- }
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "my_integer": 5,
- "my_string": "Some string"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 139
- },
- "digest": "4f54b88e05c7a62901062e9e0ed13e5a",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"longs_as_strings\": {\n \"match_mapping_type\": \"string\",\n \"match\": \"long_*\",\n \"unmatch\": \"*_text\",\n \"mapping\": {\n \"type\": \"long\"\n }\n }\n }\n ]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"long_num\": \"5\", <1>\n \"long_text\": \"foo\" <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "longs_as_strings": {
- "match_mapping_type": "string",
- "match": "long_*",
- "unmatch": "*_text",
- "mapping": {
- "type": "long"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "long_num": "5",
- "long_text": "foo"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 193
- },
- "digest": "0b91c082258ce623cc716b679aace653",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"full_name\": {\n \"path_match\": \"name.*\",\n \"path_unmatch\": \"*.middle\",\n \"mapping\": {\n \"type\": \"text\",\n \"copy_to\": \"full_name\"\n }\n }\n }\n ]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"name\": {\n \"first\": \"John\",\n \"middle\": \"Winston\",\n \"last\": \"Lennon\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "full_name": {
- "path_match": "name.*",
- "path_unmatch": "*.middle",
- "mapping": {
- "type": "text",
- "copy_to": "full_name"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "name": {
- "first": "John",
- "middle": "Winston",
- "last": "Lennon"
- }
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 228
- },
- "digest": "be51ed37c8425d281a8153abe56b04cb",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index/_doc/2\n{\n \"name\": {\n \"first\": \"Paul\",\n \"last\": \"McCartney\",\n \"title\": {\n \"value\": \"Sir\",\n \"category\": \"order of chivalry\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/2",
- "query": null,
- "body": {
- "name": {
- "first": "Paul",
- "last": "McCartney",
- "title": {
- "value": "Sir",
- "category": "order of chivalry"
- }
- }
- },
- "params": {
- "index": "my_index",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 253
- },
- "digest": "6873971eb4e4577d76d0a5bd7cd15ef9",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"named_analyzers\": {\n \"match_mapping_type\": \"string\",\n \"match\": \"*\",\n \"mapping\": {\n \"type\": \"text\",\n \"analyzer\": \"{name}\"\n }\n }\n },\n {\n \"no_doc_values\": {\n \"match_mapping_type\":\"*\",\n \"mapping\": {\n \"type\": \"{dynamic_type}\",\n \"doc_values\": false\n }\n }\n }\n ]\n }\n}\n\nPUT my_index/_doc/1\n{\n \"english\": \"Some English text\", <1>\n \"count\": 5 <2>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "named_analyzers": {
- "match_mapping_type": "string",
- "match": "*",
- "mapping": {
- "type": "text",
- "analyzer": "{name}"
- }
- }
- },
- {
- "no_doc_values": {
- "match_mapping_type": "*",
- "mapping": {
- "type": "{dynamic_type}",
- "doc_values": false
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "english": "Some English text",
- "count": 5
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 305
- },
- "digest": "87f85bb49d18f73d0eed0b704e05eb90",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"strings_as_keywords\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"keyword\"\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "strings_as_keywords": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "keyword"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 333
- },
- "digest": "1a59fa2708ccb3a24c71e8306b81f17f",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"strings_as_text\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"text\"\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "strings_as_text": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "text"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 358
- },
- "digest": "3e60c0b29bd3931927e6f2ee7d2ed0ef",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"strings_as_keywords\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"text\",\n \"norms\": false,\n \"fields\": {\n \"keyword\": {\n \"type\": \"keyword\",\n \"ignore_above\": 256\n }\n }\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "strings_as_keywords": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "text",
- "norms": false,
- "fields": {
- "keyword": {
- "type": "keyword",
- "ignore_above": 256
- }
- }
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "mapping/dynamic/templates.asciidoc",
- "line": 396
- },
- "digest": "9a91f7d0bf52d6c582c62daef5c9d040",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"unindexed_longs\": {\n \"match_mapping_type\": \"long\",\n \"mapping\": {\n \"type\": \"long\",\n \"index\": false\n }\n }\n },\n {\n \"unindexed_doubles\": {\n \"match_mapping_type\": \"double\",\n \"mapping\": {\n \"type\": \"float\", <1>\n \"index\": false\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "unindexed_longs": {
- "match_mapping_type": "long",
- "mapping": {
- "type": "long",
- "index": false
- }
- }
- },
- {
- "unindexed_doubles": {
- "match_mapping_type": "double",
- "mapping": {
- "type": "float",
- "index": false
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 9
- },
- "digest": "035a7a919eb6513b4769a3727b7d6447",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"whitespace\",\n \"text\": \"The quick brown fox.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "whitespace",
- "text": "The quick brown fox."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 20
- },
- "digest": "849718cd9322ec336d1805137eac05cd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"The\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0\n },\n {\n \"token\": \"quick\",\n \"start_offset\": 4,\n \"end_offset\": 9,\n \"type\": \"word\",\n \"position\": 1\n },\n {\n \"token\": \"brown\",\n \"start_offset\": 10,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2\n },\n {\n \"token\": \"fox.\",\n \"start_offset\": 16,\n \"end_offset\": 20,\n \"type\": \"word\",\n \"position\": 3\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 62
- },
- "digest": "f7ec9062b3a7578fed55f119d7c22b74",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [ \"lowercase\", \"asciifolding\" ],\n \"text\": \"Is this déja vu?\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "asciifolding"
- ],
- "text": "Is this déja vu?"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 74
- },
- "digest": "2c5b97ad9e616d74cf8ac8f4bbe664a8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"is\",\n \"start_offset\": 0,\n \"end_offset\": 2,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"this\",\n \"start_offset\": 3,\n \"end_offset\": 7,\n \"type\": \"\",\n \"position\": 1\n },\n {\n \"token\": \"deja\",\n \"start_offset\": 8,\n \"end_offset\": 12,\n \"type\": \"\",\n \"position\": 2\n },\n {\n \"token\": \"vu\",\n \"start_offset\": 13,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 3\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 125
- },
- "digest": "acebf0b821acfbd6089f71e0359a56d3",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"std_folded\": { <1>\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"asciifolding\"\n ]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"my_text\": {\n \"type\": \"text\",\n \"analyzer\": \"std_folded\" <2>\n }\n }\n }\n}\n\nGET my_index/_analyze <3>\n{\n \"analyzer\": \"std_folded\", <4>\n \"text\": \"Is this déjà vu?\"\n}\n\nGET my_index/_analyze <3>\n{\n \"field\": \"my_text\", <5>\n \"text\": \"Is this déjà vu?\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "std_folded": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "asciifolding"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "my_text": {
- "type": "text",
- "analyzer": "std_folded"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "GET",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "std_folded",
- "text": "Is this déjà vu?"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- },
- {
- "method": "GET",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "field": "my_text",
- "text": "Is this déjà vu?"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/testing.asciidoc",
- "line": 168
- },
- "digest": "2c5b97ad9e616d74cf8ac8f4bbe664a8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"is\",\n \"start_offset\": 0,\n \"end_offset\": 2,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"this\",\n \"start_offset\": 3,\n \"end_offset\": 7,\n \"type\": \"\",\n \"position\": 1\n },\n {\n \"token\": \"deja\",\n \"start_offset\": 8,\n \"end_offset\": 12,\n \"type\": \"\",\n \"position\": 2\n },\n {\n \"token\": \"vu\",\n \"start_offset\": 13,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 3\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/analyzers/configuring.asciidoc",
- "line": 10
- },
- "digest": "98fa08f638178692476abcae1ac8ce5a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"std_english\": { <1>\n \"type\": \"standard\",\n \"stopwords\": \"_english_\"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"my_text\": {\n \"type\": \"text\",\n \"analyzer\": \"standard\", <2>\n \"fields\": {\n \"english\": {\n \"type\": \"text\",\n \"analyzer\": \"std_english\" <3>\n }\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"field\": \"my_text\", <2>\n \"text\": \"The old brown cow\"\n}\n\nPOST my_index/_analyze\n{\n \"field\": \"my_text.english\", <3>\n \"text\": \"The old brown cow\"\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "std_english": {
- "type": "standard",
- "stopwords": "_english_"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "my_text": {
- "type": "text",
- "analyzer": "standard",
- "fields": {
- "english": {
- "type": "text",
- "analyzer": "std_english"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "field": "my_text",
- "text": "The old brown cow"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "field": "my_text.english",
- "text": "The old brown cow"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/custom-analyzer.asciidoc",
- "line": 55
- },
- "digest": "81db5fb0ea5b942204f4ba27b7ae836a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_custom_analyzer\": {\n \"type\": \"custom\", <1>\n \"tokenizer\": \"standard\",\n \"char_filter\": [\n \"html_strip\"\n ],\n \"filter\": [\n \"lowercase\",\n \"asciifolding\"\n ]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_custom_analyzer\",\n \"text\": \"Is this déjà vu?\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_custom_analyzer": {
- "type": "custom",
- "tokenizer": "standard",
- "char_filter": [
- "html_strip"
- ],
- "filter": [
- "lowercase",
- "asciifolding"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_custom_analyzer",
- "text": "Is this déjà vu?"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/custom-analyzer.asciidoc",
- "line": 157
- },
- "digest": "8fb13998654631659f998e35922bcde6",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_custom_analyzer\": { <1>\n \"type\": \"custom\",\n \"char_filter\": [\n \"emoticons\"\n ],\n \"tokenizer\": \"punctuation\",\n \"filter\": [\n \"lowercase\",\n \"english_stop\"\n ]\n }\n },\n \"tokenizer\": {\n \"punctuation\": { <2>\n \"type\": \"pattern\",\n \"pattern\": \"[ .,!?]\"\n }\n },\n \"char_filter\": {\n \"emoticons\": { <3>\n \"type\": \"mapping\",\n \"mappings\": [\n \":) => _happy_\",\n \":( => _sad_\"\n ]\n }\n },\n \"filter\": {\n \"english_stop\": { <4>\n \"type\": \"stop\",\n \"stopwords\": \"_english_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_custom_analyzer\",\n \"text\": \"I'm a :) person, and you?\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_custom_analyzer": {
- "type": "custom",
- "char_filter": [
- "emoticons"
- ],
- "tokenizer": "punctuation",
- "filter": [
- "lowercase",
- "english_stop"
- ]
- }
- },
- "tokenizer": {
- "punctuation": {
- "type": "pattern",
- "pattern": "[ .,!?]"
- }
- },
- "char_filter": {
- "emoticons": {
- "type": "mapping",
- "mappings": [
- ":) => _happy_",
- ":( => _sad_"
- ]
- }
- },
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": "_english_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_custom_analyzer",
- "text": "I'm a :) person, and you?"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 50
- },
- "digest": "311c6e60a020df4e301c6db9bcaf9e0a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"analyzer\": \"whitespace\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "analyzer": "whitespace"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 74
- },
- "digest": "7b2c75b4f6150485593c49f96f05fb2f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"type\": \"simple\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "type": "simple"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 130
- },
- "digest": "040e4b4d0119e4cc94eafb9db91baae5",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"message\": {\n \"query\": \"Quick foxes\",\n \"analyzer\": \"stop\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "query": "Quick foxes",
- "analyzer": "stop"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 158
- },
- "digest": "8870b188fd9471b853f03cbc2a312261",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"analyzer\": \"whitespace\",\n \"search_analyzer\": \"simple\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "analyzer": "whitespace",
- "search_analyzer": "simple"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/specify-analyzer.asciidoc",
- "line": 186
- },
- "digest": "77c1e9a95f91229bc3f4ede13af97d34",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"type\": \"simple\"\n },\n \"default_search\": {\n \"type\": \"whitespace\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "type": "simple"
- },
- "default_search": {
- "type": "whitespace"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/fingerprint-analyzer.asciidoc",
- "line": 19
- },
- "digest": "6490d89a4e43cac5e6b9bc19840d5478",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"fingerprint\",\n \"text\": \"Yes yes, Gödel said this sentence is consistent and.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "fingerprint",
- "text": "Yes yes, Gödel said this sentence is consistent and."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/fingerprint-analyzer.asciidoc",
- "line": 89
- },
- "digest": "2659ccd414867f3a5ee262c9b7cd3f1d",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_fingerprint_analyzer\": {\n \"type\": \"fingerprint\",\n \"stopwords\": \"_english_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_fingerprint_analyzer\",\n \"text\": \"Yes yes, Gödel said this sentence is consistent and.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_fingerprint_analyzer": {
- "type": "fingerprint",
- "stopwords": "_english_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_fingerprint_analyzer",
- "text": "Yes yes, Gödel said this sentence is consistent and."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/fingerprint-analyzer.asciidoc",
- "line": 159
- },
- "digest": "ce725697f93b3eebb3a266314568565a",
- "lang": "console",
- "found": [],
- "source": "PUT /fingerprint_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"rebuilt_fingerprint\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"asciifolding\",\n \"fingerprint\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/fingerprint_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "rebuilt_fingerprint": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "asciifolding",
- "fingerprint"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "fingerprint_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/keyword-analyzer.asciidoc",
- "line": 14
- },
- "digest": "19ee488226d357d1576e7d3ae7a4693f",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"keyword\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "keyword",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/keyword-analyzer.asciidoc",
- "line": 71
- },
- "digest": "c1efc5cfcb3c29711bfe118f1baa28b0",
- "lang": "console",
- "found": [],
- "source": "PUT /keyword_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"rebuilt_keyword\": {\n \"tokenizer\": \"keyword\",\n \"filter\": [ <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/keyword_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "rebuilt_keyword": {
- "tokenizer": "keyword",
- "filter": []
- }
- }
- }
- }
- },
- "params": {
- "index": "keyword_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 85
- },
- "digest": "137c62a4443bdd7d5b95a15022a9dc30",
- "lang": "console",
- "found": [],
- "source": "PUT /arabic_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"arabic_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_arabic_\" <1>\n },\n \"arabic_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"مثال\"] <2>\n },\n \"arabic_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"arabic\"\n }\n },\n \"analyzer\": {\n \"rebuilt_arabic\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"arabic_stop\",\n \"arabic_normalization\",\n \"arabic_keywords\",\n \"arabic_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/arabic_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "arabic_stop": {
- "type": "stop",
- "stopwords": "_arabic_"
- },
- "arabic_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "مثال"
- ]
- },
- "arabic_stemmer": {
- "type": "stemmer",
- "language": "arabic"
- }
- },
- "analyzer": {
- "rebuilt_arabic": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "decimal_digit",
- "arabic_stop",
- "arabic_normalization",
- "arabic_keywords",
- "arabic_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "arabic_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 135
- },
- "digest": "f7dc2fed08e57abda2c3e8a14f8eb098",
- "lang": "console",
- "found": [],
- "source": "PUT /armenian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"armenian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_armenian_\" <1>\n },\n \"armenian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"օրինակ\"] <2>\n },\n \"armenian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"armenian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_armenian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"armenian_stop\",\n \"armenian_keywords\",\n \"armenian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/armenian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "armenian_stop": {
- "type": "stop",
- "stopwords": "_armenian_"
- },
- "armenian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "օրինակ"
- ]
- },
- "armenian_stemmer": {
- "type": "stemmer",
- "language": "armenian"
- }
- },
- "analyzer": {
- "rebuilt_armenian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "armenian_stop",
- "armenian_keywords",
- "armenian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "armenian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 183
- },
- "digest": "01f50acf7998b24969f451e922d145eb",
- "lang": "console",
- "found": [],
- "source": "PUT /basque_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"basque_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_basque_\" <1>\n },\n \"basque_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"Adibidez\"] <2>\n },\n \"basque_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"basque\"\n }\n },\n \"analyzer\": {\n \"rebuilt_basque\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"basque_stop\",\n \"basque_keywords\",\n \"basque_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/basque_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "basque_stop": {
- "type": "stop",
- "stopwords": "_basque_"
- },
- "basque_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "Adibidez"
- ]
- },
- "basque_stemmer": {
- "type": "stemmer",
- "language": "basque"
- }
- },
- "analyzer": {
- "rebuilt_basque": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "basque_stop",
- "basque_keywords",
- "basque_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "basque_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 231
- },
- "digest": "496d35c89dc991a1509f7e8fb93ade45",
- "lang": "console",
- "found": [],
- "source": "PUT /bengali_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"bengali_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_bengali_\" <1>\n },\n \"bengali_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"উদাহরণ\"] <2>\n },\n \"bengali_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"bengali\"\n }\n },\n \"analyzer\": {\n \"rebuilt_bengali\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"bengali_keywords\",\n \"indic_normalization\",\n \"bengali_normalization\",\n \"bengali_stop\",\n \"bengali_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/bengali_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "bengali_stop": {
- "type": "stop",
- "stopwords": "_bengali_"
- },
- "bengali_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "উদাহরণ"
- ]
- },
- "bengali_stemmer": {
- "type": "stemmer",
- "language": "bengali"
- }
- },
- "analyzer": {
- "rebuilt_bengali": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "decimal_digit",
- "bengali_keywords",
- "indic_normalization",
- "bengali_normalization",
- "bengali_stop",
- "bengali_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "bengali_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 282
- },
- "digest": "13670d1534125831c2059eebd86d840c",
- "lang": "console",
- "found": [],
- "source": "PUT /brazilian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"brazilian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_brazilian_\" <1>\n },\n \"brazilian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exemplo\"] <2>\n },\n \"brazilian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"brazilian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_brazilian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"brazilian_stop\",\n \"brazilian_keywords\",\n \"brazilian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/brazilian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "brazilian_stop": {
- "type": "stop",
- "stopwords": "_brazilian_"
- },
- "brazilian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exemplo"
- ]
- },
- "brazilian_stemmer": {
- "type": "stemmer",
- "language": "brazilian"
- }
- },
- "analyzer": {
- "rebuilt_brazilian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "brazilian_stop",
- "brazilian_keywords",
- "brazilian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "brazilian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 330
- },
- "digest": "d0378fe5e3aad05a2fd2e6e81213374f",
- "lang": "console",
- "found": [],
- "source": "PUT /bulgarian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"bulgarian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_bulgarian_\" <1>\n },\n \"bulgarian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"пример\"] <2>\n },\n \"bulgarian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"bulgarian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_bulgarian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"bulgarian_stop\",\n \"bulgarian_keywords\",\n \"bulgarian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/bulgarian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "bulgarian_stop": {
- "type": "stop",
- "stopwords": "_bulgarian_"
- },
- "bulgarian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "пример"
- ]
- },
- "bulgarian_stemmer": {
- "type": "stemmer",
- "language": "bulgarian"
- }
- },
- "analyzer": {
- "rebuilt_bulgarian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "bulgarian_stop",
- "bulgarian_keywords",
- "bulgarian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "bulgarian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 378
- },
- "digest": "7ab968a61bb0783f563dd6d29b253901",
- "lang": "console",
- "found": [],
- "source": "PUT /catalan_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"catalan_elision\": {\n \"type\": \"elision\",\n \"articles\": [ \"d\", \"l\", \"m\", \"n\", \"s\", \"t\"],\n \"articles_case\": true\n },\n \"catalan_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_catalan_\" <1>\n },\n \"catalan_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"example\"] <2>\n },\n \"catalan_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"catalan\"\n }\n },\n \"analyzer\": {\n \"rebuilt_catalan\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"catalan_elision\",\n \"lowercase\",\n \"catalan_stop\",\n \"catalan_keywords\",\n \"catalan_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/catalan_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "catalan_elision": {
- "type": "elision",
- "articles": [
- "d",
- "l",
- "m",
- "n",
- "s",
- "t"
- ],
- "articles_case": true
- },
- "catalan_stop": {
- "type": "stop",
- "stopwords": "_catalan_"
- },
- "catalan_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "example"
- ]
- },
- "catalan_stemmer": {
- "type": "stemmer",
- "language": "catalan"
- }
- },
- "analyzer": {
- "rebuilt_catalan": {
- "tokenizer": "standard",
- "filter": [
- "catalan_elision",
- "lowercase",
- "catalan_stop",
- "catalan_keywords",
- "catalan_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "catalan_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 435
- },
- "digest": "d305110a8cabfbebd1e38d85559d1023",
- "lang": "console",
- "found": [],
- "source": "PUT /cjk_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"english_stop\": {\n \"type\": \"stop\",\n \"stopwords\": [ <1>\n \"a\", \"and\", \"are\", \"as\", \"at\", \"be\", \"but\", \"by\", \"for\",\n \"if\", \"in\", \"into\", \"is\", \"it\", \"no\", \"not\", \"of\", \"on\",\n \"or\", \"s\", \"such\", \"t\", \"that\", \"the\", \"their\", \"then\",\n \"there\", \"these\", \"they\", \"this\", \"to\", \"was\", \"will\",\n \"with\", \"www\"\n ]\n }\n },\n \"analyzer\": {\n \"rebuilt_cjk\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"cjk_width\",\n \"lowercase\",\n \"cjk_bigram\",\n \"english_stop\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/cjk_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": [
- "a",
- "and",
- "are",
- "as",
- "at",
- "be",
- "but",
- "by",
- "for",
- "if",
- "in",
- "into",
- "is",
- "it",
- "no",
- "not",
- "of",
- "on",
- "or",
- "s",
- "such",
- "t",
- "that",
- "the",
- "their",
- "then",
- "there",
- "these",
- "they",
- "this",
- "to",
- "was",
- "will",
- "with",
- "www"
- ]
- }
- },
- "analyzer": {
- "rebuilt_cjk": {
- "tokenizer": "standard",
- "filter": [
- "cjk_width",
- "lowercase",
- "cjk_bigram",
- "english_stop"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "cjk_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 481
- },
- "digest": "a28111cdd9b5aaea96c779cbfbf38780",
- "lang": "console",
- "found": [],
- "source": "PUT /czech_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"czech_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_czech_\" <1>\n },\n \"czech_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"příklad\"] <2>\n },\n \"czech_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"czech\"\n }\n },\n \"analyzer\": {\n \"rebuilt_czech\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"czech_stop\",\n \"czech_keywords\",\n \"czech_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/czech_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "czech_stop": {
- "type": "stop",
- "stopwords": "_czech_"
- },
- "czech_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "příklad"
- ]
- },
- "czech_stemmer": {
- "type": "stemmer",
- "language": "czech"
- }
- },
- "analyzer": {
- "rebuilt_czech": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "czech_stop",
- "czech_keywords",
- "czech_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "czech_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 529
- },
- "digest": "ed85ed833bec7286a0dfbe64077c5715",
- "lang": "console",
- "found": [],
- "source": "PUT /danish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"danish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_danish_\" <1>\n },\n \"danish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"eksempel\"] <2>\n },\n \"danish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"danish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_danish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"danish_stop\",\n \"danish_keywords\",\n \"danish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/danish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "danish_stop": {
- "type": "stop",
- "stopwords": "_danish_"
- },
- "danish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "eksempel"
- ]
- },
- "danish_stemmer": {
- "type": "stemmer",
- "language": "danish"
- }
- },
- "analyzer": {
- "rebuilt_danish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "danish_stop",
- "danish_keywords",
- "danish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "danish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 577
- },
- "digest": "10d8b17e73d31dcd907de67327ed78a2",
- "lang": "console",
- "found": [],
- "source": "PUT /dutch_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"dutch_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_dutch_\" <1>\n },\n \"dutch_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"voorbeeld\"] <2>\n },\n \"dutch_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"dutch\"\n },\n \"dutch_override\": {\n \"type\": \"stemmer_override\",\n \"rules\": [\n \"fiets=>fiets\",\n \"bromfiets=>bromfiets\",\n \"ei=>eier\",\n \"kind=>kinder\"\n ]\n }\n },\n \"analyzer\": {\n \"rebuilt_dutch\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"dutch_stop\",\n \"dutch_keywords\",\n \"dutch_override\",\n \"dutch_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/dutch_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "dutch_stop": {
- "type": "stop",
- "stopwords": "_dutch_"
- },
- "dutch_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "voorbeeld"
- ]
- },
- "dutch_stemmer": {
- "type": "stemmer",
- "language": "dutch"
- },
- "dutch_override": {
- "type": "stemmer_override",
- "rules": [
- "fiets=>fiets",
- "bromfiets=>bromfiets",
- "ei=>eier",
- "kind=>kinder"
- ]
- }
- },
- "analyzer": {
- "rebuilt_dutch": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "dutch_stop",
- "dutch_keywords",
- "dutch_override",
- "dutch_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "dutch_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 635
- },
- "digest": "81c7a392efd505b686eed978fb7d9d17",
- "lang": "console",
- "found": [],
- "source": "PUT /english_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"english_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_english_\" <1>\n },\n \"english_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"example\"] <2>\n },\n \"english_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"english\"\n },\n \"english_possessive_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"possessive_english\"\n }\n },\n \"analyzer\": {\n \"rebuilt_english\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"english_possessive_stemmer\",\n \"lowercase\",\n \"english_stop\",\n \"english_keywords\",\n \"english_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/english_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": "_english_"
- },
- "english_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "example"
- ]
- },
- "english_stemmer": {
- "type": "stemmer",
- "language": "english"
- },
- "english_possessive_stemmer": {
- "type": "stemmer",
- "language": "possessive_english"
- }
- },
- "analyzer": {
- "rebuilt_english": {
- "tokenizer": "standard",
- "filter": [
- "english_possessive_stemmer",
- "lowercase",
- "english_stop",
- "english_keywords",
- "english_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "english_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 688
- },
- "digest": "2f4e28c81db47547ad39d0926babab12",
- "lang": "console",
- "found": [],
- "source": "PUT /estonian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"estonian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_estonian_\" <1>\n },\n \"estonian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"näide\"] <2>\n },\n \"estonian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"estonian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_estonian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"estonian_stop\",\n \"estonian_keywords\",\n \"estonian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/estonian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "estonian_stop": {
- "type": "stop",
- "stopwords": "_estonian_"
- },
- "estonian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "näide"
- ]
- },
- "estonian_stemmer": {
- "type": "stemmer",
- "language": "estonian"
- }
- },
- "analyzer": {
- "rebuilt_estonian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "estonian_stop",
- "estonian_keywords",
- "estonian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "estonian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 736
- },
- "digest": "85f0e5e8ab91ceab63c21dbedd9f4037",
- "lang": "console",
- "found": [],
- "source": "PUT /finnish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"finnish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_finnish_\" <1>\n },\n \"finnish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"esimerkki\"] <2>\n },\n \"finnish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"finnish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_finnish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"finnish_stop\",\n \"finnish_keywords\",\n \"finnish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/finnish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "finnish_stop": {
- "type": "stop",
- "stopwords": "_finnish_"
- },
- "finnish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "esimerkki"
- ]
- },
- "finnish_stemmer": {
- "type": "stemmer",
- "language": "finnish"
- }
- },
- "analyzer": {
- "rebuilt_finnish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "finnish_stop",
- "finnish_keywords",
- "finnish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "finnish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 784
- },
- "digest": "f545bb95214769aca993c1632a71ad2c",
- "lang": "console",
- "found": [],
- "source": "PUT /french_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"french_elision\": {\n \"type\": \"elision\",\n \"articles_case\": true,\n \"articles\": [\n \"l\", \"m\", \"t\", \"qu\", \"n\", \"s\",\n \"j\", \"d\", \"c\", \"jusqu\", \"quoiqu\",\n \"lorsqu\", \"puisqu\"\n ]\n },\n \"french_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_french_\" <1>\n },\n \"french_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"Example\"] <2>\n },\n \"french_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_french\"\n }\n },\n \"analyzer\": {\n \"rebuilt_french\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"french_elision\",\n \"lowercase\",\n \"french_stop\",\n \"french_keywords\",\n \"french_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/french_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "french_elision": {
- "type": "elision",
- "articles_case": true,
- "articles": [
- "l",
- "m",
- "t",
- "qu",
- "n",
- "s",
- "j",
- "d",
- "c",
- "jusqu",
- "quoiqu",
- "lorsqu",
- "puisqu"
- ]
- },
- "french_stop": {
- "type": "stop",
- "stopwords": "_french_"
- },
- "french_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "Example"
- ]
- },
- "french_stemmer": {
- "type": "stemmer",
- "language": "light_french"
- }
- },
- "analyzer": {
- "rebuilt_french": {
- "tokenizer": "standard",
- "filter": [
- "french_elision",
- "lowercase",
- "french_stop",
- "french_keywords",
- "french_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "french_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 842
- },
- "digest": "9606c271921cb800d5ea395b16d6ceaf",
- "lang": "console",
- "found": [],
- "source": "PUT /galician_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"galician_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_galician_\" <1>\n },\n \"galician_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exemplo\"] <2>\n },\n \"galician_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"galician\"\n }\n },\n \"analyzer\": {\n \"rebuilt_galician\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"galician_stop\",\n \"galician_keywords\",\n \"galician_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/galician_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "galician_stop": {
- "type": "stop",
- "stopwords": "_galician_"
- },
- "galician_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exemplo"
- ]
- },
- "galician_stemmer": {
- "type": "stemmer",
- "language": "galician"
- }
- },
- "analyzer": {
- "rebuilt_galician": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "galician_stop",
- "galician_keywords",
- "galician_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "galician_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 890
- },
- "digest": "187e8786e0a90f1f6278cf89b670de0a",
- "lang": "console",
- "found": [],
- "source": "PUT /german_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"german_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_german_\" <1>\n },\n \"german_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"Beispiel\"] <2>\n },\n \"german_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_german\"\n }\n },\n \"analyzer\": {\n \"rebuilt_german\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"german_stop\",\n \"german_keywords\",\n \"german_normalization\",\n \"german_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/german_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "german_stop": {
- "type": "stop",
- "stopwords": "_german_"
- },
- "german_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "Beispiel"
- ]
- },
- "german_stemmer": {
- "type": "stemmer",
- "language": "light_german"
- }
- },
- "analyzer": {
- "rebuilt_german": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "german_stop",
- "german_keywords",
- "german_normalization",
- "german_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "german_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 939
- },
- "digest": "1f00e73c144603e97f6c14ab15fa1913",
- "lang": "console",
- "found": [],
- "source": "PUT /greek_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"greek_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_greek_\" <1>\n },\n \"greek_lowercase\": {\n \"type\": \"lowercase\",\n \"language\": \"greek\"\n },\n \"greek_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"παράδειγμα\"] <2>\n },\n \"greek_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"greek\"\n }\n },\n \"analyzer\": {\n \"rebuilt_greek\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"greek_lowercase\",\n \"greek_stop\",\n \"greek_keywords\",\n \"greek_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/greek_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "greek_stop": {
- "type": "stop",
- "stopwords": "_greek_"
- },
- "greek_lowercase": {
- "type": "lowercase",
- "language": "greek"
- },
- "greek_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "παράδειγμα"
- ]
- },
- "greek_stemmer": {
- "type": "stemmer",
- "language": "greek"
- }
- },
- "analyzer": {
- "rebuilt_greek": {
- "tokenizer": "standard",
- "filter": [
- "greek_lowercase",
- "greek_stop",
- "greek_keywords",
- "greek_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "greek_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 991
- },
- "digest": "af00a58d9171d32f6efe52d94e51e526",
- "lang": "console",
- "found": [],
- "source": "PUT /hindi_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"hindi_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_hindi_\" <1>\n },\n \"hindi_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"उदाहरण\"] <2>\n },\n \"hindi_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"hindi\"\n }\n },\n \"analyzer\": {\n \"rebuilt_hindi\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"hindi_keywords\",\n \"indic_normalization\",\n \"hindi_normalization\",\n \"hindi_stop\",\n \"hindi_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/hindi_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "hindi_stop": {
- "type": "stop",
- "stopwords": "_hindi_"
- },
- "hindi_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "उदाहरण"
- ]
- },
- "hindi_stemmer": {
- "type": "stemmer",
- "language": "hindi"
- }
- },
- "analyzer": {
- "rebuilt_hindi": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "decimal_digit",
- "hindi_keywords",
- "indic_normalization",
- "hindi_normalization",
- "hindi_stop",
- "hindi_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "hindi_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1042
- },
- "digest": "84108653e9e03b4edacd878ec870df77",
- "lang": "console",
- "found": [],
- "source": "PUT /hungarian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"hungarian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_hungarian_\" <1>\n },\n \"hungarian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"példa\"] <2>\n },\n \"hungarian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"hungarian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_hungarian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"hungarian_stop\",\n \"hungarian_keywords\",\n \"hungarian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/hungarian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "hungarian_stop": {
- "type": "stop",
- "stopwords": "_hungarian_"
- },
- "hungarian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "példa"
- ]
- },
- "hungarian_stemmer": {
- "type": "stemmer",
- "language": "hungarian"
- }
- },
- "analyzer": {
- "rebuilt_hungarian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "hungarian_stop",
- "hungarian_keywords",
- "hungarian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "hungarian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1091
- },
- "digest": "eb5987b58dae90c3a8a1609410be0570",
- "lang": "console",
- "found": [],
- "source": "PUT /indonesian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"indonesian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_indonesian_\" <1>\n },\n \"indonesian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"contoh\"] <2>\n },\n \"indonesian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"indonesian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_indonesian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"indonesian_stop\",\n \"indonesian_keywords\",\n \"indonesian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/indonesian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "indonesian_stop": {
- "type": "stop",
- "stopwords": "_indonesian_"
- },
- "indonesian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "contoh"
- ]
- },
- "indonesian_stemmer": {
- "type": "stemmer",
- "language": "indonesian"
- }
- },
- "analyzer": {
- "rebuilt_indonesian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "indonesian_stop",
- "indonesian_keywords",
- "indonesian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "indonesian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1139
- },
- "digest": "160f39a50847bad0be4be1529a95e4ce",
- "lang": "console",
- "found": [],
- "source": "PUT /irish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"irish_hyphenation\": {\n \"type\": \"stop\",\n \"stopwords\": [ \"h\", \"n\", \"t\" ],\n \"ignore_case\": true\n },\n \"irish_elision\": {\n \"type\": \"elision\",\n \"articles\": [ \"d\", \"m\", \"b\" ],\n \"articles_case\": true\n },\n \"irish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_irish_\" <1>\n },\n \"irish_lowercase\": {\n \"type\": \"lowercase\",\n \"language\": \"irish\"\n },\n \"irish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"sampla\"] <2>\n },\n \"irish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"irish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_irish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"irish_hyphenation\",\n \"irish_elision\",\n \"irish_lowercase\",\n \"irish_stop\",\n \"irish_keywords\",\n \"irish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/irish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "irish_hyphenation": {
- "type": "stop",
- "stopwords": [
- "h",
- "n",
- "t"
- ],
- "ignore_case": true
- },
- "irish_elision": {
- "type": "elision",
- "articles": [
- "d",
- "m",
- "b"
- ],
- "articles_case": true
- },
- "irish_stop": {
- "type": "stop",
- "stopwords": "_irish_"
- },
- "irish_lowercase": {
- "type": "lowercase",
- "language": "irish"
- },
- "irish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "sampla"
- ]
- },
- "irish_stemmer": {
- "type": "stemmer",
- "language": "irish"
- }
- },
- "analyzer": {
- "rebuilt_irish": {
- "tokenizer": "standard",
- "filter": [
- "irish_hyphenation",
- "irish_elision",
- "irish_lowercase",
- "irish_stop",
- "irish_keywords",
- "irish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "irish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1203
- },
- "digest": "00e0c964c79fcc1876ab957da2ffce82",
- "lang": "console",
- "found": [],
- "source": "PUT /italian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"italian_elision\": {\n \"type\": \"elision\",\n \"articles\": [\n \"c\", \"l\", \"all\", \"dall\", \"dell\",\n \"nell\", \"sull\", \"coll\", \"pell\",\n \"gl\", \"agl\", \"dagl\", \"degl\", \"negl\",\n \"sugl\", \"un\", \"m\", \"t\", \"s\", \"v\", \"d\"\n ],\n \"articles_case\": true\n },\n \"italian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_italian_\" <1>\n },\n \"italian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"esempio\"] <2>\n },\n \"italian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_italian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_italian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"italian_elision\",\n \"lowercase\",\n \"italian_stop\",\n \"italian_keywords\",\n \"italian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/italian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "italian_elision": {
- "type": "elision",
- "articles": [
- "c",
- "l",
- "all",
- "dall",
- "dell",
- "nell",
- "sull",
- "coll",
- "pell",
- "gl",
- "agl",
- "dagl",
- "degl",
- "negl",
- "sugl",
- "un",
- "m",
- "t",
- "s",
- "v",
- "d"
- ],
- "articles_case": true
- },
- "italian_stop": {
- "type": "stop",
- "stopwords": "_italian_"
- },
- "italian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "esempio"
- ]
- },
- "italian_stemmer": {
- "type": "stemmer",
- "language": "light_italian"
- }
- },
- "analyzer": {
- "rebuilt_italian": {
- "tokenizer": "standard",
- "filter": [
- "italian_elision",
- "lowercase",
- "italian_stop",
- "italian_keywords",
- "italian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "italian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1262
- },
- "digest": "d983c1ea730eeabac9e914656d7c9be2",
- "lang": "console",
- "found": [],
- "source": "PUT /latvian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"latvian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_latvian_\" <1>\n },\n \"latvian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"piemērs\"] <2>\n },\n \"latvian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"latvian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_latvian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"latvian_stop\",\n \"latvian_keywords\",\n \"latvian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/latvian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "latvian_stop": {
- "type": "stop",
- "stopwords": "_latvian_"
- },
- "latvian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "piemērs"
- ]
- },
- "latvian_stemmer": {
- "type": "stemmer",
- "language": "latvian"
- }
- },
- "analyzer": {
- "rebuilt_latvian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "latvian_stop",
- "latvian_keywords",
- "latvian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "latvian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1310
- },
- "digest": "bb067c049331cc850a77b18bdfff81b5",
- "lang": "console",
- "found": [],
- "source": "PUT /lithuanian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"lithuanian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_lithuanian_\" <1>\n },\n \"lithuanian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"pavyzdys\"] <2>\n },\n \"lithuanian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"lithuanian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_lithuanian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"lithuanian_stop\",\n \"lithuanian_keywords\",\n \"lithuanian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/lithuanian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "lithuanian_stop": {
- "type": "stop",
- "stopwords": "_lithuanian_"
- },
- "lithuanian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "pavyzdys"
- ]
- },
- "lithuanian_stemmer": {
- "type": "stemmer",
- "language": "lithuanian"
- }
- },
- "analyzer": {
- "rebuilt_lithuanian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "lithuanian_stop",
- "lithuanian_keywords",
- "lithuanian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "lithuanian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1358
- },
- "digest": "2731a8577ad734a732d784c5dcb1225d",
- "lang": "console",
- "found": [],
- "source": "PUT /norwegian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"norwegian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_norwegian_\" <1>\n },\n \"norwegian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"eksempel\"] <2>\n },\n \"norwegian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"norwegian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_norwegian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"norwegian_stop\",\n \"norwegian_keywords\",\n \"norwegian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/norwegian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "norwegian_stop": {
- "type": "stop",
- "stopwords": "_norwegian_"
- },
- "norwegian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "eksempel"
- ]
- },
- "norwegian_stemmer": {
- "type": "stemmer",
- "language": "norwegian"
- }
- },
- "analyzer": {
- "rebuilt_norwegian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "norwegian_stop",
- "norwegian_keywords",
- "norwegian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "norwegian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1406
- },
- "digest": "d1a285aa244ec461d68f13e7078a33c0",
- "lang": "console",
- "found": [],
- "source": "PUT /persian_example\n{\n \"settings\": {\n \"analysis\": {\n \"char_filter\": {\n \"zero_width_spaces\": {\n \"type\": \"mapping\",\n \"mappings\": [ \"\\\\u200C=>\\\\u0020\"] <1>\n }\n },\n \"filter\": {\n \"persian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_persian_\" <2>\n }\n },\n \"analyzer\": {\n \"rebuilt_persian\": {\n \"tokenizer\": \"standard\",\n \"char_filter\": [ \"zero_width_spaces\" ],\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"arabic_normalization\",\n \"persian_normalization\",\n \"persian_stop\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/persian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "char_filter": {
- "zero_width_spaces": {
- "type": "mapping",
- "mappings": [
- "\\u200C=>\\u0020"
- ]
- }
- },
- "filter": {
- "persian_stop": {
- "type": "stop",
- "stopwords": "_persian_"
- }
- },
- "analyzer": {
- "rebuilt_persian": {
- "tokenizer": "standard",
- "char_filter": [
- "zero_width_spaces"
- ],
- "filter": [
- "lowercase",
- "decimal_digit",
- "arabic_normalization",
- "persian_normalization",
- "persian_stop"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "persian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1452
- },
- "digest": "584f502cf840134f2db5f39e2483ced1",
- "lang": "console",
- "found": [],
- "source": "PUT /portuguese_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"portuguese_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_portuguese_\" <1>\n },\n \"portuguese_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exemplo\"] <2>\n },\n \"portuguese_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_portuguese\"\n }\n },\n \"analyzer\": {\n \"rebuilt_portuguese\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"portuguese_stop\",\n \"portuguese_keywords\",\n \"portuguese_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/portuguese_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "portuguese_stop": {
- "type": "stop",
- "stopwords": "_portuguese_"
- },
- "portuguese_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exemplo"
- ]
- },
- "portuguese_stemmer": {
- "type": "stemmer",
- "language": "light_portuguese"
- }
- },
- "analyzer": {
- "rebuilt_portuguese": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "portuguese_stop",
- "portuguese_keywords",
- "portuguese_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "portuguese_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1500
- },
- "digest": "1ba7afe23a26fe9ac7856d8c5bc1059d",
- "lang": "console",
- "found": [],
- "source": "PUT /romanian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"romanian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_romanian_\" <1>\n },\n \"romanian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exemplu\"] <2>\n },\n \"romanian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"romanian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_romanian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"romanian_stop\",\n \"romanian_keywords\",\n \"romanian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/romanian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "romanian_stop": {
- "type": "stop",
- "stopwords": "_romanian_"
- },
- "romanian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exemplu"
- ]
- },
- "romanian_stemmer": {
- "type": "stemmer",
- "language": "romanian"
- }
- },
- "analyzer": {
- "rebuilt_romanian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "romanian_stop",
- "romanian_keywords",
- "romanian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "romanian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1549
- },
- "digest": "d260225cf97e068ead2a8a6bb5aefd90",
- "lang": "console",
- "found": [],
- "source": "PUT /russian_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"russian_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_russian_\" <1>\n },\n \"russian_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"пример\"] <2>\n },\n \"russian_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"russian\"\n }\n },\n \"analyzer\": {\n \"rebuilt_russian\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"russian_stop\",\n \"russian_keywords\",\n \"russian_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/russian_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "russian_stop": {
- "type": "stop",
- "stopwords": "_russian_"
- },
- "russian_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "пример"
- ]
- },
- "russian_stemmer": {
- "type": "stemmer",
- "language": "russian"
- }
- },
- "analyzer": {
- "rebuilt_russian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "russian_stop",
- "russian_keywords",
- "russian_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "russian_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1597
- },
- "digest": "320645d771e952af2a67bb7445c3688d",
- "lang": "console",
- "found": [],
- "source": "PUT /sorani_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"sorani_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_sorani_\" <1>\n },\n \"sorani_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"mînak\"] <2>\n },\n \"sorani_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"sorani\"\n }\n },\n \"analyzer\": {\n \"rebuilt_sorani\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"sorani_normalization\",\n \"lowercase\",\n \"decimal_digit\",\n \"sorani_stop\",\n \"sorani_keywords\",\n \"sorani_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/sorani_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "sorani_stop": {
- "type": "stop",
- "stopwords": "_sorani_"
- },
- "sorani_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "mînak"
- ]
- },
- "sorani_stemmer": {
- "type": "stemmer",
- "language": "sorani"
- }
- },
- "analyzer": {
- "rebuilt_sorani": {
- "tokenizer": "standard",
- "filter": [
- "sorani_normalization",
- "lowercase",
- "decimal_digit",
- "sorani_stop",
- "sorani_keywords",
- "sorani_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "sorani_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1647
- },
- "digest": "327466380bcd55361973b4a96c6dccb2",
- "lang": "console",
- "found": [],
- "source": "PUT /spanish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"spanish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_spanish_\" <1>\n },\n \"spanish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"ejemplo\"] <2>\n },\n \"spanish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_spanish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_spanish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"spanish_stop\",\n \"spanish_keywords\",\n \"spanish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/spanish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "spanish_stop": {
- "type": "stop",
- "stopwords": "_spanish_"
- },
- "spanish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "ejemplo"
- ]
- },
- "spanish_stemmer": {
- "type": "stemmer",
- "language": "light_spanish"
- }
- },
- "analyzer": {
- "rebuilt_spanish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "spanish_stop",
- "spanish_keywords",
- "spanish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "spanish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1695
- },
- "digest": "f097c02541056f3c0fc855e7bbeef8a8",
- "lang": "console",
- "found": [],
- "source": "PUT /swedish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"swedish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_swedish_\" <1>\n },\n \"swedish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"exempel\"] <2>\n },\n \"swedish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"swedish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_swedish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"swedish_stop\",\n \"swedish_keywords\",\n \"swedish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/swedish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "swedish_stop": {
- "type": "stop",
- "stopwords": "_swedish_"
- },
- "swedish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "exempel"
- ]
- },
- "swedish_stemmer": {
- "type": "stemmer",
- "language": "swedish"
- }
- },
- "analyzer": {
- "rebuilt_swedish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "swedish_stop",
- "swedish_keywords",
- "swedish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "swedish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1743
- },
- "digest": "103296e16b4233926ad1f07360385606",
- "lang": "console",
- "found": [],
- "source": "PUT /turkish_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"turkish_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_turkish_\" <1>\n },\n \"turkish_lowercase\": {\n \"type\": \"lowercase\",\n \"language\": \"turkish\"\n },\n \"turkish_keywords\": {\n \"type\": \"keyword_marker\",\n \"keywords\": [\"örnek\"] <2>\n },\n \"turkish_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"turkish\"\n }\n },\n \"analyzer\": {\n \"rebuilt_turkish\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"apostrophe\",\n \"turkish_lowercase\",\n \"turkish_stop\",\n \"turkish_keywords\",\n \"turkish_stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/turkish_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "turkish_stop": {
- "type": "stop",
- "stopwords": "_turkish_"
- },
- "turkish_lowercase": {
- "type": "lowercase",
- "language": "turkish"
- },
- "turkish_keywords": {
- "type": "keyword_marker",
- "keywords": [
- "örnek"
- ]
- },
- "turkish_stemmer": {
- "type": "stemmer",
- "language": "turkish"
- }
- },
- "analyzer": {
- "rebuilt_turkish": {
- "tokenizer": "standard",
- "filter": [
- "apostrophe",
- "turkish_lowercase",
- "turkish_stop",
- "turkish_keywords",
- "turkish_stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "turkish_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/lang-analyzer.asciidoc",
- "line": 1796
- },
- "digest": "346f28d82acb5427c304aa574fea0008",
- "lang": "console",
- "found": [],
- "source": "PUT /thai_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"thai_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_thai_\" <1>\n }\n },\n \"analyzer\": {\n \"rebuilt_thai\": {\n \"tokenizer\": \"thai\",\n \"filter\": [\n \"lowercase\",\n \"decimal_digit\",\n \"thai_stop\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/thai_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "thai_stop": {
- "type": "stop",
- "stopwords": "_thai_"
- }
- },
- "analyzer": {
- "rebuilt_thai": {
- "tokenizer": "thai",
- "filter": [
- "lowercase",
- "decimal_digit",
- "thai_stop"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "thai_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/pattern-analyzer.asciidoc",
- "line": 29
- },
- "digest": "467833bd44b35a89a7fe0d7df5f253f1",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"pattern\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "pattern",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/pattern-analyzer.asciidoc",
- "line": 180
- },
- "digest": "314851d590d195015a76866b92cf6b32",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_email_analyzer\": {\n \"type\": \"pattern\",\n \"pattern\": \"\\\\W|_\", <1>\n \"lowercase\": true\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_email_analyzer\",\n \"text\": \"John_Smith@foo-bar.com\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_email_analyzer": {
- "type": "pattern",
- "pattern": "\\W|_",
- "lowercase": true
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_email_analyzer",
- "text": "John_Smith@foo-bar.com"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/pattern-analyzer.asciidoc",
- "line": 267
- },
- "digest": "9e2f7b134ac7c5e7c0119866b7a96700",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"camel\": {\n \"type\": \"pattern\",\n \"pattern\": \"([^\\\\p{L}\\\\d]+)|(?<=\\\\D)(?=\\\\d)|(?<=\\\\d)(?=\\\\D)|(?<=[\\\\p{L}&&[^\\\\p{Lu}]])(?=\\\\p{Lu})|(?<=\\\\p{Lu})(?=\\\\p{Lu}[\\\\p{L}&&[^\\\\p{Lu}]])\"\n }\n }\n }\n }\n}\n\nGET my_index/_analyze\n{\n \"analyzer\": \"camel\",\n \"text\": \"MooseX::FTPClass2_beta\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "camel": {
- "type": "pattern",
- "pattern": "([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "GET",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "camel",
- "text": "MooseX::FTPClass2_beta"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/pattern-analyzer.asciidoc",
- "line": 385
- },
- "digest": "f453e14bcf30853e57618bf12f83e148",
- "lang": "console",
- "found": [],
- "source": "PUT /pattern_example\n{\n \"settings\": {\n \"analysis\": {\n \"tokenizer\": {\n \"split_on_non_word\": {\n \"type\": \"pattern\",\n \"pattern\": \"\\\\W+\" <1>\n }\n },\n \"analyzer\": {\n \"rebuilt_pattern\": {\n \"tokenizer\": \"split_on_non_word\",\n \"filter\": [\n \"lowercase\" <2>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/pattern_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "tokenizer": {
- "split_on_non_word": {
- "type": "pattern",
- "pattern": "\\W+"
- }
- },
- "analyzer": {
- "rebuilt_pattern": {
- "tokenizer": "split_on_non_word",
- "filter": [
- "lowercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "pattern_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/simple-analyzer.asciidoc",
- "line": 15
- },
- "digest": "1ea24f67fbbb6293d53caf2fe0c4b984",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"simple\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "simple",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/simple-analyzer.asciidoc",
- "line": 134
- },
- "digest": "27bb04d77cbaab09d25fed6dec70835e",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_custom_simple_analyzer\": {\n \"tokenizer\": \"lowercase\",\n \"filter\": [ <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_custom_simple_analyzer": {
- "tokenizer": "lowercase",
- "filter": []
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/standard-analyzer.asciidoc",
- "line": 17
- },
- "digest": "6884454f57c3a41059037ea762f48d77",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"standard\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "standard",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/standard-analyzer.asciidoc",
- "line": 154
- },
- "digest": "5af5d2999833b6b1fdcd84404751a7e3",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_english_analyzer\": {\n \"type\": \"standard\",\n \"max_token_length\": 5,\n \"stopwords\": \"_english_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_english_analyzer\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_english_analyzer": {
- "type": "standard",
- "max_token_length": 5,
- "stopwords": "_english_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_english_analyzer",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/standard-analyzer.asciidoc",
- "line": 284
- },
- "digest": "ccf84c1e5e5602a9e841cb8f7e3bb29f",
- "lang": "console",
- "found": [],
- "source": "PUT /standard_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"rebuilt_standard\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\" <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/standard_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "rebuilt_standard": {
- "tokenizer": "standard",
- "filter": [
- "lowercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "standard_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/stop-analyzer.asciidoc",
- "line": 15
- },
- "digest": "42d02087f1c8ab0452ef373079a76843",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"stop\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "stop",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/stop-analyzer.asciidoc",
- "line": 133
- },
- "digest": "5a676e5f09ba584408ce6ecacda13d1d",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_stop_analyzer\": {\n \"type\": \"stop\",\n \"stopwords\": [\"the\", \"over\"]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_stop_analyzer\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_stop_analyzer": {
- "type": "stop",
- "stopwords": [
- "the",
- "over"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_stop_analyzer",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/stop-analyzer.asciidoc",
- "line": 249
- },
- "digest": "42deb4fe32afbe0f94185e256a79c447",
- "lang": "console",
- "found": [],
- "source": "PUT /stop_example\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"english_stop\": {\n \"type\": \"stop\",\n \"stopwords\": \"_english_\" <1>\n }\n },\n \"analyzer\": {\n \"rebuilt_stop\": {\n \"tokenizer\": \"lowercase\",\n \"filter\": [\n \"english_stop\" <2>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/stop_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": "_english_"
- }
- },
- "analyzer": {
- "rebuilt_stop": {
- "tokenizer": "lowercase",
- "filter": [
- "english_stop"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "stop_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/whitespace-analyzer.asciidoc",
- "line": 14
- },
- "digest": "262a778d754add491fbc9c721ac25bf0",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"analyzer\": \"whitespace\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "whitespace",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/analyzers/whitespace-analyzer.asciidoc",
- "line": 131
- },
- "digest": "31aed390c30bd4f42a5c56253695e53f",
- "lang": "console",
- "found": [],
- "source": "PUT /whitespace_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"rebuilt_whitespace\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/whitespace_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "rebuilt_whitespace": {
- "tokenizer": "whitespace",
- "filter": []
- }
- }
- }
- }
- },
- "params": {
- "index": "whitespace_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/chargroup-tokenizer.asciidoc",
- "line": 33
- },
- "digest": "f8cafb1a08bc9b2dd5239f99d4e93f4c",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": {\n \"type\": \"char_group\",\n \"tokenize_on_chars\": [\n \"whitespace\",\n \"-\",\n \"\\n\"\n ]\n },\n \"text\": \"The QUICK brown-fox\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": {
- "type": "char_group",
- "tokenize_on_chars": [
- "whitespace",
- "-",
- "\n"
- ]
- },
- "text": "The QUICK brown-fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/chargroup-tokenizer.asciidoc",
- "line": 51
- },
- "digest": "f3ac0bc5ecf9995f51d22f6fb2ec1afa",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"The\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0\n },\n {\n \"token\": \"QUICK\",\n \"start_offset\": 4,\n \"end_offset\": 9,\n \"type\": \"word\",\n \"position\": 1\n },\n {\n \"token\": \"brown\",\n \"start_offset\": 10,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2\n },\n {\n \"token\": \"fox\",\n \"start_offset\": 16,\n \"end_offset\": 19,\n \"type\": \"word\",\n \"position\": 3\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/classic-tokenizer.asciidoc",
- "line": 25
- },
- "digest": "c6d39d22188dc7bbfdad811a94cbcc2b",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"classic\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "classic",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/classic-tokenizer.asciidoc",
- "line": 148
- },
- "digest": "326f5bc3013c80c2ee005c676a877ecf",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"classic\",\n \"max_token_length\": 5\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "classic",
- "max_token_length": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/edgengram-tokenizer.asciidoc",
- "line": 28
- },
- "digest": "a512e4dd8880ce0395937db1bab1d205",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"edge_ngram\",\n \"text\": \"Quick Fox\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "edge_ngram",
- "text": "Quick Fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/edgengram-tokenizer.asciidoc",
- "line": 144
- },
- "digest": "a61389da4033bd7b73a63ff2ee258125",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 2,\n \"max_gram\": 10,\n \"token_chars\": [\n \"letter\",\n \"digit\"\n ]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"2 Quick Foxes.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "edge_ngram",
- "min_gram": 2,
- "max_gram": 10,
- "token_chars": [
- "letter",
- "digit"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "2 Quick Foxes."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/edgengram-tokenizer.asciidoc",
- "line": 264
- },
- "digest": "b8893e8f2b1aea4b093e0c4f037cfff7",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"autocomplete\": {\n \"tokenizer\": \"autocomplete\",\n \"filter\": [\n \"lowercase\"\n ]\n },\n \"autocomplete_search\": {\n \"tokenizer\": \"lowercase\"\n }\n },\n \"tokenizer\": {\n \"autocomplete\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 2,\n \"max_gram\": 10,\n \"token_chars\": [\n \"letter\"\n ]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"analyzer\": \"autocomplete\",\n \"search_analyzer\": \"autocomplete_search\"\n }\n }\n }\n}\n\nPUT my_index/_doc/1\n{\n \"title\": \"Quick Foxes\" <1>\n}\n\nPOST my_index/_refresh\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"title\": {\n \"query\": \"Quick Fo\", <2>\n \"operator\": \"and\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "autocomplete": {
- "tokenizer": "autocomplete",
- "filter": [
- "lowercase"
- ]
- },
- "autocomplete_search": {
- "tokenizer": "lowercase"
- }
- },
- "tokenizer": {
- "autocomplete": {
- "type": "edge_ngram",
- "min_gram": 2,
- "max_gram": 10,
- "token_chars": [
- "letter"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "analyzer": "autocomplete",
- "search_analyzer": "autocomplete_search"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": null,
- "body": {
- "title": "Quick Foxes"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/my_index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.refresh"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "title": {
- "query": "Quick Fo",
- "operator": "and"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/keyword-tokenizer.asciidoc",
- "line": 15
- },
- "digest": "09a44b619a99f6bf3f01bd5e258fd22d",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"keyword\",\n \"text\": \"New York\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "text": "New York"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/keyword-tokenizer.asciidoc",
- "line": 61
- },
- "digest": "c95d5317525c2ff625e6971c277247af",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"keyword\",\n \"filter\": [ \"lowercase\" ],\n \"text\": \"john.SMITH@example.COM\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "filter": [
- "lowercase"
- ],
- "text": "john.SMITH@example.COM"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/letter-tokenizer.asciidoc",
- "line": 16
- },
- "digest": "76448aaaaa2c352bb6e09d2f83a3fbb3",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"letter\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "letter",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/lowercase-tokenizer.asciidoc",
- "line": 20
- },
- "digest": "a99bc141066ef673e35f306157750ec9",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"lowercase\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "lowercase",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/ngram-tokenizer.asciidoc",
- "line": 24
- },
- "digest": "39963032d423e2f20f53c4621b6ca3c6",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"ngram\",\n \"text\": \"Quick Fox\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "ngram",
- "text": "Quick Fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/ngram-tokenizer.asciidoc",
- "line": 220
- },
- "digest": "9efcafd1f28490fd658d88df7d93c66c",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"ngram\",\n \"min_gram\": 3,\n \"max_gram\": 3,\n \"token_chars\": [\n \"letter\",\n \"digit\"\n ]\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"2 Quick Foxes.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "ngram",
- "min_gram": 3,
- "max_gram": 3,
- "token_chars": [
- "letter",
- "digit"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "2 Quick Foxes."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 15
- },
- "digest": "dc4dcfeae8a5f248639335c2c9809549",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"path_hierarchy\",\n \"text\": \"/one/two/three\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "path_hierarchy",
- "text": "/one/two/three"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 96
- },
- "digest": "fcc35d56dff0291bcf3663830ce99254",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"path_hierarchy\",\n \"delimiter\": \"-\",\n \"replacement\": \"/\",\n \"skip\": 2\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"one-two-three-four-five\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "path_hierarchy",
- "delimiter": "-",
- "replacement": "/",
- "skip": 2
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "one-two-three-four-five"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 191
- },
- "digest": "840b6c5c3d9c56aed854cfab8da04486",
- "lang": "console",
- "found": [],
- "source": "PUT file-path-test\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"custom_path_tree\": {\n \"tokenizer\": \"custom_hierarchy\"\n },\n \"custom_path_tree_reversed\": {\n \"tokenizer\": \"custom_hierarchy_reversed\"\n }\n },\n \"tokenizer\": {\n \"custom_hierarchy\": {\n \"type\": \"path_hierarchy\",\n \"delimiter\": \"/\"\n },\n \"custom_hierarchy_reversed\": {\n \"type\": \"path_hierarchy\",\n \"delimiter\": \"/\",\n \"reverse\": \"true\"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"file_path\": {\n \"type\": \"text\",\n \"fields\": {\n \"tree\": {\n \"type\": \"text\",\n \"analyzer\": \"custom_path_tree\"\n },\n \"tree_reversed\": {\n \"type\": \"text\",\n \"analyzer\": \"custom_path_tree_reversed\"\n }\n }\n }\n }\n }\n}\n\nPOST file-path-test/_doc/1\n{\n \"file_path\": \"/User/alice/photos/2017/05/16/my_photo1.jpg\"\n}\n\nPOST file-path-test/_doc/2\n{\n \"file_path\": \"/User/alice/photos/2017/05/16/my_photo2.jpg\"\n}\n\nPOST file-path-test/_doc/3\n{\n \"file_path\": \"/User/alice/photos/2017/05/16/my_photo3.jpg\"\n}\n\nPOST file-path-test/_doc/4\n{\n \"file_path\": \"/User/alice/photos/2017/05/15/my_photo1.jpg\"\n}\n\nPOST file-path-test/_doc/5\n{\n \"file_path\": \"/User/bob/photos/2017/05/16/my_photo1.jpg\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/file-path-test",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "custom_path_tree": {
- "tokenizer": "custom_hierarchy"
- },
- "custom_path_tree_reversed": {
- "tokenizer": "custom_hierarchy_reversed"
- }
- },
- "tokenizer": {
- "custom_hierarchy": {
- "type": "path_hierarchy",
- "delimiter": "/"
- },
- "custom_hierarchy_reversed": {
- "type": "path_hierarchy",
- "delimiter": "/",
- "reverse": "true"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "file_path": {
- "type": "text",
- "fields": {
- "tree": {
- "type": "text",
- "analyzer": "custom_path_tree"
- },
- "tree_reversed": {
- "type": "text",
- "analyzer": "custom_path_tree_reversed"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/1",
- "query": null,
- "body": {
- "file_path": "/User/alice/photos/2017/05/16/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/2",
- "query": null,
- "body": {
- "file_path": "/User/alice/photos/2017/05/16/my_photo2.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/3",
- "query": null,
- "body": {
- "file_path": "/User/alice/photos/2017/05/16/my_photo3.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/4",
- "query": null,
- "body": {
- "file_path": "/User/alice/photos/2017/05/15/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "4"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_doc/5",
- "query": null,
- "body": {
- "file_path": "/User/bob/photos/2017/05/16/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test",
- "id": "5"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 269
- },
- "digest": "bd767ea03171fe71c73f58f16d5da92f",
- "lang": "console",
- "found": [],
- "source": "GET file-path-test/_search\n{\n \"query\": {\n \"match\": {\n \"file_path\": \"/User/bob/photos/2017/05\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/file-path-test/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "file_path": "/User/bob/photos/2017/05"
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 285
- },
- "digest": "b724f547c5d67e95bbc0a9920e47033c",
- "lang": "console",
- "found": [],
- "source": "GET file-path-test/_search\n{\n \"query\": {\n \"term\": {\n \"file_path.tree\": \"/User/alice/photos/2017/05/16\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/file-path-test/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "file_path.tree": "/User/alice/photos/2017/05/16"
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 305
- },
- "digest": "f1dc6f69453867ffafe86e998dd464d9",
- "lang": "console",
- "found": [],
- "source": "GET file-path-test/_search\n{\n \"query\": {\n \"term\": {\n \"file_path.tree_reversed\": {\n \"value\": \"my_photo1.jpg\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/file-path-test/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "file_path.tree_reversed": {
- "value": "my_photo1.jpg"
- }
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 324
- },
- "digest": "acc52da725a996ae696b00d9f818dfde",
- "lang": "console",
- "found": [],
- "source": "POST file-path-test/_analyze\n{\n \"analyzer\": \"custom_path_tree\",\n \"text\": \"/User/alice/photos/2017/05/16/my_photo1.jpg\"\n}\n\nPOST file-path-test/_analyze\n{\n \"analyzer\": \"custom_path_tree_reversed\",\n \"text\": \"/User/alice/photos/2017/05/16/my_photo1.jpg\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/file-path-test/_analyze",
- "query": null,
- "body": {
- "analyzer": "custom_path_tree",
- "text": "/User/alice/photos/2017/05/16/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "indices.analyze"
- },
- {
- "method": "POST",
- "url": "/file-path-test/_analyze",
- "query": null,
- "body": {
- "analyzer": "custom_path_tree_reversed",
- "text": "/User/alice/photos/2017/05/16/my_photo1.jpg"
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pathhierarchy-tokenizer.asciidoc",
- "line": 345
- },
- "digest": "4bba59cf745ac7b996bf90308bc26957",
- "lang": "console",
- "found": [],
- "source": "GET file-path-test/_search\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"match\" : { \"file_path\" : \"16\" }\n },\n \"filter\": {\n \"term\" : { \"file_path.tree\" : \"/User/alice\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/file-path-test/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "file_path": "16"
- }
- },
- "filter": {
- "term": {
- "file_path.tree": "/User/alice"
- }
- }
- }
- }
- },
- "params": {
- "index": "file-path-test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pattern-tokenizer.asciidoc",
- "line": 32
- },
- "digest": "1a6dbe5df488c4a16e2f1101ba8a25d9",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"pattern\",\n \"text\": \"The foo_bar_size's default is 5.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "pattern",
- "text": "The foo_bar_size's default is 5."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pattern-tokenizer.asciidoc",
- "line": 128
- },
- "digest": "448339a39d847c4cac57a325e23c2a5a",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"pattern\",\n \"pattern\": \",\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"comma,separated,values\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "pattern",
- "pattern": ","
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "comma,separated,values"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/pattern-tokenizer.asciidoc",
- "line": 216
- },
- "digest": "fa8d64d622b4d7fe3234924b4de4f0bf",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"pattern\",\n \"pattern\": \"\\\"((?:\\\\\\\\\\\"|[^\\\"]|\\\\\\\\\\\")+)\\\"\",\n \"group\": 1\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"\\\"value\\\", \\\"value with embedded \\\\\\\" quote\\\"\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "pattern",
- "pattern": "\"((?:\\\\\"|[^\"]|\\\\\")+)\"",
- "group": 1
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "\"value\", \"value with embedded \\\" quote\""
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/simplepattern-tokenizer.asciidoc",
- "line": 39
- },
- "digest": "9ffc049d5c5a570b90d913e92f910ee4",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"simple_pattern\",\n \"pattern\": \"[0123456789]{3}\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"fd-786-335-514-x\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "simple_pattern",
- "pattern": "[0123456789]{3}"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "fd-786-335-514-x"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/simplepatternsplit-tokenizer.asciidoc",
- "line": 40
- },
- "digest": "5c28bb67716ed2bbe03c1d5d3733cb42",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"simple_pattern_split\",\n \"pattern\": \"_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"an_underscored_phrase\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "simple_pattern_split",
- "pattern": "_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "an_underscored_phrase"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/standard-tokenizer.asciidoc",
- "line": 16
- },
- "digest": "88a08d0b15ef41324f5c23db533d47d1",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"standard\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/standard-tokenizer.asciidoc",
- "line": 139
- },
- "digest": "7375d4fe72c848ee3b0a799fda8bb0f0",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"standard\",\n \"max_token_length\": 5\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "standard",
- "max_token_length": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/thai-tokenizer.asciidoc",
- "line": 20
- },
- "digest": "a1e5f3956f9a697e79478fc9a6e30e1f",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"thai\",\n \"text\": \"การที่ได้ต้องแสดงว่างานดี\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "thai",
- "text": "การที่ได้ต้องแสดงว่างานดี"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/uaxurlemail-tokenizer.asciidoc",
- "line": 14
- },
- "digest": "d12df43ffcdcd937bae9b26fb475e239",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"uax_url_email\",\n \"text\": \"Email me at john.smith@global-international.com\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "uax_url_email",
- "text": "Email me at john.smith@global-international.com"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/uaxurlemail-tokenizer.asciidoc",
- "line": 95
- },
- "digest": "1125986e8e55028ff4c10b5e6c7bbebb",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"my_tokenizer\"\n }\n },\n \"tokenizer\": {\n \"my_tokenizer\": {\n \"type\": \"uax_url_email\",\n \"max_token_length\": 5\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"john.smith@global-international.com\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "my_tokenizer"
- }
- },
- "tokenizer": {
- "my_tokenizer": {
- "type": "uax_url_email",
- "max_token_length": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "john.smith@global-international.com"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenizers/whitespace-tokenizer.asciidoc",
- "line": 14
- },
- "digest": "7b9dfe5857bde1bd8483ea3241656714",
- "lang": "console",
- "found": [],
- "source": "POST _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"text\": \"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/apostrophe-tokenfilter.asciidoc",
- "line": 22
- },
- "digest": "3343a4cf559060c422d86c786a95e535",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"apostrophe\"],\n \"text\" : \"Istanbul'a veya Istanbul'dan\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "apostrophe"
- ],
- "text": "Istanbul'a veya Istanbul'dan"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/apostrophe-tokenfilter.asciidoc",
- "line": 77
- },
- "digest": "da19e4ecfabcbabdc894687106eaccdc",
- "lang": "console",
- "found": [],
- "source": "PUT /apostrophe_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_apostrophe\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"apostrophe\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/apostrophe_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_apostrophe": {
- "tokenizer": "standard",
- "filter": [
- "apostrophe"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "apostrophe_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/asciifolding-tokenfilter.asciidoc",
- "line": 21
- },
- "digest": "00d65f7b9daa1c6b18eedd8ace206bae",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"asciifolding\"],\n \"text\" : \"açaí à la carte\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "asciifolding"
- ],
- "text": "açaí à la carte"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/asciifolding-tokenfilter.asciidoc",
- "line": 83
- },
- "digest": "a976bdf566730e35c5277740c1e3a7f2",
- "lang": "console",
- "found": [],
- "source": "PUT /asciifold_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_asciifolding\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"asciifolding\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/asciifold_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_asciifolding": {
- "tokenizer": "standard",
- "filter": [
- "asciifolding"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "asciifold_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/asciifolding-tokenfilter.asciidoc",
- "line": 118
- },
- "digest": "c5a0248213307f8e036a26e3294ad611",
- "lang": "console",
- "found": [],
- "source": "PUT /asciifold_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_asciifolding\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"my_ascii_folding\"]\n }\n },\n \"filter\" : {\n \"my_ascii_folding\" : {\n \"type\" : \"asciifolding\",\n \"preserve_original\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/asciifold_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_asciifolding": {
- "tokenizer": "standard",
- "filter": [
- "my_ascii_folding"
- ]
- }
- },
- "filter": {
- "my_ascii_folding": {
- "type": "asciifolding",
- "preserve_original": true
- }
- }
- }
- }
- },
- "params": {
- "index": "asciifold_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-bigram-tokenfilter.asciidoc",
- "line": 22
- },
- "digest": "b8c03bbd917d0cf5474a3e46ebdd7aad",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"cjk_bigram\"],\n \"text\" : \"東京都は、日本の首都であり\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "cjk_bigram"
- ],
- "text": "東京都は、日本の首都であり"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-bigram-tokenfilter.asciidoc",
- "line": 126
- },
- "digest": "7230edf3a8cdb5e4091fad668b4049dc",
- "lang": "console",
- "found": [],
- "source": "PUT /cjk_bigram_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_cjk_bigram\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"cjk_bigram\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/cjk_bigram_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_cjk_bigram": {
- "tokenizer": "standard",
- "filter": [
- "cjk_bigram"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "cjk_bigram_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-bigram-tokenfilter.asciidoc",
- "line": 176
- },
- "digest": "6b328ac5a63ac7f26b011a6905083934",
- "lang": "console",
- "found": [],
- "source": "PUT /cjk_bigram_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"han_bigrams\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"han_bigrams_filter\"]\n }\n },\n \"filter\" : {\n \"han_bigrams_filter\" : {\n \"type\" : \"cjk_bigram\",\n \"ignored_scripts\": [\n \"hangul\",\n \"hiragana\",\n \"katakana\"\n ],\n \"output_unigrams\" : true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/cjk_bigram_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "han_bigrams": {
- "tokenizer": "standard",
- "filter": [
- "han_bigrams_filter"
- ]
- }
- },
- "filter": {
- "han_bigrams_filter": {
- "type": "cjk_bigram",
- "ignored_scripts": [
- "hangul",
- "hiragana",
- "katakana"
- ],
- "output_unigrams": true
- }
- }
- }
- }
- },
- "params": {
- "index": "cjk_bigram_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-width-tokenfilter.asciidoc",
- "line": 28
- },
- "digest": "76b279835936ee4b546a171c671c3cd7",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"cjk_width\"],\n \"text\" : \"シーサイドライナー\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "cjk_width"
- ],
- "text": "シーサイドライナー"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/cjk-width-tokenfilter.asciidoc",
- "line": 69
- },
- "digest": "3df1aa197f7498a534b0536f49aea28b",
- "lang": "console",
- "found": [],
- "source": "PUT /cjk_width_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_cjk_width\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"cjk_width\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/cjk_width_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_cjk_width": {
- "tokenizer": "standard",
- "filter": [
- "cjk_width"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "cjk_width_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/classic-tokenfilter.asciidoc",
- "line": 21
- },
- "digest": "c8bbf362f06a0d8dab33ec0d99743343",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"classic\",\n \"filter\" : [\"classic\"],\n \"text\" : \"The 2 Q.U.I.C.K. Brown-Foxes jumped over the lazy dog's bone.\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "classic",
- "filter": [
- "classic"
- ],
- "text": "The 2 Q.U.I.C.K. Brown-Foxes jumped over the lazy dog's bone."
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/classic-tokenfilter.asciidoc",
- "line": 132
- },
- "digest": "50952b8040f875ce3719c71ca1c3bc8f",
- "lang": "console",
- "found": [],
- "source": "PUT /classic_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"classic_analyzer\" : {\n \"tokenizer\" : \"classic\",\n \"filter\" : [\"classic\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/classic_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "classic_analyzer": {
- "tokenizer": "classic",
- "filter": [
- "classic"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "classic_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/common-grams-tokenfilter.asciidoc",
- "line": 28
- },
- "digest": "2fd0b3c132b46aa34cc9d92dd2d4bc85",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\n {\n \"type\": \"common_grams\",\n \"common_words\": [\"is\", \"the\"]\n }\n ],\n \"text\" : \"the quick fox is brown\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "common_grams",
- "common_words": [
- "is",
- "the"
- ]
- }
- ],
- "text": "the quick fox is brown"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/common-grams-tokenfilter.asciidoc",
- "line": 126
- },
- "digest": "63de16d533d65708cf794eb50da02fbd",
- "lang": "console",
- "found": [],
- "source": "PUT /common_grams_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"index_grams\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [\"common_grams\"]\n }\n },\n \"filter\": {\n \"common_grams\": {\n \"type\": \"common_grams\",\n \"common_words\": [\"a\", \"is\", \"the\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/common_grams_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "index_grams": {
- "tokenizer": "whitespace",
- "filter": [
- "common_grams"
- ]
- }
- },
- "filter": {
- "common_grams": {
- "type": "common_grams",
- "common_words": [
- "a",
- "is",
- "the"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "common_grams_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/common-grams-tokenfilter.asciidoc",
- "line": 206
- },
- "digest": "d2d5a5fa4ab40787db87c85e1dd2bd06",
- "lang": "console",
- "found": [],
- "source": "PUT /common_grams_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"index_grams\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [\"common_grams_query\"]\n }\n },\n \"filter\": {\n \"common_grams_query\": {\n \"type\": \"common_grams\",\n \"common_words\": [\"a\", \"is\", \"the\"],\n \"ignore_case\": true,\n \"query_mode\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/common_grams_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "index_grams": {
- "tokenizer": "whitespace",
- "filter": [
- "common_grams_query"
- ]
- }
- },
- "filter": {
- "common_grams_query": {
- "type": "common_grams",
- "common_words": [
- "a",
- "is",
- "the"
- ],
- "ignore_case": true,
- "query_mode": true
- }
- }
- }
- }
- },
- "params": {
- "index": "common_grams_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/condition-tokenfilter.asciidoc",
- "line": 22
- },
- "digest": "09944369863fd8666d5301d717317276",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"condition\",\n \"filter\": [ \"lowercase\" ],\n \"script\": {\n \"source\": \"token.getTerm().length() < 5\"\n }\n }\n ],\n \"text\": \"THE QUICK BROWN FOX\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "condition",
- "filter": [
- "lowercase"
- ],
- "script": {
- "source": "token.getTerm().length() < 5"
- }
- }
- ],
- "text": "THE QUICK BROWN FOX"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/condition-tokenfilter.asciidoc",
- "line": 125
- },
- "digest": "a197076e0e74951ea88f20309ec257e2",
- "lang": "console",
- "found": [],
- "source": "PUT /palindrome_list\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_reverse_first_token\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"reverse_first_token\" ]\n }\n },\n \"filter\": {\n \"reverse_first_token\": {\n \"type\": \"condition\",\n \"filter\": [ \"reverse\" ],\n \"script\": {\n \"source\": \"token.getPosition() === 0\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/palindrome_list",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_reverse_first_token": {
- "tokenizer": "whitespace",
- "filter": [
- "reverse_first_token"
- ]
- }
- },
- "filter": {
- "reverse_first_token": {
- "type": "condition",
- "filter": [
- "reverse"
- ],
- "script": {
- "source": "token.getPosition() === 0"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "palindrome_list"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/decimal-digit-tokenfilter.asciidoc",
- "line": 20
- },
- "digest": "a21319c9eff1ac47d7fe7490f1ef2efa",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"decimal_digit\"],\n \"text\" : \"१-one two-२ ३\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "decimal_digit"
- ],
- "text": "१-one two-२ ३"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/decimal-digit-tokenfilter.asciidoc",
- "line": 75
- },
- "digest": "121b8bc28620095dfa570a989bcdb04e",
- "lang": "console",
- "found": [],
- "source": "PUT /decimal_digit_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_decimal_digit\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"decimal_digit\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/decimal_digit_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_decimal_digit": {
- "tokenizer": "whitespace",
- "filter": [
- "decimal_digit"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "decimal_digit_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 47
- },
- "digest": "7dc82f7d36686fd57a47e34cbda39a4e",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\"delimited_payload\"],\n \"text\": \"the|0 brown|10 fox|5 is|0 quick|10\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "delimited_payload"
- ],
- "text": "the|0 brown|10 fox|5 is|0 quick|10"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 120
- },
- "digest": "d443db2755fde3b49ca3a9d296c4a96f",
- "lang": "console",
- "found": [],
- "source": "PUT delimited_payload\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_delimited_payload\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"delimited_payload\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/delimited_payload",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_delimited_payload": {
- "tokenizer": "whitespace",
- "filter": [
- "delimited_payload"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "delimited_payload"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 173
- },
- "digest": "27f9f604e7a48799fa30529cbc0ff619",
- "lang": "console",
- "found": [],
- "source": "PUT delimited_payload_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_plus_delimited\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"plus_delimited\" ]\n }\n },\n \"filter\": {\n \"plus_delimited\": {\n \"type\": \"delimited_payload\",\n \"delimiter\": \"+\",\n \"encoding\": \"int\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/delimited_payload_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_plus_delimited": {
- "tokenizer": "whitespace",
- "filter": [
- "plus_delimited"
- ]
- }
- },
- "filter": {
- "plus_delimited": {
- "type": "delimited_payload",
- "delimiter": "+",
- "encoding": "int"
- }
- }
- }
- }
- },
- "params": {
- "index": "delimited_payload_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 206
- },
- "digest": "50c2cea2adbe9523458c2686ab11df54",
- "lang": "console",
- "found": [],
- "source": "PUT text_payloads\n{\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"term_vector\": \"with_positions_payloads\",\n \"analyzer\": \"payload_delimiter\"\n }\n }\n },\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"payload_delimiter\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"delimited_payload\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/text_payloads",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "term_vector": "with_positions_payloads",
- "analyzer": "payload_delimiter"
- }
- }
- },
- "settings": {
- "analysis": {
- "analyzer": {
- "payload_delimiter": {
- "tokenizer": "whitespace",
- "filter": [
- "delimited_payload"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "text_payloads"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 234
- },
- "digest": "d2f6fb271e97fde8685d7744e6718cc7",
- "lang": "console",
- "found": [],
- "source": "POST text_payloads/_doc/1\n{\n \"text\": \"the|0 brown|3 fox|4 is|0 quick|10\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/text_payloads/_doc/1",
- "query": null,
- "body": {
- "text": "the|0 brown|3 fox|4 is|0 quick|10"
- },
- "params": {
- "index": "text_payloads",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 246
- },
- "digest": "b24a374c0ad264abbcacb5686f5ed61c",
- "lang": "console",
- "found": [],
- "source": "GET text_payloads/_termvectors/1\n{\n \"fields\": [ \"text\" ],\n \"payloads\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/text_payloads/_termvectors/1",
- "query": null,
- "body": {
- "fields": [
- "text"
- ],
- "payloads": true
- },
- "params": {
- "index": "text_payloads",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/delimited-payload-tokenfilter.asciidoc",
- "line": 258
- },
- "digest": "82a0b9e193b65de0a1c71288328f5f3d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"text_payloads\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"found\": true,\n \"took\": 8,\n \"term_vectors\": {\n \"text\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 5,\n \"doc_count\": 1,\n \"sum_ttf\": 5\n },\n \"terms\": {\n \"brown\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 1,\n \"payload\": \"QEAAAA==\"\n }\n ]\n },\n \"fox\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 2,\n \"payload\": \"QIAAAA==\"\n }\n ]\n },\n \"is\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 3,\n \"payload\": \"AAAAAA==\"\n }\n ]\n },\n \"quick\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 4,\n \"payload\": \"QSAAAA==\"\n }\n ]\n },\n \"the\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 0,\n \"payload\": \"AAAAAA==\"\n }\n ]\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/dictionary-decompounder-tokenfilter.asciidoc",
- "line": 32
- },
- "digest": "3fecd5c6d0c172566da4a54320e1cff3",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"dictionary_decompounder\",\n \"word_list\": [\"Donau\", \"dampf\", \"meer\", \"schiff\"]\n }\n ],\n \"text\": \"Donaudampfschiff\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "dictionary_decompounder",
- "word_list": [
- "Donau",
- "dampf",
- "meer",
- "schiff"
- ]
- }
- ],
- "text": "Donaudampfschiff"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/dictionary-decompounder-tokenfilter.asciidoc",
- "line": 152
- },
- "digest": "a5a5fb129de2f492e8fd33043a73439c",
- "lang": "console",
- "found": [],
- "source": "PUT dictionary_decompound_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_dictionary_decompound\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"22_char_dictionary_decompound\" ]\n }\n },\n \"filter\": {\n \"22_char_dictionary_decompound\": {\n \"type\": \"dictionary_decompounder\",\n \"word_list_path\": \"analysis/example_word_list.txt\",\n \"max_subword_size\": 22\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/dictionary_decompound_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_dictionary_decompound": {
- "tokenizer": "standard",
- "filter": [
- "22_char_dictionary_decompound"
- ]
- }
- },
- "filter": {
- "22_char_dictionary_decompound": {
- "type": "dictionary_decompounder",
- "word_list_path": "analysis/example_word_list.txt",
- "max_subword_size": 22
- }
- }
- }
- }
- },
- "params": {
- "index": "dictionary_decompound_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/edgengram-tokenfilter.asciidoc",
- "line": 34
- },
- "digest": "6dbfe5565a95508e65d304131847f9fc",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n { \"type\": \"edge_ngram\",\n \"min_gram\": 1,\n \"max_gram\": 2\n }\n ],\n \"text\": \"the quick brown fox jumps\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "edge_ngram",
- "min_gram": 1,
- "max_gram": 2
- }
- ],
- "text": "the quick brown fox jumps"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/edgengram-tokenfilter.asciidoc",
- "line": 143
- },
- "digest": "16351d99d0608789d04a0bb11a537098",
- "lang": "console",
- "found": [],
- "source": "PUT edge_ngram_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_edge_ngram\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"edge_ngram\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/edge_ngram_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_edge_ngram": {
- "tokenizer": "standard",
- "filter": [
- "edge_ngram"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "edge_ngram_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/edgengram-tokenfilter.asciidoc",
- "line": 203
- },
- "digest": "6f07152055e99416deb10e95b428b847",
- "lang": "console",
- "found": [],
- "source": "PUT edge_ngram_custom_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"3_5_edgegrams\" ]\n }\n },\n \"filter\": {\n \"3_5_edgegrams\": {\n \"type\": \"edge_ngram\",\n \"min_gram\": 3,\n \"max_gram\": 5\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/edge_ngram_custom_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "tokenizer": "whitespace",
- "filter": [
- "3_5_edgegrams"
- ]
- }
- },
- "filter": {
- "3_5_edgegrams": {
- "type": "edge_ngram",
- "min_gram": 3,
- "max_gram": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "edge_ngram_custom_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/elision-tokenfilter.asciidoc",
- "line": 34
- },
- "digest": "446e8fc8ccfb13bb5ec64e32a5676d18",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"elision\"],\n \"text\" : \"j’examine près du wharf\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "elision"
- ],
- "text": "j’examine près du wharf"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/elision-tokenfilter.asciidoc",
- "line": 96
- },
- "digest": "26d49d11bb37c3f4ef8179010e34b50e",
- "lang": "console",
- "found": [],
- "source": "PUT /elision_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_elision\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"elision\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/elision_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_elision": {
- "tokenizer": "whitespace",
- "filter": [
- "elision"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "elision_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/elision-tokenfilter.asciidoc",
- "line": 165
- },
- "digest": "fc575e08d0bc8f4cb03a54e5d57fff7b",
- "lang": "console",
- "found": [],
- "source": "PUT /elision_case_sensitive_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"default\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"elision_case_sensitive\"]\n }\n },\n \"filter\" : {\n \"elision_case_sensitive\" : {\n \"type\" : \"elision\",\n \"articles\" : [\"l\", \"m\", \"t\", \"qu\", \"n\", \"s\", \"j\"],\n \"articles_case\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/elision_case_sensitive_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "tokenizer": "whitespace",
- "filter": [
- "elision_case_sensitive"
- ]
- }
- },
- "filter": {
- "elision_case_sensitive": {
- "type": "elision",
- "articles": [
- "l",
- "m",
- "t",
- "qu",
- "n",
- "s",
- "j"
- ],
- "articles_case": true
- }
- }
- }
- }
- },
- "params": {
- "index": "elision_case_sensitive_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/fingerprint-tokenfilter.asciidoc",
- "line": 35
- },
- "digest": "df82a9cb21a7557f3ddba2509f76f608",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"fingerprint\"],\n \"text\" : \"zebra jumps over resting resting dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "fingerprint"
- ],
- "text": "zebra jumps over resting resting dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/fingerprint-tokenfilter.asciidoc",
- "line": 76
- },
- "digest": "0eb2c1284a9829224913a860190580d8",
- "lang": "console",
- "found": [],
- "source": "PUT fingerprint_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_fingerprint\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"fingerprint\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/fingerprint_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_fingerprint": {
- "tokenizer": "whitespace",
- "filter": [
- "fingerprint"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "fingerprint_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/fingerprint-tokenfilter.asciidoc",
- "line": 117
- },
- "digest": "1b0f40959a7a4d124372f2bd3f7eac85",
- "lang": "console",
- "found": [],
- "source": "PUT custom_fingerprint_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"fingerprint_plus_concat\" ]\n }\n },\n \"filter\": {\n \"fingerprint_plus_concat\": {\n \"type\": \"fingerprint\",\n \"max_output_size\": 100,\n \"separator\": \"+\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_fingerprint_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_": {
- "tokenizer": "whitespace",
- "filter": [
- "fingerprint_plus_concat"
- ]
- }
- },
- "filter": {
- "fingerprint_plus_concat": {
- "type": "fingerprint",
- "max_output_size": 100,
- "separator": "+"
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_fingerprint_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/flatten-graph-tokenfilter.asciidoc",
- "line": 39
- },
- "digest": "2c27a8eb6528126f37a843d434cd88b6",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"synonym_graph\",\n \"synonyms\": [ \"dns, domain name system\" ]\n }\n ],\n \"text\": \"domain name system is fragile\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "synonym_graph",
- "synonyms": [
- "dns, domain name system"
- ]
- }
- ],
- "text": "domain name system is fragile"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/flatten-graph-tokenfilter.asciidoc",
- "line": 118
- },
- "digest": "ef10e8d07d9fae945e035d5dee1e9754",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"synonym_graph\",\n \"synonyms\": [ \"dns, domain name system\" ]\n },\n \"flatten_graph\"\n ],\n \"text\": \"domain name system is fragile\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "synonym_graph",
- "synonyms": [
- "dns, domain name system"
- ]
- },
- "flatten_graph"
- ],
- "text": "domain name system is fragile"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/flatten-graph-tokenfilter.asciidoc",
- "line": 203
- },
- "digest": "4b6312348785cb57de3467f82ec252a5",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_custom_index_analyzer\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"my_custom_word_delimiter_graph_filter\",\n \"flatten_graph\"\n ]\n }\n },\n \"filter\": {\n \"my_custom_word_delimiter_graph_filter\": {\n \"type\": \"word_delimiter_graph\",\n \"catenate_all\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_custom_index_analyzer": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "my_custom_word_delimiter_graph_filter",
- "flatten_graph"
- ]
- }
- },
- "filter": {
- "my_custom_word_delimiter_graph_filter": {
- "type": "word_delimiter_graph",
- "catenate_all": true
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/hunspell-tokenfilter.asciidoc",
- "line": 74
- },
- "digest": "62f1ec1bb5cc5a9c2efd536a7474f549",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"hunspell\",\n \"locale\": \"en_US\"\n }\n ],\n \"text\": \"the foxes jumping quickly\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "hunspell",
- "locale": "en_US"
- }
- ],
- "text": "the foxes jumping quickly"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/hunspell-tokenfilter.asciidoc",
- "line": 203
- },
- "digest": "6c42e05f48b2c0d58860a1f3a3f63829",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"en\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"my_en_US_dict_stemmer\" ]\n }\n },\n \"filter\": {\n \"my_en_US_dict_stemmer\": {\n \"type\": \"hunspell\",\n \"locale\": \"en_US\",\n \"dedup\": false\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "en": {
- "tokenizer": "standard",
- "filter": [
- "my_en_US_dict_stemmer"
- ]
- }
- },
- "filter": {
- "my_en_US_dict_stemmer": {
- "type": "hunspell",
- "locale": "en_US",
- "dedup": false
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/hyphenation-decompounder-tokenfilter.asciidoc",
- "line": 25
- },
- "digest": "f34c02351662481dd61a5c2a3e206c60",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"hyphenation_decompounder\",\n \"hyphenation_patterns_path\": \"analysis/hyphenation_patterns.xml\",\n \"word_list\": [\"Kaffee\", \"zucker\", \"tasse\"]\n }\n ],\n \"text\": \"Kaffeetasse\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "hyphenation_decompounder",
- "hyphenation_patterns_path": "analysis/hyphenation_patterns.xml",
- "word_list": [
- "Kaffee",
- "zucker",
- "tasse"
- ]
- }
- ],
- "text": "Kaffeetasse"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/hyphenation-decompounder-tokenfilter.asciidoc",
- "line": 132
- },
- "digest": "5f8acd1e367b048b5542dbc6079bcc88",
- "lang": "console",
- "found": [],
- "source": "PUT hyphenation_decompound_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_hyphenation_decompound\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"22_char_hyphenation_decompound\" ]\n }\n },\n \"filter\": {\n \"22_char_hyphenation_decompound\": {\n \"type\": \"hyphenation_decompounder\",\n \"word_list_path\": \"analysis/example_word_list.txt\",\n \"hyphenation_patterns_path\": \"analysis/hyphenation_patterns.xml\",\n \"max_subword_size\": 22\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/hyphenation_decompound_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_hyphenation_decompound": {
- "tokenizer": "standard",
- "filter": [
- "22_char_hyphenation_decompound"
- ]
- }
- },
- "filter": {
- "22_char_hyphenation_decompound": {
- "type": "hyphenation_decompounder",
- "word_list_path": "analysis/example_word_list.txt",
- "hyphenation_patterns_path": "analysis/hyphenation_patterns.xml",
- "max_subword_size": 22
- }
- }
- }
- }
- },
- "params": {
- "index": "hyphenation_decompound_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-types-tokenfilter.asciidoc",
- "line": 38
- },
- "digest": "83cd4eb89818b4c32f654d370eafa920",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"keep_types\",\n \"types\": [ \"\" ]\n }\n ],\n \"text\": \"1 quick fox 2 lazy dogs\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "keep_types",
- "types": [
- ""
- ]
- }
- ],
- "text": "1 quick fox 2 lazy dogs"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-types-tokenfilter.asciidoc",
- "line": 91
- },
- "digest": "d94f666616dea141dcb7aaf08a35bc10",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"keep_types\",\n \"types\": [ \"\" ],\n \"mode\": \"exclude\"\n }\n ],\n \"text\": \"1 quick fox 2 lazy dogs\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "keep_types",
- "types": [
- ""
- ],
- "mode": "exclude"
- }
- ],
- "text": "1 quick fox 2 lazy dogs"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-types-tokenfilter.asciidoc",
- "line": 182
- },
- "digest": "13b02da42d3afe7f0b649e1c98ac9549",
- "lang": "console",
- "found": [],
- "source": "PUT keep_types_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"extract_alpha\" ]\n }\n },\n \"filter\": {\n \"extract_alpha\": {\n \"type\": \"keep_types\",\n \"types\": [ \"\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/keep_types_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "extract_alpha"
- ]
- }
- },
- "filter": {
- "extract_alpha": {
- "type": "keep_types",
- "types": [
- ""
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "keep_types_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-words-tokenfilter.asciidoc",
- "line": 26
- },
- "digest": "9a036a792be1d39af9fd0d1adb5f3402",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"keep\",\n \"keep_words\": [ \"dog\", \"elephant\", \"fox\" ]\n }\n ],\n \"text\": \"the quick fox jumps over the lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "keep",
- "keep_words": [
- "dog",
- "elephant",
- "fox"
- ]
- }
- ],
- "text": "the quick fox jumps over the lazy dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keep-words-tokenfilter.asciidoc",
- "line": 118
- },
- "digest": "642c0c1c76e9bf226cd216ebae9ab958",
- "lang": "console",
- "found": [],
- "source": "PUT keep_words_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_keep_word_array\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"keep_word_array\" ]\n },\n \"standard_keep_word_file\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"keep_word_file\" ]\n }\n },\n \"filter\": {\n \"keep_word_array\": {\n \"type\": \"keep\",\n \"keep_words\": [ \"one\", \"two\", \"three\" ]\n },\n \"keep_word_file\": {\n \"type\": \"keep\",\n \"keep_words_path\": \"analysis/example_word_list.txt\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/keep_words_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_keep_word_array": {
- "tokenizer": "standard",
- "filter": [
- "keep_word_array"
- ]
- },
- "standard_keep_word_file": {
- "tokenizer": "standard",
- "filter": [
- "keep_word_file"
- ]
- }
- },
- "filter": {
- "keep_word_array": {
- "type": "keep",
- "keep_words": [
- "one",
- "two",
- "three"
- ]
- },
- "keep_word_file": {
- "type": "keep",
- "keep_words_path": "analysis/example_word_list.txt"
- }
- }
- }
- }
- },
- "params": {
- "index": "keep_words_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 35
- },
- "digest": "26f237f9bf14e8b972cc33ff6aebefa2",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"stemmer\" ],\n \"text\": \"fox running and jumping\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "stemmer"
- ],
- "text": "fox running and jumping"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 95
- },
- "digest": "5302f4f2bcc0f400ff71c791e6f68d7b",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"keyword_marker\",\n \"keywords\": [ \"jumping\" ]\n },\n \"stemmer\"\n ],\n \"text\": \"fox running and jumping\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "keyword_marker",
- "keywords": [
- "jumping"
- ]
- },
- "stemmer"
- ],
- "text": "fox running and jumping"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 163
- },
- "digest": "059e04aaf093379401f665c33ac796dc",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"keyword_marker\",\n \"keywords\": [ \"jumping\" ]\n },\n \"stemmer\"\n ],\n \"text\": \"fox running and jumping\",\n \"explain\": true,\n \"attributes\": \"keyword\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "keyword_marker",
- "keywords": [
- "jumping"
- ]
- },
- "stemmer"
- ],
- "text": "fox running and jumping",
- "explain": true,
- "attributes": "keyword"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 184
- },
- "digest": "833e768e4bb608875c81988e1432f6a0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"detail\": {\n \"custom_analyzer\": true,\n \"charfilters\": [],\n \"tokenizer\": {\n \"name\": \"whitespace\",\n \"tokens\": [\n {\n \"token\": \"fox\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0\n },\n {\n \"token\": \"running\",\n \"start_offset\": 4,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1\n },\n {\n \"token\": \"and\",\n \"start_offset\": 12,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2\n },\n {\n \"token\": \"jumping\",\n \"start_offset\": 16,\n \"end_offset\": 23,\n \"type\": \"word\",\n \"position\": 3\n }\n ]\n },\n \"tokenfilters\": [\n {\n \"name\": \"__anonymous__keyword_marker\",\n \"tokens\": [\n {\n \"token\": \"fox\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0,\n \"keyword\": false\n },\n {\n \"token\": \"running\",\n \"start_offset\": 4,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1,\n \"keyword\": false\n },\n {\n \"token\": \"and\",\n \"start_offset\": 12,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2,\n \"keyword\": false\n },\n {\n \"token\": \"jumping\",\n \"start_offset\": 16,\n \"end_offset\": 23,\n \"type\": \"word\",\n \"position\": 3,\n \"keyword\": true\n }\n ]\n },\n {\n \"name\": \"stemmer\",\n \"tokens\": [\n {\n \"token\": \"fox\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0,\n \"keyword\": false\n },\n {\n \"token\": \"run\",\n \"start_offset\": 4,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1,\n \"keyword\": false\n },\n {\n \"token\": \"and\",\n \"start_offset\": 12,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2,\n \"keyword\": false\n },\n {\n \"token\": \"jumping\",\n \"start_offset\": 16,\n \"end_offset\": 23,\n \"type\": \"word\",\n \"position\": 3,\n \"keyword\": true\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-marker-tokenfilter.asciidoc",
- "line": 365
- },
- "digest": "f8c1fa91443573fcc0a5f2e22b7b4582",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_custom_analyzer\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"my_custom_keyword_marker_filter\",\n \"porter_stem\"\n ]\n }\n },\n \"filter\": {\n \"my_custom_keyword_marker_filter\": {\n \"type\": \"keyword_marker\",\n \"keywords\": \"analysis/example_word_list.txt\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_custom_analyzer": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "my_custom_keyword_marker_filter",
- "porter_stem"
- ]
- }
- },
- "filter": {
- "my_custom_keyword_marker_filter": {
- "type": "keyword_marker",
- "keywords": "analysis/example_word_list.txt"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 49
- },
- "digest": "a037beb3d02296e1d36dd43ef5c935dd",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"keyword_repeat\"\n ],\n \"text\": \"fox running and jumping\",\n \"explain\": true,\n \"attributes\": \"keyword\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "keyword_repeat"
- ],
- "text": "fox running and jumping",
- "explain": true,
- "attributes": "keyword"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 69
- },
- "digest": "19d80a3f2bcf9adf97fc1790ede525d3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"detail\": {\n \"custom_analyzer\": true,\n \"charfilters\": [],\n \"tokenizer\": ...,\n \"tokenfilters\": [\n {\n \"name\": \"keyword_repeat\",\n \"tokens\": [\n {\n \"token\": \"fox\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0,\n \"keyword\": true\n },\n {\n \"token\": \"fox\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0,\n \"keyword\": false\n },\n {\n \"token\": \"running\",\n \"start_offset\": 4,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1,\n \"keyword\": true\n },\n {\n \"token\": \"running\",\n \"start_offset\": 4,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1,\n \"keyword\": false\n },\n {\n \"token\": \"and\",\n \"start_offset\": 12,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2,\n \"keyword\": true\n },\n {\n \"token\": \"and\",\n \"start_offset\": 12,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2,\n \"keyword\": false\n },\n {\n \"token\": \"jumping\",\n \"start_offset\": 16,\n \"end_offset\": 23,\n \"type\": \"word\",\n \"position\": 3,\n \"keyword\": true\n },\n {\n \"token\": \"jumping\",\n \"start_offset\": 16,\n \"end_offset\": 23,\n \"type\": \"word\",\n \"position\": 3,\n \"keyword\": false\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 156
- },
- "digest": "8cbf9b46ce3ccc966c4902d2e0c56317",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"keyword_repeat\",\n \"stemmer\"\n ],\n \"text\": \"fox running and jumping\",\n \"explain\": true,\n \"attributes\": \"keyword\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "keyword_repeat",
- "stemmer"
- ],
- "text": "fox running and jumping",
- "explain": true,
- "attributes": "keyword"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 179
- },
- "digest": "22482143f10ede75ca81a9232544a943",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"detail\": {\n \"custom_analyzer\": true,\n \"charfilters\": [],\n \"tokenizer\": ...,\n \"tokenfilters\": [\n {\n \"name\": \"keyword_repeat\",\n \"tokens\": ...\n },\n {\n \"name\": \"stemmer\",\n \"tokens\": [\n {\n \"token\": \"fox\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0,\n \"keyword\": true\n },\n {\n \"token\": \"fox\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0,\n \"keyword\": false\n },\n {\n \"token\": \"running\",\n \"start_offset\": 4,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1,\n \"keyword\": true\n },\n {\n \"token\": \"run\",\n \"start_offset\": 4,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1,\n \"keyword\": false\n },\n {\n \"token\": \"and\",\n \"start_offset\": 12,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2,\n \"keyword\": true\n },\n {\n \"token\": \"and\",\n \"start_offset\": 12,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2,\n \"keyword\": false\n },\n {\n \"token\": \"jumping\",\n \"start_offset\": 16,\n \"end_offset\": 23,\n \"type\": \"word\",\n \"position\": 3,\n \"keyword\": true\n },\n {\n \"token\": \"jump\",\n \"start_offset\": 16,\n \"end_offset\": 23,\n \"type\": \"word\",\n \"position\": 3,\n \"keyword\": false\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 274
- },
- "digest": "29783e5de3a5f3c985cbf11094cf49a0",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"keyword_repeat\",\n \"stemmer\",\n \"remove_duplicates\"\n ],\n \"text\": \"fox running and jumping\",\n \"explain\": true,\n \"attributes\": \"keyword\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "keyword_repeat",
- "stemmer",
- "remove_duplicates"
- ],
- "text": "fox running and jumping",
- "explain": true,
- "attributes": "keyword"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 296
- },
- "digest": "baf54208b4d120a5ac4489c8027d32ba",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"detail\": {\n \"custom_analyzer\": true,\n \"charfilters\": [],\n \"tokenizer\": ...,\n \"tokenfilters\": [\n {\n \"name\": \"keyword_repeat\",\n \"tokens\": ...\n },\n {\n \"name\": \"stemmer\",\n \"tokens\": ...\n },\n {\n \"name\": \"remove_duplicates\",\n \"tokens\": [\n {\n \"token\": \"fox\",\n \"start_offset\": 0,\n \"end_offset\": 3,\n \"type\": \"word\",\n \"position\": 0,\n \"keyword\": true\n },\n {\n \"token\": \"running\",\n \"start_offset\": 4,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1,\n \"keyword\": true\n },\n {\n \"token\": \"run\",\n \"start_offset\": 4,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1,\n \"keyword\": false\n },\n {\n \"token\": \"and\",\n \"start_offset\": 12,\n \"end_offset\": 15,\n \"type\": \"word\",\n \"position\": 2,\n \"keyword\": true\n },\n {\n \"token\": \"jumping\",\n \"start_offset\": 16,\n \"end_offset\": 23,\n \"type\": \"word\",\n \"position\": 3,\n \"keyword\": true\n },\n {\n \"token\": \"jump\",\n \"start_offset\": 16,\n \"end_offset\": 23,\n \"type\": \"word\",\n \"position\": 3,\n \"keyword\": false\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/keyword-repeat-tokenfilter.asciidoc",
- "line": 384
- },
- "digest": "4710188da1085a6be9a1e0bdd66c4f26",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_custom_analyzer\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"keyword_repeat\",\n \"porter_stem\",\n \"remove_duplicates\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_custom_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "keyword_repeat",
- "porter_stem",
- "remove_duplicates"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/kstem-tokenfilter.asciidoc",
- "line": 29
- },
- "digest": "68a891f609ca3a379d2d64e4914f3067",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [ \"kstem\" ],\n \"text\": \"the foxes jumping quickly\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "kstem"
- ],
- "text": "the foxes jumping quickly"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/kstem-tokenfilter.asciidoc",
- "line": 98
- },
- "digest": "e56ea22e3555d7c6de248e0327200b2e",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n \"kstem\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "whitespace",
- "filter": [
- "lowercase",
- "kstem"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/length-tokenfilter.asciidoc",
- "line": 27
- },
- "digest": "1659420311d907d9fc024b96f4150216",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"length\",\n \"min\": 0,\n \"max\": 4\n }\n ],\n \"text\": \"the quick brown fox jumps over the lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "length",
- "min": 0,
- "max": 4
- }
- ],
- "text": "the quick brown fox jumps over the lazy dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/length-tokenfilter.asciidoc",
- "line": 109
- },
- "digest": "ea690283f301c6ce957efad93d7d5c5d",
- "lang": "console",
- "found": [],
- "source": "PUT length_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_length\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"length\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/length_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_length": {
- "tokenizer": "standard",
- "filter": [
- "length"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "length_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/length-tokenfilter.asciidoc",
- "line": 149
- },
- "digest": "d88f883ed2fb8be35cd3e72ddffcf4ef",
- "lang": "console",
- "found": [],
- "source": "PUT length_custom_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_length_2_to_10_char\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"length_2_to_10_char\" ]\n }\n },\n \"filter\": {\n \"length_2_to_10_char\": {\n \"type\": \"length\",\n \"min\": 2,\n \"max\": 10\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/length_custom_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_length_2_to_10_char": {
- "tokenizer": "whitespace",
- "filter": [
- "length_2_to_10_char"
- ]
- }
- },
- "filter": {
- "length_2_to_10_char": {
- "type": "length",
- "min": 2,
- "max": 10
- }
- }
- }
- }
- },
- "params": {
- "index": "length_custom_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/limit-token-count-tokenfilter.asciidoc",
- "line": 43
- },
- "digest": "5a3855f1b3e37d89ab7cbcc4f7ae1dd3",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [\n {\n \"type\": \"limit\",\n \"max_token_count\": 2\n }\n ],\n \"text\": \"quick fox jumps over lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- {
- "type": "limit",
- "max_token_count": 2
- }
- ],
- "text": "quick fox jumps over lazy dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/limit-token-count-tokenfilter.asciidoc",
- "line": 96
- },
- "digest": "b96f465abb658fe32889c3d183f159a3",
- "lang": "console",
- "found": [],
- "source": "PUT limit_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_one_token_limit\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"limit\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/limit_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_one_token_limit": {
- "tokenizer": "standard",
- "filter": [
- "limit"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "limit_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/limit-token-count-tokenfilter.asciidoc",
- "line": 123
- },
- "digest": "63521e0089c631d6668c44a0a9d7fdcc",
- "lang": "console",
- "found": [],
- "source": "PUT custom_limit_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"whitespace_five_token_limit\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"five_token_limit\" ]\n }\n },\n \"filter\": {\n \"five_token_limit\": {\n \"type\": \"limit\",\n \"max_token_count\": 5\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_limit_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_five_token_limit": {
- "tokenizer": "whitespace",
- "filter": [
- "five_token_limit"
- ]
- }
- },
- "filter": {
- "five_token_limit": {
- "type": "limit",
- "max_token_count": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_limit_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/lowercase-tokenfilter.asciidoc",
- "line": 20
- },
- "digest": "aa3284717241ed79d3d1d3bdbbdce598",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"lowercase\"],\n \"text\" : \"THE Quick FoX JUMPs\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "lowercase"
- ],
- "text": "THE Quick FoX JUMPs"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/lowercase-tokenfilter.asciidoc",
- "line": 82
- },
- "digest": "bf173db2ec48059c47eb8a7268545add",
- "lang": "console",
- "found": [],
- "source": "PUT lowercase_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_lowercase\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"lowercase\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/lowercase_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_lowercase": {
- "tokenizer": "whitespace",
- "filter": [
- "lowercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "lowercase_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/lowercase-tokenfilter.asciidoc",
- "line": 131
- },
- "digest": "f268416813befd13c604642c6fe6eda9",
- "lang": "console",
- "found": [],
- "source": "PUT custom_lowercase_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"greek_lowercase_example\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\"greek_lowercase\"]\n }\n },\n \"filter\": {\n \"greek_lowercase\": {\n \"type\": \"lowercase\",\n \"language\": \"greek\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_lowercase_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "greek_lowercase_example": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "greek_lowercase"
- ]
- }
- },
- "filter": {
- "greek_lowercase": {
- "type": "lowercase",
- "language": "greek"
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_lowercase_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/minhash-tokenfilter.asciidoc",
- "line": 134
- },
- "digest": "7fc0039434c1833d7efd65d85870abfb",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"filter\": {\n \"my_shingle_filter\": { <1>\n \"type\": \"shingle\",\n \"min_shingle_size\": 5,\n \"max_shingle_size\": 5,\n \"output_unigrams\": false\n },\n \"my_minhash_filter\": {\n \"type\": \"min_hash\",\n \"hash_count\": 1, <2>\n \"bucket_count\": 512, <3>\n \"hash_set_size\": 1, <4>\n \"with_rotation\": true <5>\n }\n },\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"my_shingle_filter\",\n \"my_minhash_filter\"\n ]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"fingerprint\": {\n \"type\": \"text\",\n \"analyzer\": \"my_analyzer\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "my_shingle_filter": {
- "type": "shingle",
- "min_shingle_size": 5,
- "max_shingle_size": 5,
- "output_unigrams": false
- },
- "my_minhash_filter": {
- "type": "min_hash",
- "hash_count": 1,
- "bucket_count": 512,
- "hash_set_size": 1,
- "with_rotation": true
- }
- },
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "my_shingle_filter",
- "my_minhash_filter"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "fingerprint": {
- "type": "text",
- "analyzer": "my_analyzer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/multiplexer-tokenfilter.asciidoc",
- "line": 36
- },
- "digest": "c306212babadc14fa124b88fd8c43a6b",
- "lang": "console",
- "found": [],
- "source": "PUT /multiplexer_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [ \"my_multiplexer\" ]\n }\n },\n \"filter\" : {\n \"my_multiplexer\" : {\n \"type\" : \"multiplexer\",\n \"filters\" : [ \"lowercase\", \"lowercase, porter_stem\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/multiplexer_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "my_multiplexer"
- ]
- }
- },
- "filter": {
- "my_multiplexer": {
- "type": "multiplexer",
- "filters": [
- "lowercase",
- "lowercase, porter_stem"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "multiplexer_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/multiplexer-tokenfilter.asciidoc",
- "line": 61
- },
- "digest": "fa9a3ef94470f3d9bd6500b65bf993d1",
- "lang": "console",
- "found": [],
- "source": "POST /multiplexer_example/_analyze\n{\n \"analyzer\" : \"my_analyzer\",\n \"text\" : \"Going HOME\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/multiplexer_example/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "Going HOME"
- },
- "params": {
- "index": "multiplexer_example"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/multiplexer-tokenfilter.asciidoc",
- "line": 73
- },
- "digest": "3b7cbf575fe4305af42563b9046ca3be",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"Going\",\n \"start_offset\": 0,\n \"end_offset\": 5,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"going\",\n \"start_offset\": 0,\n \"end_offset\": 5,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"go\",\n \"start_offset\": 0,\n \"end_offset\": 5,\n \"type\": \"\",\n \"position\": 0\n },\n {\n \"token\": \"HOME\",\n \"start_offset\": 6,\n \"end_offset\": 10,\n \"type\": \"\",\n \"position\": 1\n },\n {\n \"token\": \"home\", <1>\n \"start_offset\": 6,\n \"end_offset\": 10,\n \"type\": \"\",\n \"position\": 1\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/ngram-tokenfilter.asciidoc",
- "line": 30
- },
- "digest": "f65abb38dd0cfedeb06e0cef206fbdab",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [ \"ngram\" ],\n \"text\": \"Quick fox\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "ngram"
- ],
- "text": "Quick fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/ngram-tokenfilter.asciidoc",
- "line": 161
- },
- "digest": "923aee95078219ee6eb321a252e1121b",
- "lang": "console",
- "found": [],
- "source": "PUT ngram_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_ngram\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"ngram\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/ngram_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_ngram": {
- "tokenizer": "standard",
- "filter": [
- "ngram"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "ngram_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/ngram-tokenfilter.asciidoc",
- "line": 208
- },
- "digest": "2793fa53b7d269852aa74f6bf57e34dc",
- "lang": "console",
- "found": [],
- "source": "PUT ngram_custom_example\n{\n \"settings\": {\n \"index\": {\n \"max_ngram_diff\": 2\n },\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"3_5_grams\" ]\n }\n },\n \"filter\": {\n \"3_5_grams\": {\n \"type\": \"ngram\",\n \"min_gram\": 3,\n \"max_gram\": 5\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/ngram_custom_example",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "max_ngram_diff": 2
- },
- "analysis": {
- "analyzer": {
- "default": {
- "tokenizer": "whitespace",
- "filter": [
- "3_5_grams"
- ]
- }
- },
- "filter": {
- "3_5_grams": {
- "type": "ngram",
- "min_gram": 3,
- "max_gram": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "ngram_custom_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/pattern-capture-tokenfilter.asciidoc",
- "line": 51
- },
- "digest": "f733b25cd4c448b226bb76862974eef2",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"settings\" : {\n \"analysis\" : {\n \"filter\" : {\n \"code\" : {\n \"type\" : \"pattern_capture\",\n \"preserve_original\" : true,\n \"patterns\" : [\n \"(\\\\p{Ll}+|\\\\p{Lu}\\\\p{Ll}+|\\\\p{Lu}+)\",\n \"(\\\\d+)\"\n ]\n }\n },\n \"analyzer\" : {\n \"code\" : {\n \"tokenizer\" : \"pattern\",\n \"filter\" : [ \"code\", \"lowercase\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "code": {
- "type": "pattern_capture",
- "preserve_original": true,
- "patterns": [
- "(\\p{Ll}+|\\p{Lu}\\p{Ll}+|\\p{Lu}+)",
- "(\\d+)"
- ]
- }
- },
- "analyzer": {
- "code": {
- "tokenizer": "pattern",
- "filter": [
- "code",
- "lowercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/pattern-capture-tokenfilter.asciidoc",
- "line": 91
- },
- "digest": "080c34d8151d02b760571e3a2899fa97",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"settings\" : {\n \"analysis\" : {\n \"filter\" : {\n \"email\" : {\n \"type\" : \"pattern_capture\",\n \"preserve_original\" : true,\n \"patterns\" : [\n \"([^@]+)\",\n \"(\\\\p{L}+)\",\n \"(\\\\d+)\",\n \"@(.+)\"\n ]\n }\n },\n \"analyzer\" : {\n \"email\" : {\n \"tokenizer\" : \"uax_url_email\",\n \"filter\" : [ \"email\", \"lowercase\", \"unique\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "filter": {
- "email": {
- "type": "pattern_capture",
- "preserve_original": true,
- "patterns": [
- "([^@]+)",
- "(\\p{L}+)",
- "(\\d+)",
- "@(.+)"
- ]
- }
- },
- "analyzer": {
- "email": {
- "tokenizer": "uax_url_email",
- "filter": [
- "email",
- "lowercase",
- "unique"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/pattern_replace-tokenfilter.asciidoc",
- "line": 39
- },
- "digest": "2ec8d757188349a4630e120ba2c98c3b",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"pattern_replace\",\n \"pattern\": \"(dog)\",\n \"replacement\": \"watch$1\"\n }\n ],\n \"text\": \"foxes jump lazy dogs\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "pattern_replace",
- "pattern": "(dog)",
- "replacement": "watch$1"
- }
- ],
- "text": "foxes jump lazy dogs"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/pattern_replace-tokenfilter.asciidoc",
- "line": 136
- },
- "digest": "194b56d9f00c05352bc571d1e371a4d7",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"keyword\",\n \"filter\": [\n \"my_pattern_replace_filter\"\n ]\n }\n },\n \"filter\": {\n \"my_pattern_replace_filter\": {\n \"type\": \"pattern_replace\",\n \"pattern\": \"[£|€]\",\n \"replacement\": \"\",\n \"all\": false\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "keyword",
- "filter": [
- "my_pattern_replace_filter"
- ]
- }
- },
- "filter": {
- "my_pattern_replace_filter": {
- "type": "pattern_replace",
- "pattern": "[£|€]",
- "replacement": "",
- "all": false
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/porterstem-tokenfilter.asciidoc",
- "line": 28
- },
- "digest": "0d54ddad2bf6f76aa5c35f53ba77748a",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [ \"porter_stem\" ],\n \"text\": \"the foxes jumping quickly\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "porter_stem"
- ],
- "text": "the foxes jumping quickly"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/porterstem-tokenfilter.asciidoc",
- "line": 97
- },
- "digest": "1badc80ac8097713f8fc51872615a042",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n \"porter_stem\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "whitespace",
- "filter": [
- "lowercase",
- "porter_stem"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/predicate-tokenfilter.asciidoc",
- "line": 22
- },
- "digest": "10338787b66a7f93270c3b88dd6197f8",
- "lang": "console",
- "found": [],
- "source": "PUT /condition_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [ \"my_script_filter\" ]\n }\n },\n \"filter\" : {\n \"my_script_filter\" : {\n \"type\" : \"predicate_token_filter\",\n \"script\" : {\n \"source\" : \"token.getTerm().length() > 5\" <1>\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/condition_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "my_script_filter"
- ]
- }
- },
- "filter": {
- "my_script_filter": {
- "type": "predicate_token_filter",
- "script": {
- "source": "token.getTerm().length() > 5"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "condition_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/predicate-tokenfilter.asciidoc",
- "line": 51
- },
- "digest": "e20493a20d3992a97238b87c6930f08d",
- "lang": "console",
- "found": [],
- "source": "POST /condition_example/_analyze\n{\n \"analyzer\" : \"my_analyzer\",\n \"text\" : \"What Flapdoodle\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/condition_example/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "What Flapdoodle"
- },
- "params": {
- "index": "condition_example"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/predicate-tokenfilter.asciidoc",
- "line": 63
- },
- "digest": "f874e7c40c29fc3b2722f51140c8bf5e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"Flapdoodle\", <1>\n \"start_offset\": 5,\n \"end_offset\": 15,\n \"type\": \"\",\n \"position\": 1 <2>\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/remove-duplicates-tokenfilter.asciidoc",
- "line": 24
- },
- "digest": "15d948d593d2624ac5e2b155052048f0",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"keyword_repeat\",\n \"stemmer\"\n ],\n \"text\": \"jumping dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "keyword_repeat",
- "stemmer"
- ],
- "text": "jumping dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/remove-duplicates-tokenfilter.asciidoc",
- "line": 40
- },
- "digest": "9ecf59043a40c3344523501baa53f933",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"jumping\",\n \"start_offset\": 0,\n \"end_offset\": 7,\n \"type\": \"word\",\n \"position\": 0\n },\n {\n \"token\": \"jump\",\n \"start_offset\": 0,\n \"end_offset\": 7,\n \"type\": \"word\",\n \"position\": 0\n },\n {\n \"token\": \"dog\",\n \"start_offset\": 8,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1\n },\n {\n \"token\": \"dog\",\n \"start_offset\": 8,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/remove-duplicates-tokenfilter.asciidoc",
- "line": 79
- },
- "digest": "bab4c3b22c1768fcc7153345e4096dfb",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"keyword_repeat\",\n \"stemmer\",\n \"remove_duplicates\"\n ],\n \"text\": \"jumping dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "keyword_repeat",
- "stemmer",
- "remove_duplicates"
- ],
- "text": "jumping dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/remove-duplicates-tokenfilter.asciidoc",
- "line": 96
- },
- "digest": "547e7047e8a8ec29337bf4abc3ce8e5a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"jumping\",\n \"start_offset\": 0,\n \"end_offset\": 7,\n \"type\": \"word\",\n \"position\": 0\n },\n {\n \"token\": \"jump\",\n \"start_offset\": 0,\n \"end_offset\": 7,\n \"type\": \"word\",\n \"position\": 0\n },\n {\n \"token\": \"dog\",\n \"start_offset\": 8,\n \"end_offset\": 11,\n \"type\": \"word\",\n \"position\": 1\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/remove-duplicates-tokenfilter.asciidoc",
- "line": 136
- },
- "digest": "198d39435b00b938cc2fa8f98c92e135",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_custom_analyzer\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"keyword_repeat\",\n \"stemmer\",\n \"remove_duplicates\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_custom_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "keyword_repeat",
- "stemmer",
- "remove_duplicates"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/reverse-tokenfilter.asciidoc",
- "line": 24
- },
- "digest": "e09d30195108bd6a1f6857394a6123ea",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"reverse\"],\n \"text\" : \"quick fox jumps\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "reverse"
- ],
- "text": "quick fox jumps"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/reverse-tokenfilter.asciidoc",
- "line": 79
- },
- "digest": "aa5fbb68d3a8e0d0c894791cb6cf0b13",
- "lang": "console",
- "found": [],
- "source": "PUT reverse_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_reverse\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"reverse\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/reverse_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_reverse": {
- "tokenizer": "whitespace",
- "filter": [
- "reverse"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "reverse_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/shingle-tokenfilter.asciidoc",
- "line": 31
- },
- "digest": "c065a200c00e2005d88ec2f0c10c908a",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"shingle\" ],\n \"text\": \"quick brown fox jumps\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "shingle"
- ],
- "text": "quick brown fox jumps"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/shingle-tokenfilter.asciidoc",
- "line": 116
- },
- "digest": "ac366b9dda7040e743dee85335354094",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"shingle\",\n \"min_shingle_size\": 2,\n \"max_shingle_size\": 3\n }\n ],\n \"text\": \"quick brown fox jumps\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "shingle",
- "min_shingle_size": 2,
- "max_shingle_size": 3
- }
- ],
- "text": "quick brown fox jumps"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/shingle-tokenfilter.asciidoc",
- "line": 220
- },
- "digest": "56fa6c9e08258157d445e2f92274962b",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"shingle\",\n \"min_shingle_size\": 2,\n \"max_shingle_size\": 3,\n \"output_unigrams\": false\n }\n ],\n \"text\": \"quick brown fox jumps\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "shingle",
- "min_shingle_size": 2,
- "max_shingle_size": 3,
- "output_unigrams": false
- }
- ],
- "text": "quick brown fox jumps"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/shingle-tokenfilter.asciidoc",
- "line": 298
- },
- "digest": "9cd5719dfced4465c65547da938555f1",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"standard_shingle\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"shingle\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_shingle": {
- "tokenizer": "standard",
- "filter": [
- "shingle"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/shingle-tokenfilter.asciidoc",
- "line": 374
- },
- "digest": "12ec704d62ffedcb03787e6aba69d382",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n {\n \"type\": \"stop\",\n \"stopwords\": [ \"a\" ]\n },\n {\n \"type\": \"shingle\",\n \"filler_token\": \"+\"\n }\n ],\n \"text\": \"fox jumps a lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- {
- "type": "stop",
- "stopwords": [
- "a"
- ]
- },
- {
- "type": "shingle",
- "filler_token": "+"
- }
- ],
- "text": "fox jumps a lazy dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/shingle-tokenfilter.asciidoc",
- "line": 488
- },
- "digest": "fc0e7a69e7d2807dc9db43b4fef68db8",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"en\": {\n \"tokenizer\": \"standard\",\n \"filter\": [ \"my_shingle_filter\" ]\n }\n },\n \"filter\": {\n \"my_shingle_filter\": {\n \"type\": \"shingle\",\n \"min_shingle_size\": 2,\n \"max_shingle_size\": 5,\n \"output_unigrams\": false\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "en": {
- "tokenizer": "standard",
- "filter": [
- "my_shingle_filter"
- ]
- }
- },
- "filter": {
- "my_shingle_filter": {
- "type": "shingle",
- "min_shingle_size": 2,
- "max_shingle_size": 5,
- "output_unigrams": false
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/snowball-tokenfilter.asciidoc",
- "line": 17
- },
- "digest": "e776311ef67c972f322b669dc4ab9926",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"lowercase\", \"my_snow\"]\n }\n },\n \"filter\" : {\n \"my_snow\" : {\n \"type\" : \"snowball\",\n \"language\" : \"Lovins\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "my_snow"
- ]
- }
- },
- "filter": {
- "my_snow": {
- "type": "snowball",
- "language": "Lovins"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stemmer-tokenfilter.asciidoc",
- "line": 23
- },
- "digest": "a4e510aa9145ccedae151c4a6634f0a4",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [ \"stemmer\" ],\n \"text\": \"the foxes jumping quickly\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "stemmer"
- ],
- "text": "the foxes jumping quickly"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stemmer-tokenfilter.asciidoc",
- "line": 85
- },
- "digest": "7bdb87054d1c363964e109dec74197d6",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"stemmer\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "whitespace",
- "filter": [
- "stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stemmer-tokenfilter.asciidoc",
- "line": 258
- },
- "digest": "cf215381af3df5eaa8c0cf3a2d42337a",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\",\n \"my_stemmer\"\n ]\n }\n },\n \"filter\": {\n \"my_stemmer\": {\n \"type\": \"stemmer\",\n \"language\": \"light_german\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "my_stemmer"
- ]
- }
- },
- "filter": {
- "my_stemmer": {
- "type": "stemmer",
- "language": "light_german"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stemmer-override-tokenfilter.asciidoc",
- "line": 25
- },
- "digest": "8995e7cf49c4d870aea334645b70ed13",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"lowercase\", \"custom_stems\", \"porter_stem\"]\n }\n },\n \"filter\" : {\n \"custom_stems\" : {\n \"type\" : \"stemmer_override\",\n \"rules_path\" : \"analysis/stemmer_override.txt\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "custom_stems",
- "porter_stem"
- ]
- }
- },
- "filter": {
- "custom_stems": {
- "type": "stemmer_override",
- "rules_path": "analysis/stemmer_override.txt"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stemmer-override-tokenfilter.asciidoc",
- "line": 57
- },
- "digest": "41a91d7f732c300c0e2f75c81ed0f4b5",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_analyzer\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"lowercase\", \"custom_stems\", \"porter_stem\"]\n }\n },\n \"filter\" : {\n \"custom_stems\" : {\n \"type\" : \"stemmer_override\",\n \"rules\" : [\n \"running, runs => run\",\n \"stemmer => stemmer\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "custom_stems",
- "porter_stem"
- ]
- }
- },
- "filter": {
- "custom_stems": {
- "type": "stemmer_override",
- "rules": [
- "running, runs => run",
- "stemmer => stemmer"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stop-tokenfilter.asciidoc",
- "line": 31
- },
- "digest": "e9738fe09a99080506a07945795e8eda",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"standard\",\n \"filter\": [ \"stop\" ],\n \"text\": \"a quick fox jumps over the lazy dog\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "stop"
- ],
- "text": "a quick fox jumps over the lazy dog"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stop-tokenfilter.asciidoc",
- "line": 106
- },
- "digest": "23dc8c9e5e664cced2d3f876f6f70536",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"stop\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "whitespace",
- "filter": [
- "stop"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stop-tokenfilter.asciidoc",
- "line": 183
- },
- "digest": "b683b2aa02f50d62a8b73d1f3603f738",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"my_custom_stop_words_filter\" ]\n }\n },\n \"filter\": {\n \"my_custom_stop_words_filter\": {\n \"type\": \"stop\",\n \"ignore_case\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "tokenizer": "whitespace",
- "filter": [
- "my_custom_stop_words_filter"
- ]
- }
- },
- "filter": {
- "my_custom_stop_words_filter": {
- "type": "stop",
- "ignore_case": true
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/stop-tokenfilter.asciidoc",
- "line": 210
- },
- "digest": "99cde757233651f95081224683960b0e",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"default\": {\n \"tokenizer\": \"whitespace\",\n \"filter\": [ \"my_custom_stop_words_filter\" ]\n }\n },\n \"filter\": {\n \"my_custom_stop_words_filter\": {\n \"type\": \"stop\",\n \"ignore_case\": true,\n \"stopwords\": [ \"and\", \"is\", \"the\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "default": {
- "tokenizer": "whitespace",
- "filter": [
- "my_custom_stop_words_filter"
- ]
- }
- },
- "filter": {
- "my_custom_stop_words_filter": {
- "type": "stop",
- "ignore_case": true,
- "stopwords": [
- "and",
- "is",
- "the"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-tokenfilter.asciidoc",
- "line": 12
- },
- "digest": "09f74df1d07d84ee133ce90f7832e712",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"synonym\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"synonym\"]\n }\n },\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym\",\n \"synonyms_path\" : \"analysis/synonym.txt\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "synonym": {
- "tokenizer": "whitespace",
- "filter": [
- "synonym"
- ]
- }
- },
- "filter": {
- "synonym": {
- "type": "synonym",
- "synonyms_path": "analysis/synonym.txt"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-tokenfilter.asciidoc",
- "line": 51
- },
- "digest": "bcc57126b24c408b5d944928b6f08c94",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"synonym\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"my_stop\", \"synonym\"]\n }\n },\n \"filter\" : {\n \"my_stop\": {\n \"type\" : \"stop\",\n \"stopwords\": [\"bar\"]\n },\n \"synonym\" : {\n \"type\" : \"synonym\",\n \"lenient\": true,\n \"synonyms\" : [\"foo, bar => baz\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "synonym": {
- "tokenizer": "standard",
- "filter": [
- "my_stop",
- "synonym"
- ]
- }
- },
- "filter": {
- "my_stop": {
- "type": "stop",
- "stopwords": [
- "bar"
- ]
- },
- "synonym": {
- "type": "synonym",
- "lenient": true,
- "synonyms": [
- "foo, bar => baz"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-tokenfilter.asciidoc",
- "line": 112
- },
- "digest": "9fb5e28535f396ab2eb8bc710eebc1e6",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym\",\n \"synonyms\" : [\n \"i-pod, i pod => ipod\",\n \"universe, cosmos\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "filter": {
- "synonym": {
- "type": "synonym",
- "synonyms": [
- "i-pod, i pod => ipod",
- "universe, cosmos"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-tokenfilter.asciidoc",
- "line": 143
- },
- "digest": "0c0f37e409459dcd40d29ea684db4706",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym\",\n \"format\" : \"wordnet\",\n \"synonyms\" : [\n \"s(100000001,1,'abstain',v,1,0).\",\n \"s(100000001,2,'refrain',v,1,0).\",\n \"s(100000001,3,'desist',v,1,0).\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "filter": {
- "synonym": {
- "type": "synonym",
- "format": "wordnet",
- "synonyms": [
- "s(100000001,1,'abstain',v,1,0).",
- "s(100000001,2,'refrain',v,1,0).",
- "s(100000001,3,'desist',v,1,0)."
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-graph-tokenfilter.asciidoc",
- "line": 26
- },
- "digest": "2f071d36aa4aff5a2fafb3dadaa38b82",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"search_synonyms\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"graph_synonyms\"]\n }\n },\n \"filter\" : {\n \"graph_synonyms\" : {\n \"type\" : \"synonym_graph\",\n \"synonyms_path\" : \"analysis/synonym.txt\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "search_synonyms": {
- "tokenizer": "whitespace",
- "filter": [
- "graph_synonyms"
- ]
- }
- },
- "filter": {
- "graph_synonyms": {
- "type": "synonym_graph",
- "synonyms_path": "analysis/synonym.txt"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-graph-tokenfilter.asciidoc",
- "line": 61
- },
- "digest": "3d253e5a0029bc96cce484302319b772",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"synonym\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"my_stop\", \"synonym_graph\"]\n }\n },\n \"filter\" : {\n \"my_stop\": {\n \"type\" : \"stop\",\n \"stopwords\": [\"bar\"]\n },\n \"synonym_graph\" : {\n \"type\" : \"synonym_graph\",\n \"lenient\": true,\n \"synonyms\" : [\"foo, bar => baz\"]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "synonym": {
- "tokenizer": "standard",
- "filter": [
- "my_stop",
- "synonym_graph"
- ]
- }
- },
- "filter": {
- "my_stop": {
- "type": "stop",
- "stopwords": [
- "bar"
- ]
- },
- "synonym_graph": {
- "type": "synonym_graph",
- "lenient": true,
- "synonyms": [
- "foo, bar => baz"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-graph-tokenfilter.asciidoc",
- "line": 121
- },
- "digest": "1a14fd905941ecbdbc943b05875afc6f",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym_graph\",\n \"synonyms\" : [\n \"lol, laughing out loud\",\n \"universe, cosmos\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "filter": {
- "synonym": {
- "type": "synonym_graph",
- "synonyms": [
- "lol, laughing out loud",
- "universe, cosmos"
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/synonym-graph-tokenfilter.asciidoc",
- "line": 152
- },
- "digest": "f0d7d6d5c878211704d4a5f1b2f6a247",
- "lang": "console",
- "found": [],
- "source": "PUT /test_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym_graph\",\n \"format\" : \"wordnet\",\n \"synonyms\" : [\n \"s(100000001,1,'abstain',v,1,0).\",\n \"s(100000001,2,'refrain',v,1,0).\",\n \"s(100000001,3,'desist',v,1,0).\"\n ]\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "filter": {
- "synonym": {
- "type": "synonym_graph",
- "format": "wordnet",
- "synonyms": [
- "s(100000001,1,'abstain',v,1,0).",
- "s(100000001,2,'refrain',v,1,0).",
- "s(100000001,3,'desist',v,1,0)."
- ]
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/trim-tokenfilter.asciidoc",
- "line": 34
- },
- "digest": "c318fde926842722825a51e5c9c326a9",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"keyword\",\n \"text\" : \" fox \"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "text": " fox "
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/trim-tokenfilter.asciidoc",
- "line": 47
- },
- "digest": "63cffa23f7a230f837f07ceb83dc284e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \" fox \",\n \"start_offset\": 0,\n \"end_offset\": 5,\n \"type\": \"word\",\n \"position\": 0\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/trim-tokenfilter.asciidoc",
- "line": 65
- },
- "digest": "a3a14f7f0e80725f695a901a7e1d579d",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"keyword\",\n \"filter\" : [\"trim\"],\n \"text\" : \" fox \"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "filter": [
- "trim"
- ],
- "text": " fox "
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/trim-tokenfilter.asciidoc",
- "line": 78
- },
- "digest": "b38a60d5f2b2caf2134d5963558b78b6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"tokens\": [\n {\n \"token\": \"fox\",\n \"start_offset\": 0,\n \"end_offset\": 5,\n \"type\": \"word\",\n \"position\": 0\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/trim-tokenfilter.asciidoc",
- "line": 99
- },
- "digest": "fd26bfdbe95b2d2db374385d12849f77",
- "lang": "console",
- "found": [],
- "source": "PUT trim_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"keyword_trim\": {\n \"tokenizer\": \"keyword\",\n \"filter\": [ \"trim\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/trim_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "keyword_trim": {
- "tokenizer": "keyword",
- "filter": [
- "trim"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "trim_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/truncate-tokenfilter.asciidoc",
- "line": 24
- },
- "digest": "ee2d97090d617ed8aa2a87ea33556dd7",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"truncate\"],\n \"text\" : \"the quinquennial extravaganza carried on\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "truncate"
- ],
- "text": "the quinquennial extravaganza carried on"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/truncate-tokenfilter.asciidoc",
- "line": 93
- },
- "digest": "f8651356ce2e7e93fa306c30f57ed588",
- "lang": "console",
- "found": [],
- "source": "PUT custom_truncate_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_truncate\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"truncate\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_truncate_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_truncate": {
- "tokenizer": "standard",
- "filter": [
- "truncate"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_truncate_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/truncate-tokenfilter.asciidoc",
- "line": 128
- },
- "digest": "af84b3995564a7ca84360a526a4ac896",
- "lang": "console",
- "found": [],
- "source": "PUT 5_char_words_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"lowercase_5_char\": {\n \"tokenizer\": \"lowercase\",\n \"filter\": [ \"5_char_trunc\" ]\n }\n },\n \"filter\": {\n \"5_char_trunc\": {\n \"type\": \"truncate\",\n \"length\": 5\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/5_char_words_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "lowercase_5_char": {
- "tokenizer": "lowercase",
- "filter": [
- "5_char_trunc"
- ]
- }
- },
- "filter": {
- "5_char_trunc": {
- "type": "truncate",
- "length": 5
- }
- }
- }
- }
- },
- "params": {
- "index": "5_char_words_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/unique-tokenfilter.asciidoc",
- "line": 26
- },
- "digest": "50d5c5b7e8ed9a95b8d9a25a32a77425",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"unique\"],\n \"text\" : \"the quick fox jumps the lazy fox\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "unique"
- ],
- "text": "the quick fox jumps the lazy fox"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/unique-tokenfilter.asciidoc",
- "line": 95
- },
- "digest": "a428d518162918733d49261ffd65cfc1",
- "lang": "console",
- "found": [],
- "source": "PUT custom_unique_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"standard_truncate\" : {\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"unique\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/custom_unique_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "standard_truncate": {
- "tokenizer": "standard",
- "filter": [
- "unique"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "custom_unique_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/unique-tokenfilter.asciidoc",
- "line": 130
- },
- "digest": "6e1157f3184fa192d47a3d0e3ea17a6c",
- "lang": "console",
- "found": [],
- "source": "PUT letter_unique_pos_example\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"letter_unique_pos\": {\n \"tokenizer\": \"letter\",\n \"filter\": [ \"unique_pos\" ]\n }\n },\n \"filter\": {\n \"unique_pos\": {\n \"type\": \"unique\",\n \"only_on_same_position\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/letter_unique_pos_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "letter_unique_pos": {
- "tokenizer": "letter",
- "filter": [
- "unique_pos"
- ]
- }
- },
- "filter": {
- "unique_pos": {
- "type": "unique",
- "only_on_same_position": true
- }
- }
- }
- }
- },
- "params": {
- "index": "letter_unique_pos_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/uppercase-tokenfilter.asciidoc",
- "line": 30
- },
- "digest": "9f7671119236423e0e40801ef6485af1",
- "lang": "console",
- "found": [],
- "source": "GET _analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"uppercase\"],\n \"text\" : \"the Quick FoX JUMPs\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "uppercase"
- ],
- "text": "the Quick FoX JUMPs"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/uppercase-tokenfilter.asciidoc",
- "line": 92
- },
- "digest": "9db72fe811ee61ee3f7baa45916d20e0",
- "lang": "console",
- "found": [],
- "source": "PUT uppercase_example\n{\n \"settings\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"whitespace_uppercase\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"uppercase\"]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/uppercase_example",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "whitespace_uppercase": {
- "tokenizer": "whitespace",
- "filter": [
- "uppercase"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "uppercase_example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/word-delimiter-tokenfilter.asciidoc",
- "line": 58
- },
- "digest": "c42bc6e74afc3d43cd032ec2bfd77385",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"keyword\",\n \"filter\": [ \"word_delimiter\" ],\n \"text\": \"Neil's-Super-Duper-XL500--42+AutoCoder\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "filter": [
- "word_delimiter"
- ],
- "text": "Neil's-Super-Duper-XL500--42+AutoCoder"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/word-delimiter-tokenfilter.asciidoc",
- "line": 148
- },
- "digest": "0daa91e512cb2009925b5efb49e926f7",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"keyword\",\n \"filter\": [ \"word_delimiter\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "keyword",
- "filter": [
- "word_delimiter"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/word-delimiter-tokenfilter.asciidoc",
- "line": 359
- },
- "digest": "83a1cb2fd02a76f2766d7b186002859e",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"keyword\",\n \"filter\": [ \"my_custom_word_delimiter_filter\" ]\n }\n },\n \"filter\": {\n \"my_custom_word_delimiter_filter\": {\n \"type\": \"word_delimiter\",\n \"type_table\": [ \"- => ALPHA\" ],\n \"split_on_case_change\": false,\n \"split_on_numerics\": false,\n \"stem_english_possessive\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "keyword",
- "filter": [
- "my_custom_word_delimiter_filter"
- ]
- }
- },
- "filter": {
- "my_custom_word_delimiter_filter": {
- "type": "word_delimiter",
- "type_table": [
- "- => ALPHA"
- ],
- "split_on_case_change": false,
- "split_on_numerics": false,
- "stem_english_possessive": true
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/word-delimiter-graph-tokenfilter.asciidoc",
- "line": 47
- },
- "digest": "ffcf80e1094aa2d774f56f6b0bc54827",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"keyword\",\n \"filter\": [ \"word_delimiter_graph\" ],\n \"text\": \"Neil's-Super-Duper-XL500--42+AutoCoder\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "filter": [
- "word_delimiter_graph"
- ],
- "text": "Neil's-Super-Duper-XL500--42+AutoCoder"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/word-delimiter-graph-tokenfilter.asciidoc",
- "line": 137
- },
- "digest": "4620e88aa70944db528af43fead2b9ab",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"keyword\",\n \"filter\": [ \"word_delimiter_graph\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "keyword",
- "filter": [
- "word_delimiter_graph"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/tokenfilters/word-delimiter-graph-tokenfilter.asciidoc",
- "line": 404
- },
- "digest": "aee2ef858cd6bcc75ef97563cbe5ca5f",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"keyword\",\n \"filter\": [ \"my_custom_word_delimiter_graph_filter\" ]\n }\n },\n \"filter\": {\n \"my_custom_word_delimiter_graph_filter\": {\n \"type\": \"word_delimiter_graph\",\n \"type_table\": [ \"- => ALPHA\" ],\n \"split_on_case_change\": false,\n \"split_on_numerics\": false,\n \"stem_english_possessive\": true\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "keyword",
- "filter": [
- "my_custom_word_delimiter_graph_filter"
- ]
- }
- },
- "filter": {
- "my_custom_word_delimiter_graph_filter": {
- "type": "word_delimiter_graph",
- "type_table": [
- "- => ALPHA"
- ],
- "split_on_case_change": false,
- "split_on_numerics": false,
- "stem_english_possessive": true
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/htmlstrip-charfilter.asciidoc",
- "line": 21
- },
- "digest": "affc7ff234dc3acccb2bf7dc51f54813",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"keyword\",\n \"char_filter\": [\n \"html_strip\"\n ],\n \"text\": \"I'm so happy!
\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "char_filter": [
- "html_strip"
- ],
- "text": "I'm so happy!
"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/htmlstrip-charfilter.asciidoc",
- "line": 64
- },
- "digest": "1e1db5745eefa984b2cf2f693dbb9943",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"keyword\",\n \"char_filter\": [\n \"html_strip\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "keyword",
- "char_filter": [
- "html_strip"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/htmlstrip-charfilter.asciidoc",
- "line": 106
- },
- "digest": "b7f42ed5e0469dd79f7f599e447a7e25",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"keyword\",\n \"char_filter\": [\n \"my_custom_html_strip_char_filter\"\n ]\n }\n },\n \"char_filter\": {\n \"my_custom_html_strip_char_filter\": {\n \"type\": \"html_strip\",\n \"escaped_tags\": [\n \"b\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "keyword",
- "char_filter": [
- "my_custom_html_strip_char_filter"
- ]
- }
- },
- "char_filter": {
- "my_custom_html_strip_char_filter": {
- "type": "html_strip",
- "escaped_tags": [
- "b"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/mapping-charfilter.asciidoc",
- "line": 26
- },
- "digest": "02853293a5b7cd9cc7a886eb413bbeb6",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\": \"keyword\",\n \"char_filter\": [\n {\n \"type\": \"mapping\",\n \"mappings\": [\n \"٠ => 0\",\n \"١ => 1\",\n \"٢ => 2\",\n \"٣ => 3\",\n \"٤ => 4\",\n \"٥ => 5\",\n \"٦ => 6\",\n \"٧ => 7\",\n \"٨ => 8\",\n \"٩ => 9\"\n ]\n }\n ],\n \"text\": \"My license plate is ٢٥٠١٥\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "char_filter": [
- {
- "type": "mapping",
- "mappings": [
- "٠ => 0",
- "١ => 1",
- "٢ => 2",
- "٣ => 3",
- "٤ => 4",
- "٥ => 5",
- "٦ => 6",
- "٧ => 7",
- "٨ => 8",
- "٩ => 9"
- ]
- }
- ],
- "text": "My license plate is ٢٥٠١٥"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/mapping-charfilter.asciidoc",
- "line": 109
- },
- "digest": "9965aa724b58eff630d8347fd4453f5b",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"char_filter\": [\n \"my_mappings_char_filter\"\n ]\n }\n },\n \"char_filter\": {\n \"my_mappings_char_filter\": {\n \"type\": \"mapping\",\n \"mappings\": [\n \":) => _happy_\",\n \":( => _sad_\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "char_filter": [
- "my_mappings_char_filter"
- ]
- }
- },
- "char_filter": {
- "my_mappings_char_filter": {
- "type": "mapping",
- "mappings": [
- ":) => _happy_",
- ":( => _sad_"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/mapping-charfilter.asciidoc",
- "line": 141
- },
- "digest": "7df01e191f592ecdcd3934cc1479391a",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_analyze\n{\n \"tokenizer\": \"keyword\",\n \"char_filter\": [ \"my_mappings_char_filter\" ],\n \"text\": \"I'm delighted about it :(\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "char_filter": [
- "my_mappings_char_filter"
- ],
- "text": "I'm delighted about it :("
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/pattern-replace-charfilter.asciidoc",
- "line": 54
- },
- "digest": "2b8ba109999fc87712433cea92c99ebe",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"char_filter\": [\n \"my_char_filter\"\n ]\n }\n },\n \"char_filter\": {\n \"my_char_filter\": {\n \"type\": \"pattern_replace\",\n \"pattern\": \"(\\\\d+)-(?=\\\\d)\",\n \"replacement\": \"$1_\"\n }\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"My credit card is 123-456-789\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "char_filter": [
- "my_char_filter"
- ]
- }
- },
- "char_filter": {
- "my_char_filter": {
- "type": "pattern_replace",
- "pattern": "(\\d+)-(?=\\d)",
- "replacement": "$1_"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "My credit card is 123-456-789"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/pattern-replace-charfilter.asciidoc",
- "line": 104
- },
- "digest": "1e1f0d83b1ca672396341af5dcfd2603",
- "lang": "console",
- "found": [],
- "source": "PUT my_index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"my_analyzer\": {\n \"tokenizer\": \"standard\",\n \"char_filter\": [\n \"my_char_filter\"\n ],\n \"filter\": [\n \"lowercase\"\n ]\n }\n },\n \"char_filter\": {\n \"my_char_filter\": {\n \"type\": \"pattern_replace\",\n \"pattern\": \"(?<=\\\\p{Lower})(?=\\\\p{Upper})\",\n \"replacement\": \" \"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"analyzer\": \"my_analyzer\"\n }\n }\n }\n}\n\nPOST my_index/_analyze\n{\n \"analyzer\": \"my_analyzer\",\n \"text\": \"The fooBarBaz method\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "tokenizer": "standard",
- "char_filter": [
- "my_char_filter"
- ],
- "filter": [
- "lowercase"
- ]
- }
- },
- "char_filter": {
- "my_char_filter": {
- "type": "pattern_replace",
- "pattern": "(?<=\\p{Lower})(?=\\p{Upper})",
- "replacement": " "
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "analyzer": "my_analyzer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/my_index/_analyze",
- "query": null,
- "body": {
- "analyzer": "my_analyzer",
- "text": "The fooBarBaz method"
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/pattern-replace-charfilter.asciidoc",
- "line": 205
- },
- "digest": "32afaee3f1326785b4009ff48576d42f",
- "lang": "console",
- "found": [],
- "source": "PUT my_index/_doc/1?refresh\n{\n \"text\": \"The fooBarBaz method\"\n}\n\nGET my_index/_search\n{\n \"query\": {\n \"match\": {\n \"text\": \"bar\"\n }\n },\n \"highlight\": {\n \"fields\": {\n \"text\": {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "The fooBarBaz method"
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "text": "bar"
- }
- },
- "highlight": {
- "fields": {
- "text": {}
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "analysis/charfilters/pattern-replace-charfilter.asciidoc",
- "line": 230
- },
- "digest": "46ac4a940f3218a504b651e65c4ec3c5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"timed_out\": false,\n \"took\": $body.took,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.2876821,\n \"hits\": [\n {\n \"_index\": \"my_index\",\n \"_id\": \"1\",\n \"_score\": 0.2876821,\n \"_source\": {\n \"text\": \"The fooBarBaz method\"\n },\n \"highlight\": {\n \"text\": [\n \"The fooBarBaz method\" <1>\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "analysis/normalizers.asciidoc",
- "line": 27
- },
- "digest": "966ff3a4c5b61ed1a36d44c17ce06157",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"settings\": {\n \"analysis\": {\n \"char_filter\": {\n \"quote\": {\n \"type\": \"mapping\",\n \"mappings\": [\n \"« => \\\"\",\n \"» => \\\"\"\n ]\n }\n },\n \"normalizer\": {\n \"my_normalizer\": {\n \"type\": \"custom\",\n \"char_filter\": [\"quote\"],\n \"filter\": [\"lowercase\", \"asciifolding\"]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\",\n \"normalizer\": \"my_normalizer\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "char_filter": {
- "quote": {
- "type": "mapping",
- "mappings": [
- "« => \"",
- "» => \""
- ]
- }
- },
- "normalizer": {
- "my_normalizer": {
- "type": "custom",
- "char_filter": [
- "quote"
- ],
- "filter": [
- "lowercase",
- "asciifolding"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "foo": {
- "type": "keyword",
- "normalizer": "my_normalizer"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/filtering.asciidoc",
- "line": 54
- },
- "digest": "dad2d4add751fde5c39475ca709cc14b",
- "lang": "console",
- "found": [],
- "source": "PUT test/_settings\n{\n \"index.routing.allocation.include.size\": \"big,medium\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_settings",
- "query": null,
- "body": {
- "index.routing.allocation.include.size": "big,medium"
- },
- "params": {
- "index": "test"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/filtering.asciidoc",
- "line": 67
- },
- "digest": "b8b198ede3d08f315348e2a857e47773",
- "lang": "console",
- "found": [],
- "source": "PUT test/_settings\n{\n \"index.routing.allocation.include.size\": \"big\",\n \"index.routing.allocation.include.rack\": \"rack1\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_settings",
- "query": null,
- "body": {
- "index.routing.allocation.include.size": "big",
- "index.routing.allocation.include.rack": "rack1"
- },
- "params": {
- "index": "test"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/filtering.asciidoc",
- "line": 109
- },
- "digest": "28ac880057135e46b3b00c7f3976538c",
- "lang": "console",
- "found": [],
- "source": "PUT test/_settings\n{\n \"index.routing.allocation.include._ip\": \"192.168.2.*\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_settings",
- "query": null,
- "body": {
- "index.routing.allocation.include._ip": "192.168.2.*"
- },
- "params": {
- "index": "test"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/delayed.asciidoc",
- "line": 40
- },
- "digest": "17e6f3fac556f08a78f7a876e71acb89",
- "lang": "console",
- "found": [],
- "source": "PUT _all/_settings\n{\n \"settings\": {\n \"index.unassigned.node_left.delayed_timeout\": \"5m\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_all/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.unassigned.node_left.delayed_timeout": "5m"
- }
- },
- "params": {
- "index": "_all"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/delayed.asciidoc",
- "line": 82
- },
- "digest": "a38f29375eabd0103f8d7c00b17bb0ab",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/health <1>",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/delayed.asciidoc",
- "line": 95
- },
- "digest": "25d40d3049e57e2bb70c2c5b88bd7b87",
- "lang": "console",
- "found": [],
- "source": "PUT _all/_settings\n{\n \"settings\": {\n \"index.unassigned.node_left.delayed_timeout\": \"0\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_all/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.unassigned.node_left.delayed_timeout": "0"
- }
- },
- "params": {
- "index": "_all"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/prioritization.asciidoc",
- "line": 17
- },
- "digest": "8703f3b1b3895543abc36e2a7a0013d3",
- "lang": "console",
- "found": [],
- "source": "PUT index_1\n\nPUT index_2\n\nPUT index_3\n{\n \"settings\": {\n \"index.priority\": 10\n }\n}\n\nPUT index_4\n{\n \"settings\": {\n \"index.priority\": 5\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_1",
- "query": null,
- "body": null,
- "params": {
- "index": "index_1"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index_2",
- "query": null,
- "body": null,
- "params": {
- "index": "index_2"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index_3",
- "query": null,
- "body": {
- "settings": {
- "index.priority": 10
- }
- },
- "params": {
- "index": "index_3"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index_4",
- "query": null,
- "body": {
- "settings": {
- "index.priority": 5
- }
- },
- "params": {
- "index": "index_4"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/allocation/prioritization.asciidoc",
- "line": 48
- },
- "digest": "a425fcab60f603504becee7d001f0a4b",
- "lang": "console",
- "found": [],
- "source": "PUT index_4/_settings\n{\n \"index.priority\": 1\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_4/_settings",
- "query": null,
- "body": {
- "index.priority": 1
- },
- "params": {
- "index": "index_4"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/blocks.asciidoc",
- "line": 76
- },
- "digest": "fcdc59a15a8f6da6e8f30905cae0525c",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_block/write",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_block/write",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "block": "write"
- },
- "api": "indices.add_block"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/blocks.asciidoc",
- "line": 143
- },
- "digest": "9bc4ea0bd452bade2feb275883f45861",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index/_block/write",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_block/write",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "block": "write"
- },
- "api": "indices.add_block"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/blocks.asciidoc",
- "line": 151
- },
- "digest": "94ab735a0e47feaac8d3cf533e7e4374",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true,\n \"indices\" : [ {\n \"name\" : \"my_index\",\n \"blocked\" : true\n } ]\n}"
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 22
- },
- "digest": "2342a56279106ea643026df657bf7f88",
- "lang": "console",
- "found": [],
- "source": "PUT /index\n{\n \"settings\": {\n \"index\": {\n \"similarity\": {\n \"my_similarity\": {\n \"type\": \"DFR\",\n \"basic_model\": \"g\",\n \"after_effect\": \"l\",\n \"normalization\": \"h2\",\n \"normalization.h2.c\": \"3.0\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "similarity": {
- "my_similarity": {
- "type": "DFR",
- "basic_model": "g",
- "after_effect": "l",
- "normalization": "h2",
- "normalization.h2.c": "3.0"
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 45
- },
- "digest": "528e5f1c345c3769248cc6889e8cf552",
- "lang": "console",
- "found": [],
- "source": "PUT /index/_mapping\n{\n \"properties\" : {\n \"title\" : { \"type\" : \"text\", \"similarity\" : \"my_similarity\" }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "title": {
- "type": "text",
- "similarity": "my_similarity"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 192
- },
- "digest": "dfa16b7300d225e013f23625f44c087b",
- "lang": "console",
- "found": [],
- "source": "PUT /index\n{\n \"settings\": {\n \"number_of_shards\": 1,\n \"similarity\": {\n \"scripted_tfidf\": {\n \"type\": \"scripted\",\n \"script\": {\n \"source\": \"double tf = Math.sqrt(doc.freq); double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; double norm = 1/Math.sqrt(doc.length); return query.boost * tf * idf * norm;\"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"field\": {\n \"type\": \"text\",\n \"similarity\": \"scripted_tfidf\"\n }\n }\n }\n}\n\nPUT /index/_doc/1\n{\n \"field\": \"foo bar foo\"\n}\n\nPUT /index/_doc/2\n{\n \"field\": \"bar baz\"\n}\n\nPOST /index/_refresh\n\nGET /index/_search?explain=true\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"foo^1.7\",\n \"default_field\": \"field\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 1,
- "similarity": {
- "scripted_tfidf": {
- "type": "scripted",
- "script": {
- "source": "double tf = Math.sqrt(doc.freq); double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; double norm = 1/Math.sqrt(doc.length); return query.boost * tf * idf * norm;"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "field": {
- "type": "text",
- "similarity": "scripted_tfidf"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "field": "foo bar foo"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/2",
- "query": null,
- "body": {
- "field": "bar baz"
- },
- "params": {
- "index": "index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.refresh"
- },
- {
- "method": "GET",
- "url": "/index/_search",
- "query": {
- "explain": "true"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "foo^1.7",
- "default_field": "field"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 242
- },
- "digest": "df8b1a4d943bd74796fceec5133e995b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 12,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.9508477,\n \"hits\": [\n {\n \"_shard\": \"[index][0]\",\n \"_node\": \"OzrdjxNtQGaqs4DmioFw9A\",\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 1.9508477,\n \"_source\": {\n \"field\": \"foo bar foo\"\n },\n \"_explanation\": {\n \"value\": 1.9508477,\n \"description\": \"weight(field:foo in 0) [PerFieldSimilarity], result of:\",\n \"details\": [\n {\n \"value\": 1.9508477,\n \"description\": \"score from ScriptedSimilarity(weightScript=[null], script=[Script{type=inline, lang='painless', idOrCode='double tf = Math.sqrt(doc.freq); double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; double norm = 1/Math.sqrt(doc.length); return query.boost * tf * idf * norm;', options={}, params={}}]) computed from:\",\n \"details\": [\n {\n \"value\": 1.0,\n \"description\": \"weight\",\n \"details\": []\n },\n {\n \"value\": 1.7,\n \"description\": \"query.boost\",\n \"details\": []\n },\n {\n \"value\": 2,\n \"description\": \"field.docCount\",\n \"details\": []\n },\n {\n \"value\": 4,\n \"description\": \"field.sumDocFreq\",\n \"details\": []\n },\n {\n \"value\": 5,\n \"description\": \"field.sumTotalTermFreq\",\n \"details\": []\n },\n {\n \"value\": 1,\n \"description\": \"term.docFreq\",\n \"details\": []\n },\n {\n \"value\": 2,\n \"description\": \"term.totalTermFreq\",\n \"details\": []\n },\n {\n \"value\": 2.0,\n \"description\": \"doc.freq\",\n \"details\": []\n },\n {\n \"value\": 3,\n \"description\": \"doc.length\",\n \"details\": []\n }\n ]\n }\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 357
- },
- "digest": "5f8fb5513d4f725434db2f517ad4298f",
- "lang": "console",
- "found": [],
- "source": "PUT /index\n{\n \"settings\": {\n \"number_of_shards\": 1,\n \"similarity\": {\n \"scripted_tfidf\": {\n \"type\": \"scripted\",\n \"weight_script\": {\n \"source\": \"double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; return query.boost * idf;\"\n },\n \"script\": {\n \"source\": \"double tf = Math.sqrt(doc.freq); double norm = 1/Math.sqrt(doc.length); return weight * tf * norm;\"\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"field\": {\n \"type\": \"text\",\n \"similarity\": \"scripted_tfidf\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 1,
- "similarity": {
- "scripted_tfidf": {
- "type": "scripted",
- "weight_script": {
- "source": "double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; return query.boost * idf;"
- },
- "script": {
- "source": "double tf = Math.sqrt(doc.freq); double norm = 1/Math.sqrt(doc.length); return weight * tf * norm;"
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "field": {
- "type": "text",
- "similarity": "scripted_tfidf"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 520
- },
- "digest": "553d79817bb1333970e99507c37a159a",
- "lang": "console",
- "found": [],
- "source": "PUT /index\n{\n \"settings\": {\n \"index\": {\n \"similarity\": {\n \"default\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "similarity": {
- "default": {
- "type": "boolean"
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/similarity.asciidoc",
- "line": 540
- },
- "digest": "48de51de87a8ad9fd8b8db1ca25b85c1",
- "lang": "console",
- "found": [],
- "source": "POST /index/_close\n\nPUT /index/_settings\n{\n \"index\": {\n \"similarity\": {\n \"default\": {\n \"type\": \"boolean\"\n }\n }\n }\n}\n\nPOST /index/_open",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/index/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.close"
- },
- {
- "method": "PUT",
- "url": "/index/_settings",
- "query": null,
- "body": {
- "index": {
- "similarity": {
- "default": {
- "type": "boolean"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.put_settings"
- },
- {
- "method": "POST",
- "url": "/index/_open",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.open"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/slowlog.asciidoc",
- "line": 31
- },
- "digest": "45c83ca223d15f758faa61fc42788362",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index.search.slowlog.threshold.query.warn\": \"10s\",\n \"index.search.slowlog.threshold.query.info\": \"5s\",\n \"index.search.slowlog.threshold.query.debug\": \"2s\",\n \"index.search.slowlog.threshold.query.trace\": \"500ms\",\n \"index.search.slowlog.threshold.fetch.warn\": \"1s\",\n \"index.search.slowlog.threshold.fetch.info\": \"800ms\",\n \"index.search.slowlog.threshold.fetch.debug\": \"500ms\",\n \"index.search.slowlog.threshold.fetch.trace\": \"200ms\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index.search.slowlog.threshold.query.warn": "10s",
- "index.search.slowlog.threshold.query.info": "5s",
- "index.search.slowlog.threshold.query.debug": "2s",
- "index.search.slowlog.threshold.query.trace": "500ms",
- "index.search.slowlog.threshold.fetch.warn": "1s",
- "index.search.slowlog.threshold.fetch.info": "800ms",
- "index.search.slowlog.threshold.fetch.debug": "500ms",
- "index.search.slowlog.threshold.fetch.trace": "200ms"
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/slowlog.asciidoc",
- "line": 110
- },
- "digest": "c6226c544951d210c37659e9457d8887",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_settings\n{\n \"index.indexing.slowlog.threshold.index.warn\": \"10s\",\n \"index.indexing.slowlog.threshold.index.info\": \"5s\",\n \"index.indexing.slowlog.threshold.index.debug\": \"2s\",\n \"index.indexing.slowlog.threshold.index.trace\": \"500ms\",\n \"index.indexing.slowlog.source\": \"1000\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index.indexing.slowlog.threshold.index.warn": "10s",
- "index.indexing.slowlog.threshold.index.info": "5s",
- "index.indexing.slowlog.threshold.index.debug": "2s",
- "index.indexing.slowlog.threshold.index.trace": "500ms",
- "index.indexing.slowlog.source": "1000"
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/store.asciidoc",
- "line": 30
- },
- "digest": "fba99da14d4323c91794703438979912",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"index.store.type\": \"hybridfs\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.store.type": "hybridfs"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/store.asciidoc",
- "line": 120
- },
- "digest": "9ba2e779fe3e9d12ed5fca1ba3f8be97",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"index.store.preload\": [\"nvd\", \"dvd\"]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index.store.preload": [
- "nvd",
- "dvd"
- ]
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 16
- },
- "digest": "fea339c85b60ccefa6a163a70b86ca82",
- "lang": "console",
- "found": [],
- "source": "PUT twitter\n{\n \"settings\" : {\n \"index\" : {\n \"sort.field\" : \"date\", <1>\n \"sort.order\" : \"desc\" <2>\n }\n },\n \"mappings\": {\n \"properties\": {\n \"date\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "sort.field": "date",
- "sort.order": "desc"
- }
- },
- "mappings": {
- "properties": {
- "date": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 41
- },
- "digest": "a69f1a67cdc141e8dde5abb437c76959",
- "lang": "console",
- "found": [],
- "source": "PUT twitter\n{\n \"settings\" : {\n \"index\" : {\n \"sort.field\" : [\"username\", \"date\"], <1>\n \"sort.order\" : [\"asc\", \"desc\"] <2>\n }\n },\n \"mappings\": {\n \"properties\": {\n \"username\": {\n \"type\": \"keyword\",\n \"doc_values\": true\n },\n \"date\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "sort.field": [
- "username",
- "date"
- ],
- "sort.order": [
- "asc",
- "desc"
- ]
- }
- },
- "mappings": {
- "properties": {
- "username": {
- "type": "keyword",
- "doc_values": true
- },
- "date": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 114
- },
- "digest": "e01a82a0a809a4770ddc84c2cfc1ec85",
- "lang": "console",
- "found": [],
- "source": "PUT events\n{\n \"settings\" : {\n \"index\" : {\n \"sort.field\" : \"timestamp\",\n \"sort.order\" : \"desc\" <1>\n }\n },\n \"mappings\": {\n \"properties\": {\n \"timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/events",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "sort.field": "timestamp",
- "sort.order": "desc"
- }
- },
- "mappings": {
- "properties": {
- "timestamp": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "events"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 138
- },
- "digest": "46a3694ee4a7bbd4973565e5886782bb",
- "lang": "console",
- "found": [],
- "source": "GET /events/_search\n{\n \"size\": 10,\n \"sort\": [\n { \"timestamp\": \"desc\" }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/events/_search",
- "query": null,
- "body": {
- "size": 10,
- "sort": [
- {
- "timestamp": "desc"
- }
- ]
- },
- "params": {
- "index": "events"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 159
- },
- "digest": "2e8ba1e0b2a18dd276bbbe64f2b86338",
- "lang": "console",
- "found": [],
- "source": "GET /events/_search\n{\n \"size\": 10,\n \"sort\": [ <1>\n { \"timestamp\": \"desc\" }\n ],\n \"track_total_hits\": false\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/events/_search",
- "query": null,
- "body": {
- "size": 10,
- "sort": [
- {
- "timestamp": "desc"
- }
- ],
- "track_total_hits": false
- },
- "params": {
- "index": "events"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "index-modules/index-sorting.asciidoc",
- "line": 177
- },
- "digest": "44a1acf9f77e74727d4847090036bd6c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"hits\" : { <1>\n \"max_score\" : null,\n \"hits\" : []\n },\n \"took\": 20,\n \"timed_out\": false\n}"
- },
- {
- "source_location": {
- "file": "ingest.asciidoc",
- "line": 32
- },
- "digest": "55704b69b03239fe13293fc7622d27da",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/my_pipeline_id\n{\n \"description\" : \"describe pipeline\",\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"new\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my_pipeline_id",
- "query": null,
- "body": {
- "description": "describe pipeline",
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "new"
- }
- }
- ]
- },
- "params": {
- "id": "my_pipeline_id"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest.asciidoc",
- "line": 50
- },
- "digest": "6f3a4b4a01b6fae193897f00cb4855d0",
- "lang": "console",
- "found": [],
- "source": "PUT my-index/_doc/my-id?pipeline=my_pipeline_id\n{\n \"foo\": \"bar\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my-index/_doc/my-id",
- "query": {
- "pipeline": "my_pipeline_id"
- },
- "body": {
- "foo": "bar"
- },
- "params": {
- "index": "my-index",
- "id": "my-id"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest.asciidoc",
- "line": 61
- },
- "digest": "774147a82be722cd9e2895a001a71d42",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"my-index\",\n \"_id\" : \"my-id\",\n \"_version\" : 1,\n \"result\" : \"created\",\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 2,\n \"failed\" : 0\n },\n \"_seq_no\" : 0,\n \"_primary_term\" : 1\n}"
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 171
- },
- "digest": "841306ff1ac69cceb5bf1c28e2f26dd3",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/drop_guests_network\n{\n \"processors\": [\n {\n \"drop\": {\n \"if\": \"ctx.network_name == 'Guest'\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/drop_guests_network",
- "query": null,
- "body": {
- "processors": [
- {
- "drop": {
- "if": "ctx.network_name == 'Guest'"
- }
- }
- ]
- },
- "params": {
- "id": "drop_guests_network"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 187
- },
- "digest": "027ee5302d967b530123886906c42a90",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/1?pipeline=drop_guests_network\n{\n \"network_name\" : \"Guest\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "pipeline": "drop_guests_network"
- },
- "body": {
- "network_name": "Guest"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 198
- },
- "digest": "7d19f1f8917dda24c23ada23a7fb6ca8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": -3,\n \"result\": \"noop\",\n \"_shards\": {\n \"total\": 0,\n \"successful\": 0,\n \"failed\": 0\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 227
- },
- "digest": "9a5f1f590791012d32d29605daf82135",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/drop_guests_network\n{\n \"processors\": [\n {\n \"drop\": {\n \"if\": \"ctx.network?.name == 'Guest'\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/drop_guests_network",
- "query": null,
- "body": {
- "processors": [
- {
- "drop": {
- "if": "ctx.network?.name == 'Guest'"
- }
- }
- ]
- },
- "params": {
- "id": "drop_guests_network"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 243
- },
- "digest": "f8a8b78caaf69d44c71c476ea2a178aa",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/1?pipeline=drop_guests_network\n{\n \"network\": {\n \"name\": \"Guest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "pipeline": "drop_guests_network"
- },
- "body": {
- "network": {
- "name": "Guest"
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 258
- },
- "digest": "3eb75cee4c802d99bb526386349ee36b",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/2?pipeline=drop_guests_network\n{\n \"foo\" : \"bar\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/2",
- "query": {
- "pipeline": "drop_guests_network"
- },
- "body": {
- "foo": "bar"
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 318
- },
- "digest": "089ca88d7fd064a474e156d773211bc5",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/drop_guests_network\n{\n \"processors\": [\n {\n \"dot_expander\": {\n \"field\": \"network.name\"\n }\n },\n {\n \"drop\": {\n \"if\": \"ctx.network?.name == 'Guest'\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/drop_guests_network",
- "query": null,
- "body": {
- "processors": [
- {
- "dot_expander": {
- "field": "network.name"
- }
- },
- {
- "drop": {
- "if": "ctx.network?.name == 'Guest'"
- }
- }
- ]
- },
- "params": {
- "id": "drop_guests_network"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 339
- },
- "digest": "8f6cec77f890027ad2e01f06e1290e25",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/3?pipeline=drop_guests_network\n{\n \"network.name\": \"Guest\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/3",
- "query": {
- "pipeline": "drop_guests_network"
- },
- "body": {
- "network.name": "Guest"
- },
- "params": {
- "index": "test",
- "id": "3"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 386
- },
- "digest": "3b54be0a1a020edb8943f063f05b5cd7",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/not_prod_dropper\n{\n \"processors\": [\n {\n \"drop\": {\n \"if\": \"Collection tags = ctx.tags;if(tags != null){for (String tag : tags) {if (tag.toLowerCase().contains('prod')) { return false;}}} return true;\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/not_prod_dropper",
- "query": null,
- "body": {
- "processors": [
- {
- "drop": {
- "if": "Collection tags = ctx.tags;if(tags != null){for (String tag : tags) {if (tag.toLowerCase().contains('prod')) { return false;}}} return true;"
- }
- }
- ]
- },
- "params": {
- "id": "not_prod_dropper"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 405
- },
- "digest": "0f3a2ec8a70c87e19582f1e923f79ab0",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/not_prod_dropper\n{\n \"processors\": [\n {\n \"drop\": {\n \"if\": \"\"\"\n Collection tags = ctx.tags;\n if(tags != null){\n for (String tag : tags) {\n if (tag.toLowerCase().contains('prod')) {\n return false;\n }\n }\n }\n return true;\n \"\"\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/not_prod_dropper",
- "query": null,
- "body": {
- "processors": [
- {
- "drop": {
- "if": "\n Collection tags = ctx.tags;\n if(tags != null){\n for (String tag : tags) {\n if (tag.toLowerCase().contains('prod')) {\n return false;\n }\n }\n }\n return true;\n "
- }
- }
- ]
- },
- "params": {
- "id": "not_prod_dropper"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 432
- },
- "digest": "9dbd847c989bbc1a11e0a6d2fd04efe0",
- "lang": "console",
- "found": [],
- "source": "PUT _scripts/not_prod\n{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"\"\"\n Collection tags = ctx.tags;\n if(tags != null){\n for (String tag : tags) {\n if (tag.toLowerCase().contains('prod')) {\n return false;\n }\n }\n }\n return true;\n \"\"\"\n }\n}\nPUT _ingest/pipeline/not_prod_dropper\n{\n \"processors\": [\n {\n \"drop\": {\n \"if\": { \"id\": \"not_prod\" }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_scripts/not_prod",
- "query": null,
- "body": {
- "script": {
- "lang": "painless",
- "source": "\n Collection tags = ctx.tags;\n if(tags != null){\n for (String tag : tags) {\n if (tag.toLowerCase().contains('prod')) {\n return false;\n }\n }\n }\n return true;\n "
- }
- },
- "params": {
- "id": "not_prod"
- },
- "api": "put_script"
- },
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/not_prod_dropper",
- "query": null,
- "body": {
- "processors": [
- {
- "drop": {
- "if": {
- "id": "not_prod"
- }
- }
- }
- ]
- },
- "params": {
- "id": "not_prod_dropper"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 466
- },
- "digest": "da19607976c3740945300c18e692bc49",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/1?pipeline=not_prod_dropper\n{\n \"tags\": [\"application:myapp\", \"env:Stage\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "pipeline": "not_prod_dropper"
- },
- "body": {
- "tags": [
- "application:myapp",
- "env:Stage"
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 481
- },
- "digest": "784dcf96b4970ce6c90d999cdfc2ef0b",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/2?pipeline=not_prod_dropper\n{\n \"tags\": [\"application:myapp\", \"env:Production\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/2",
- "query": {
- "pipeline": "not_prod_dropper"
- },
- "body": {
- "tags": [
- "application:myapp",
- "env:Production"
- ]
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 533
- },
- "digest": "7cc6435cb7508e532df1e761934f1683",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/logs_pipeline\n{\n \"description\": \"A pipeline of pipelines for log files\",\n \"version\": 1,\n \"processors\": [\n {\n \"pipeline\": {\n \"if\": \"ctx.service?.name == 'apache_httpd'\",\n \"name\": \"httpd_pipeline\"\n }\n },\n {\n \"pipeline\": {\n \"if\": \"ctx.service?.name == 'syslog'\",\n \"name\": \"syslog_pipeline\"\n }\n },\n {\n \"fail\": {\n \"if\": \"ctx.service?.name != 'apache_httpd' && ctx.service?.name != 'syslog'\",\n \"message\": \"This pipeline requires service.name to be either `syslog` or `apache_httpd`\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/logs_pipeline",
- "query": null,
- "body": {
- "description": "A pipeline of pipelines for log files",
- "version": 1,
- "processors": [
- {
- "pipeline": {
- "if": "ctx.service?.name == 'apache_httpd'",
- "name": "httpd_pipeline"
- }
- },
- {
- "pipeline": {
- "if": "ctx.service?.name == 'syslog'",
- "name": "syslog_pipeline"
- }
- },
- {
- "fail": {
- "if": "ctx.service?.name != 'apache_httpd' && ctx.service?.name != 'syslog'",
- "message": "This pipeline requires service.name to be either `syslog` or `apache_httpd`"
- }
- }
- ]
- },
- "params": {
- "id": "logs_pipeline"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 580
- },
- "digest": "fe2d94eba550076cc27ee21a711fdb5c",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/check_url\n{\n \"processors\": [\n {\n \"set\": {\n \"if\": \"ctx.href?.url =~ /^http[^s]/\",\n \"field\": \"href.insecure\",\n \"value\": true\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/check_url",
- "query": null,
- "body": {
- "processors": [
- {
- "set": {
- "if": "ctx.href?.url =~ /^http[^s]/",
- "field": "href.insecure",
- "value": true
- }
- }
- ]
- },
- "params": {
- "id": "check_url"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 596
- },
- "digest": "bfc92c930234ada7a3f394263b0deb1e",
- "lang": "console",
- "found": [],
- "source": "POST test/_doc/1?pipeline=check_url\n{\n \"href\": {\n \"url\": \"http://www.elastic.co/\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "pipeline": "check_url"
- },
- "body": {
- "href": {
- "url": "http://www.elastic.co/"
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 618
- },
- "digest": "229eccca4c5d8f5ad0d704c8eb43c3b9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\": 60,\n \"_primary_term\": 1,\n \"found\": true,\n \"_source\": {\n \"href\": {\n \"insecure\": true,\n \"url\": \"http://www.elastic.co/\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/ingest-node.asciidoc",
- "line": 644
- },
- "digest": "2ad6189aef1ecbb52bf0ddbd4e7a80cb",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/check_url\n{\n \"processors\": [\n {\n \"set\": {\n \"if\": \"ctx.href?.url != null && ctx.href.url.startsWith('http://')\",\n \"field\": \"href.insecure\",\n \"value\": true\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/check_url",
- "query": null,
- "body": {
- "processors": [
- {
- "set": {
- "if": "ctx.href?.url != null && ctx.href.url.startsWith('http://')",
- "field": "href.insecure",
- "value": true
- }
- }
- ]
- },
- "params": {
- "id": "check_url"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 321
- },
- "digest": "0c8bce944c1189a8551e8dbd99c365f2",
- "lang": "console",
- "found": [],
- "source": "PUT /postal_codes\n{\n \"mappings\": {\n \"properties\": {\n \"location\": {\n \"type\": \"geo_shape\"\n },\n \"postal_code\": {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/postal_codes",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "location": {
- "type": "geo_shape"
- },
- "postal_code": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "postal_codes"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 340
- },
- "digest": "497a51622ef123efc44e54ba2106385e",
- "lang": "console",
- "found": [],
- "source": "PUT /postal_codes/_doc/1?refresh=wait_for\n{\n \"location\": {\n \"type\": \"envelope\",\n \"coordinates\": [[13.0, 53.0], [14.0, 52.0]]\n },\n \"postal_code\": \"96598\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/postal_codes/_doc/1",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "location": {
- "type": "envelope",
- "coordinates": [
- [
- 13,
- 53
- ],
- [
- 14,
- 52
- ]
- ]
- },
- "postal_code": "96598"
- },
- "params": {
- "index": "postal_codes",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 362
- },
- "digest": "99da25a3d63f98c16df47f21acbf37e7",
- "lang": "console",
- "found": [],
- "source": "PUT /_enrich/policy/postal_policy\n{\n \"geo_match\": {\n \"indices\": \"postal_codes\",\n \"match_field\": \"location\",\n \"enrich_fields\": [\"location\",\"postal_code\"]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_enrich/policy/postal_policy",
- "query": null,
- "body": {
- "geo_match": {
- "indices": "postal_codes",
- "match_field": "location",
- "enrich_fields": [
- "location",
- "postal_code"
- ]
- }
- },
- "params": {
- "name": "postal_policy"
- },
- "api": "enrich.put_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 378
- },
- "digest": "207c04ccbdce0e8a289070a3b0a79ecb",
- "lang": "console",
- "found": [],
- "source": "POST /_enrich/policy/postal_policy/_execute",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 397
- },
- "digest": "83b4a737514a047d31f12f110bed0b5e",
- "lang": "console",
- "found": [],
- "source": "PUT /_ingest/pipeline/postal_lookup\n{\n \"description\": \"Enrich postal codes\",\n \"processors\": [\n {\n \"enrich\": {\n \"policy_name\": \"postal_policy\",\n \"field\": \"geo_location\",\n \"target_field\": \"geo_data\",\n \"shape_relation\": \"INTERSECTS\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/postal_lookup",
- "query": null,
- "body": {
- "description": "Enrich postal codes",
- "processors": [
- {
- "enrich": {
- "policy_name": "postal_policy",
- "field": "geo_location",
- "target_field": "geo_data",
- "shape_relation": "INTERSECTS"
- }
- }
- ]
- },
- "params": {
- "id": "postal_lookup"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 419
- },
- "digest": "ad3b9d676187bebdb62e0f1de9a202e0",
- "lang": "console",
- "found": [],
- "source": "PUT /users/_doc/0?pipeline=postal_lookup\n{\n \"first_name\": \"Mardy\",\n \"last_name\": \"Brown\",\n \"geo_location\": \"POINT (13.5 52.5)\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users/_doc/0",
- "query": {
- "pipeline": "postal_lookup"
- },
- "body": {
- "first_name": "Mardy",
- "last_name": "Brown",
- "geo_location": "POINT (13.5 52.5)"
- },
- "params": {
- "index": "users",
- "id": "0"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 433
- },
- "digest": "a3f3c1f3f31dbd225da5fd14633bc4a0",
- "lang": "console",
- "found": [],
- "source": "GET /users/_doc/0",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/users/_doc/0",
- "query": null,
- "body": null,
- "params": {
- "index": "users",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 441
- },
- "digest": "1fabc3706c34195873abecc44203073a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"users\",\n \"_id\": \"0\",\n \"_version\": 1,\n \"_seq_no\": 55,\n \"_primary_term\": 1,\n \"_source\": {\n \"geo_data\": {\n \"location\": {\n \"type\": \"envelope\",\n \"coordinates\": [[13.0, 53.0], [14.0, 52.0]]\n },\n \"postal_code\": \"96598\"\n },\n \"first_name\": \"Mardy\",\n \"last_name\": \"Brown\",\n \"geo_location\": \"POINT (13.5 52.5)\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 494
- },
- "digest": "927dd38daa489175a5008799452e870a",
- "lang": "console",
- "found": [],
- "source": "PUT /users/_doc/1?refresh=wait_for\n{\n \"email\": \"mardy.brown@asciidocsmith.com\",\n \"first_name\": \"Mardy\",\n \"last_name\": \"Brown\",\n \"city\": \"New Orleans\",\n \"county\": \"Orleans\",\n \"state\": \"LA\",\n \"zip\": 70116,\n \"web\": \"mardy.asciidocsmith.com\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users/_doc/1",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "email": "mardy.brown@asciidocsmith.com",
- "first_name": "Mardy",
- "last_name": "Brown",
- "city": "New Orleans",
- "county": "Orleans",
- "state": "LA",
- "zip": 70116,
- "web": "mardy.asciidocsmith.com"
- },
- "params": {
- "index": "users",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 518
- },
- "digest": "9ab4e8a564e13475cb3a0376be56bb8e",
- "lang": "console",
- "found": [],
- "source": "PUT /_enrich/policy/users-policy\n{\n \"match\": {\n \"indices\": \"users\",\n \"match_field\": \"email\",\n \"enrich_fields\": [\"first_name\", \"last_name\", \"city\", \"zip\", \"state\"]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_enrich/policy/users-policy",
- "query": null,
- "body": {
- "match": {
- "indices": "users",
- "match_field": "email",
- "enrich_fields": [
- "first_name",
- "last_name",
- "city",
- "zip",
- "state"
- ]
- }
- },
- "params": {
- "name": "users-policy"
- },
- "api": "enrich.put_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 534
- },
- "digest": "af4f82ce86672a9bafd834f334c8e1c9",
- "lang": "console",
- "found": [],
- "source": "POST /_enrich/policy/users-policy/_execute",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 551
- },
- "digest": "958b661d89b2beeb0cfefe8edbe3e408",
- "lang": "console",
- "found": [],
- "source": "PUT /_ingest/pipeline/user_lookup\n{\n \"description\" : \"Enriching user details to messages\",\n \"processors\" : [\n {\n \"enrich\" : {\n \"policy_name\": \"users-policy\",\n \"field\" : \"email\",\n \"target_field\": \"user\",\n \"max_matches\": \"1\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/user_lookup",
- "query": null,
- "body": {
- "description": "Enriching user details to messages",
- "processors": [
- {
- "enrich": {
- "policy_name": "users-policy",
- "field": "email",
- "target_field": "user",
- "max_matches": "1"
- }
- }
- ]
- },
- "params": {
- "id": "user_lookup"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 573
- },
- "digest": "7495d7e8d99e4f5ac8034988b706e09d",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index/_doc/my_id?pipeline=user_lookup\n{\n \"email\": \"mardy.brown@asciidocsmith.com\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "user_lookup"
- },
- "body": {
- "email": "mardy.brown@asciidocsmith.com"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 585
- },
- "digest": "ce20ab8067b6e4ad68e8ad7a5a0b73fd",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/enrich.asciidoc",
- "line": 593
- },
- "digest": "51c5541ef8f46d02fe0a82a77fd10381",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"my_index\",\n \"_id\": \"my_id\",\n \"_version\": 1,\n \"_seq_no\": 55,\n \"_primary_term\": 1,\n \"_source\": {\n \"user\": {\n \"email\": \"mardy.brown@asciidocsmith.com\",\n \"first_name\": \"Mardy\",\n \"last_name\": \"Brown\",\n \"zip\": 70116,\n \"city\": \"New Orleans\",\n \"state\": \"LA\"\n },\n \"email\": \"mardy.brown@asciidocsmith.com\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 24
- },
- "digest": "92223bd2873546d7efb557de81b9f75d",
- "lang": "console",
- "found": [],
- "source": "PUT circles\n{\n \"mappings\": {\n \"properties\": {\n \"circle\": {\n \"type\": \"geo_shape\"\n }\n }\n }\n}\n\nPUT _ingest/pipeline/polygonize_circles\n{\n \"description\": \"translate circle to polygon\",\n \"processors\": [\n {\n \"circle\": {\n \"field\": \"circle\",\n \"error_distance\": 28.0,\n \"shape_type\": \"geo_shape\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/circles",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "circle": {
- "type": "geo_shape"
- }
- }
- }
- },
- "params": {
- "index": "circles"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/polygonize_circles",
- "query": null,
- "body": {
- "description": "translate circle to polygon",
- "processors": [
- {
- "circle": {
- "field": "circle",
- "error_distance": 28,
- "shape_type": "geo_shape"
- }
- }
- ]
- },
- "params": {
- "id": "polygonize_circles"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 61
- },
- "digest": "b0b1ae9582599f501f3b3ed8a42ea2af",
- "lang": "console",
- "found": [],
- "source": "PUT circles/_doc/1?pipeline=polygonize_circles\n{\n \"circle\": \"CIRCLE (30 10 40)\"\n}\n\nGET circles/_doc/1",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/circles/_doc/1",
- "query": {
- "pipeline": "polygonize_circles"
- },
- "body": {
- "circle": "CIRCLE (30 10 40)"
- },
- "params": {
- "index": "circles",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/circles/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "circles",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 74
- },
- "digest": "0cec3cd5ad68774be62c362e10bab293",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"circles\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\": 22,\n \"_primary_term\": 1,\n \"_source\": {\n \"circle\": \"POLYGON ((30.000365257263184 10.0, 30.000111397193788 10.00034284530941, 29.999706043744222 10.000213571721195, 29.999706043744222 9.999786428278805, 30.000111397193788 9.99965715469059, 30.000365257263184 10.0))\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 94
- },
- "digest": "415b46bc2b7a7b4dcf9a73ac67ea20e9",
- "lang": "console",
- "found": [],
- "source": "PUT circles/_doc/2?pipeline=polygonize_circles\n{\n \"circle\": {\n \"type\": \"circle\",\n \"radius\": \"40m\",\n \"coordinates\": [30, 10]\n }\n}\n\nGET circles/_doc/2",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/circles/_doc/2",
- "query": {
- "pipeline": "polygonize_circles"
- },
- "body": {
- "circle": {
- "type": "circle",
- "radius": "40m",
- "coordinates": [
- 30,
- 10
- ]
- }
- },
- "params": {
- "index": "circles",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/circles/_doc/2",
- "query": null,
- "body": null,
- "params": {
- "index": "circles",
- "id": "2"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/circle.asciidoc",
- "line": 111
- },
- "digest": "0c8975f6497b2f06e68077b613427d41",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"circles\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"_seq_no\": 22,\n \"_primary_term\": 1,\n \"_source\": {\n \"circle\": {\n \"coordinates\": [\n [\n [30.000365257263184, 10.0],\n [30.000111397193788, 10.00034284530941],\n [29.999706043744222, 10.000213571721195],\n [29.999706043744222, 9.999786428278805],\n [30.000111397193788, 9.99965715469059],\n [30.000365257263184, 10.0]\n ]\n ],\n \"type\": \"Polygon\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 20
- },
- "digest": "83c8cce0372677857609a2e80e8eb1c4",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/monthlyindex\n{\n \"description\": \"monthly date-time index naming\",\n \"processors\" : [\n {\n \"date_index_name\" : {\n \"field\" : \"date1\",\n \"index_name_prefix\" : \"myindex-\",\n \"date_rounding\" : \"M\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/monthlyindex",
- "query": null,
- "body": {
- "description": "monthly date-time index naming",
- "processors": [
- {
- "date_index_name": {
- "field": "date1",
- "index_name_prefix": "myindex-",
- "date_rounding": "M"
- }
- }
- ]
- },
- "params": {
- "id": "monthlyindex"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 40
- },
- "digest": "9f3f1b6bd431f6fa40fc17ce9a5a89b8",
- "lang": "console",
- "found": [],
- "source": "PUT /myindex/_doc/1?pipeline=monthlyindex\n{\n \"date1\" : \"2016-04-25T12:02:01.789Z\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/myindex/_doc/1",
- "query": {
- "pipeline": "monthlyindex"
- },
- "body": {
- "date1": "2016-04-25T12:02:01.789Z"
- },
- "params": {
- "index": "myindex",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 49
- },
- "digest": "2a1fdfaf9024667c454f5770786bb100",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"myindex-2016-04-01\",\n \"_id\" : \"1\",\n \"_version\" : 1,\n \"result\" : \"created\",\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 1,\n \"failed\" : 0\n },\n \"_seq_no\" : 55,\n \"_primary_term\" : 1\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 75
- },
- "digest": "44f672df54c28327070b4ca09999718c",
- "lang": "console",
- "found": [],
- "source": "POST _ingest/pipeline/_simulate\n{\n \"pipeline\" :\n {\n \"description\": \"monthly date-time index naming\",\n \"processors\" : [\n {\n \"date_index_name\" : {\n \"field\" : \"date1\",\n \"index_name_prefix\" : \"myindex-\",\n \"date_rounding\" : \"M\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_source\": {\n \"date1\": \"2016-04-25T12:02:01.789Z\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": null,
- "body": {
- "pipeline": {
- "description": "monthly date-time index naming",
- "processors": [
- {
- "date_index_name": {
- "field": "date1",
- "index_name_prefix": "myindex-",
- "date_rounding": "M"
- }
- }
- ]
- },
- "docs": [
- {
- "_source": {
- "date1": "2016-04-25T12:02:01.789Z"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/date-index-name.asciidoc",
- "line": 104
- },
- "digest": "bd1860d159b6986340faccaafb869863",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\" : [\n {\n \"doc\" : {\n \"_id\" : \"_id\",\n \"_index\" : \"\",\n \"_source\" : {\n \"date1\" : \"2016-04-25T12:02:01.789Z\"\n },\n \"_ingest\" : {\n \"timestamp\" : \"2016-11-08T19:43:03.850+0000\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 46
- },
- "digest": "0b6aa8f2d6916951959d6186b25d2b54",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/geoip\n{\n \"description\" : \"Add geoip info\",\n \"processors\" : [\n {\n \"geoip\" : {\n \"field\" : \"ip\"\n }\n }\n ]\n}\nPUT my_index/_doc/my_id?pipeline=geoip\n{\n \"ip\": \"8.8.8.8\"\n}\nGET my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/geoip",
- "query": null,
- "body": {
- "description": "Add geoip info",
- "processors": [
- {
- "geoip": {
- "field": "ip"
- }
- }
- ]
- },
- "params": {
- "id": "geoip"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "geoip"
- },
- "body": {
- "ip": "8.8.8.8"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 68
- },
- "digest": "e49a98d543ca4c915bca860ba4aa086e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"my_index\",\n \"_id\": \"my_id\",\n \"_version\": 1,\n \"_seq_no\": 55,\n \"_primary_term\": 1,\n \"_source\": {\n \"ip\": \"8.8.8.8\",\n \"geoip\": {\n \"continent_name\": \"North America\",\n \"country_iso_code\": \"US\",\n \"location\": { \"lat\": 37.751, \"lon\": -97.822 }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 93
- },
- "digest": "573a466d7a3a8e31194666e2ecc1d92a",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/geoip\n{\n \"description\" : \"Add geoip info\",\n \"processors\" : [\n {\n \"geoip\" : {\n \"field\" : \"ip\",\n \"target_field\" : \"geo\",\n \"database_file\" : \"GeoLite2-Country.mmdb\"\n }\n }\n ]\n}\nPUT my_index/_doc/my_id?pipeline=geoip\n{\n \"ip\": \"8.8.8.8\"\n}\nGET my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/geoip",
- "query": null,
- "body": {
- "description": "Add geoip info",
- "processors": [
- {
- "geoip": {
- "field": "ip",
- "target_field": "geo",
- "database_file": "GeoLite2-Country.mmdb"
- }
- }
- ]
- },
- "params": {
- "id": "geoip"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "geoip"
- },
- "body": {
- "ip": "8.8.8.8"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 117
- },
- "digest": "6693dd5a6a7bb3c5670ac5208e0382e5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"my_index\",\n \"_id\": \"my_id\",\n \"_version\": 1,\n \"_seq_no\": 65,\n \"_primary_term\": 1,\n \"_source\": {\n \"ip\": \"8.8.8.8\",\n \"geo\": {\n \"continent_name\": \"North America\",\n \"country_iso_code\": \"US\",\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 144
- },
- "digest": "c5681f52305e065ef13c3e0ad5393263",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/geoip\n{\n \"description\" : \"Add geoip info\",\n \"processors\" : [\n {\n \"geoip\" : {\n \"field\" : \"ip\"\n }\n }\n ]\n}\n\nPUT my_index/_doc/my_id?pipeline=geoip\n{\n \"ip\": \"80.231.5.0\"\n}\n\nGET my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/geoip",
- "query": null,
- "body": {
- "description": "Add geoip info",
- "processors": [
- {
- "geoip": {
- "field": "ip"
- }
- }
- ]
- },
- "params": {
- "id": "geoip"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "geoip"
- },
- "body": {
- "ip": "80.231.5.0"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 168
- },
- "digest": "dc4d172710fc0407deddf3d7a752c1e8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"my_index\",\n \"_id\" : \"my_id\",\n \"_version\" : 1,\n \"_seq_no\" : 71,\n \"_primary_term\": 1,\n \"found\" : true,\n \"_source\" : {\n \"ip\" : \"80.231.5.0\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/geoip.asciidoc",
- "line": 193
- },
- "digest": "0737ebaea33631f001fb3f4226948492",
- "lang": "console",
- "found": [],
- "source": "PUT my_ip_locations\n{\n \"mappings\": {\n \"properties\": {\n \"geoip\": {\n \"properties\": {\n \"location\": { \"type\": \"geo_point\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_ip_locations",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "geoip": {
- "properties": {
- "location": {
- "type": "geo_point"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_ip_locations"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 72
- },
- "digest": "5024c524a7db0d6bb44c1820007cc5f4",
- "lang": "console",
- "found": [],
- "source": "POST _ingest/pipeline/_simulate\n{\n \"pipeline\": {\n \"description\" : \"...\",\n \"processors\": [\n {\n \"grok\": {\n \"field\": \"message\",\n \"patterns\": [\"%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes:int} %{NUMBER:duration:double}\"]\n }\n }\n ]\n },\n \"docs\":[\n {\n \"_source\": {\n \"message\": \"55.3.244.1 GET /index.html 15824 0.043\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": null,
- "body": {
- "pipeline": {
- "description": "...",
- "processors": [
- {
- "grok": {
- "field": "message",
- "patterns": [
- "%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes:int} %{NUMBER:duration:double}"
- ]
- }
- }
- ]
- },
- "docs": [
- {
- "_source": {
- "message": "55.3.244.1 GET /index.html 15824 0.043"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 99
- },
- "digest": "600ab0d13c6197778a413bc29bb5e3ca",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_index\": \"_index\",\n \"_id\": \"_id\",\n \"_source\" : {\n \"duration\" : 0.043,\n \"request\" : \"/index.html\",\n \"method\" : \"GET\",\n \"bytes\" : 15824,\n \"client\" : \"55.3.244.1\",\n \"message\" : \"55.3.244.1 GET /index.html 15824 0.043\"\n },\n \"_ingest\": {\n \"timestamp\": \"2016-11-08T19:43:03.850+0000\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 164
- },
- "digest": "77828fcaecc3f058c48b955928198ff6",
- "lang": "console",
- "found": [],
- "source": "POST _ingest/pipeline/_simulate\n{\n \"pipeline\": {\n \"description\" : \"parse multiple patterns\",\n \"processors\": [\n {\n \"grok\": {\n \"field\": \"message\",\n \"patterns\": [\"%{FAVORITE_DOG:pet}\", \"%{FAVORITE_CAT:pet}\"],\n \"pattern_definitions\" : {\n \"FAVORITE_DOG\" : \"beagle\",\n \"FAVORITE_CAT\" : \"burmese\"\n }\n }\n }\n ]\n},\n\"docs\":[\n {\n \"_source\": {\n \"message\": \"I love burmese cats!\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": null,
- "body": {
- "pipeline": {
- "description": "parse multiple patterns",
- "processors": [
- {
- "grok": {
- "field": "message",
- "patterns": [
- "%{FAVORITE_DOG:pet}",
- "%{FAVORITE_CAT:pet}"
- ],
- "pattern_definitions": {
- "FAVORITE_DOG": "beagle",
- "FAVORITE_CAT": "burmese"
- }
- }
- }
- ]
- },
- "docs": [
- {
- "_source": {
- "message": "I love burmese cats!"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 195
- },
- "digest": "eaae18f5701d14f94da7a085805271ca",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_index\": \"_index\",\n \"_id\": \"_id\",\n \"_source\": {\n \"message\": \"I love burmese cats!\",\n \"pet\": \"burmese\"\n },\n \"_ingest\": {\n \"timestamp\": \"2016-11-08T19:43:03.850+0000\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 254
- },
- "digest": "d101a9d043cc8b6a880bbc2c64ca1e8c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_index\": \"_index\",\n \"_id\": \"_id\",\n \"_source\": {\n \"message\": \"I love burmese cats!\",\n \"pet\": \"burmese\"\n },\n \"_ingest\": {\n \"_grok_match_index\": \"1\",\n \"timestamp\": \"2016-11-08T19:43:03.850+0000\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/grok.asciidoc",
- "line": 288
- },
- "digest": "98574a419b6be603a0af8f7f22a92d23",
- "lang": "console",
- "found": [],
- "source": "GET _ingest/processor/grok",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ingest/processor/grok",
- "query": null,
- "body": null,
- "params": null,
- "api": "ingest.processor_grok"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/pipeline.asciidoc",
- "line": 31
- },
- "digest": "8494d09c39e109a012094eb9d6ec52ac",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/pipelineA\n{\n \"description\" : \"inner pipeline\",\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"inner_pipeline_set\",\n \"value\": \"inner\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/pipelineA",
- "query": null,
- "body": {
- "description": "inner pipeline",
- "processors": [
- {
- "set": {
- "field": "inner_pipeline_set",
- "value": "inner"
- }
- }
- ]
- },
- "params": {
- "id": "pipelineA"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/pipeline.asciidoc",
- "line": 49
- },
- "digest": "02c48d461536709c3fc8a0e8147c3787",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/pipelineB\n{\n \"description\" : \"outer pipeline\",\n \"processors\" : [\n {\n \"pipeline\" : {\n \"name\": \"pipelineA\"\n }\n },\n {\n \"set\" : {\n \"field\": \"outer_pipeline_set\",\n \"value\": \"outer\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/pipelineB",
- "query": null,
- "body": {
- "description": "outer pipeline",
- "processors": [
- {
- "pipeline": {
- "name": "pipelineA"
- }
- },
- {
- "set": {
- "field": "outer_pipeline_set",
- "value": "outer"
- }
- }
- ]
- },
- "params": {
- "id": "pipelineB"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/pipeline.asciidoc",
- "line": 74
- },
- "digest": "88647e818ffcbe39e5cf627f5b9a676c",
- "lang": "console",
- "found": [],
- "source": "PUT /myindex/_doc/1?pipeline=pipelineB\n{\n \"field\": \"value\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/myindex/_doc/1",
- "query": {
- "pipeline": "pipelineB"
- },
- "body": {
- "field": "value"
- },
- "params": {
- "index": "myindex",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/pipeline.asciidoc",
- "line": 85
- },
- "digest": "ffa7b6c079bfe0840f611ddbedf9030f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"myindex\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 66,\n \"_primary_term\": 1,\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/script.asciidoc",
- "line": 50
- },
- "digest": "197d87fdb4aeccf3d9a08ae485c12306",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/my_index\n{\n \"description\": \"use index:my_index\",\n \"processors\": [\n {\n \"script\": {\n \"source\": \"\"\"\n ctx._index = 'my_index';\n \"\"\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my_index",
- "query": null,
- "body": {
- "description": "use index:my_index",
- "processors": [
- {
- "script": {
- "source": "\n ctx._index = 'my_index';\n "
- }
- }
- ]
- },
- "params": {
- "id": "my_index"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/script.asciidoc",
- "line": 69
- },
- "digest": "cdc55ad88de55999fe2d79fd4781918b",
- "lang": "console",
- "found": [],
- "source": "PUT any_index/_doc/1?pipeline=my_index\n{\n \"message\": \"text\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/any_index/_doc/1",
- "query": {
- "pipeline": "my_index"
- },
- "body": {
- "message": "text"
- },
- "params": {
- "index": "any_index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/script.asciidoc",
- "line": 80
- },
- "digest": "54e1bdda2188f2ce04e3a201a78c7331",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"my_index\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 89,\n \"_primary_term\": 1,\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/set.asciidoc",
- "line": 33
- },
- "digest": "366b29ef910f12c7fbced35f39000953",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/set_os\n{\n \"description\": \"sets the value of host.os.name from the field os\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"host.os.name\",\n \"value\": \"{{os}}\"\n }\n }\n ]\n}\n\nPOST _ingest/pipeline/set_os/_simulate\n{\n \"docs\": [\n {\n \"_source\": {\n \"os\": \"Ubuntu\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/set_os",
- "query": null,
- "body": {
- "description": "sets the value of host.os.name from the field os",
- "processors": [
- {
- "set": {
- "field": "host.os.name",
- "value": "{{os}}"
- }
- }
- ]
- },
- "params": {
- "id": "set_os"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "POST",
- "url": "/_ingest/pipeline/set_os/_simulate",
- "query": null,
- "body": {
- "docs": [
- {
- "_source": {
- "os": "Ubuntu"
- }
- }
- ]
- },
- "params": {
- "id": "set_os"
- },
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/set.asciidoc",
- "line": 62
- },
- "digest": "11d6095110e3c41055edd75fa881e742",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\" : [\n {\n \"doc\" : {\n \"_index\" : \"_index\",\n \"_id\" : \"_id\",\n \"_source\" : {\n \"host\" : {\n \"os\" : {\n \"name\" : \"Ubuntu\"\n }\n },\n \"os\" : \"Ubuntu\"\n },\n \"_ingest\" : {\n \"timestamp\" : \"2019-03-11T21:54:37.909224Z\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/processors/user-agent.asciidoc",
- "line": 27
- },
- "digest": "9c504b5c486d9df689a22b11412e61a3",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/user_agent\n{\n \"description\" : \"Add user agent information\",\n \"processors\" : [\n {\n \"user_agent\" : {\n \"field\" : \"agent\"\n }\n }\n ]\n}\nPUT my_index/_doc/my_id?pipeline=user_agent\n{\n \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\"\n}\nGET my_index/_doc/my_id",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/user_agent",
- "query": null,
- "body": {
- "description": "Add user agent information",
- "processors": [
- {
- "user_agent": {
- "field": "agent"
- }
- }
- ]
- },
- "params": {
- "id": "user_agent"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "PUT",
- "url": "/my_index/_doc/my_id",
- "query": {
- "pipeline": "user_agent"
- },
- "body": {
- "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
- },
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/my_index/_doc/my_id",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index",
- "id": "my_id"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/processors/user-agent.asciidoc",
- "line": 49
- },
- "digest": "d6031f0550f6f3a0102210637301b121",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_index\": \"my_index\",\n \"_id\": \"my_id\",\n \"_version\": 1,\n \"_seq_no\": 22,\n \"_primary_term\": 1,\n \"_source\": {\n \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\n \"user_agent\": {\n \"name\": \"Chrome\",\n \"original\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\n \"version\": \"51.0.2704.103\",\n \"os\": {\n \"name\": \"Mac OS X\",\n \"version\": \"10.10.5\",\n \"full\": \"Mac OS X 10.10.5\"\n },\n \"device\" : {\n \"name\" : \"Other\"\n },\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/ilm-tutorial.asciidoc",
- "line": 69
- },
- "digest": "080b3362db1fa14e1ca4e290d6e6447d",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/timeseries_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": { <1>\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"50GB\", <2>\n \"max_age\": \"30d\"\n }\n }\n },\n \"delete\": {\n \"min_age\": \"90d\", <3>\n \"actions\": {\n \"delete\": {} <4>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/timeseries_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "50GB",
- "max_age": "30d"
- }
- }
- },
- "delete": {
- "min_age": "90d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "timeseries_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-tutorial.asciidoc",
- "line": 120
- },
- "digest": "2a7bf2c29183bff1f3b534002d56edfb",
- "lang": "console",
- "found": [],
- "source": "PUT _index_template/timeseries_template\n{\n \"index_patterns\": [\"timeseries\"], <1>\n \"data_stream\": {},\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1,\n \"index.lifecycle.name\": \"timeseries_policy\" <2>\n },\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\" <3>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/timeseries_template",
- "query": null,
- "body": {
- "index_patterns": [
- "timeseries"
- ],
- "data_stream": {},
- "template": {
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1,
- "index.lifecycle.name": "timeseries_policy"
- },
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- }
- }
- },
- "params": {
- "name": "timeseries_template"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-tutorial.asciidoc",
- "line": 164
- },
- "digest": "a62833baf15f2c9ac094a9289e56a012",
- "lang": "console",
- "found": [],
- "source": "POST timeseries/_doc\n{\n \"message\": \"logged the request\",\n \"@timestamp\": \"1591890611\"\n}\n",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/timeseries/_doc",
- "query": null,
- "body": {
- "message": "logged the request",
- "@timestamp": "1591890611"
- },
- "params": {
- "index": "timeseries"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-tutorial.asciidoc",
- "line": 202
- },
- "digest": "ea66a620c23337545e409c120c4ed5d9",
- "lang": "console",
- "found": [],
- "source": "GET .ds-timeseries-*/_ilm/explain",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.ds-timeseries-*/_ilm/explain",
- "query": null,
- "body": null,
- "params": {
- "index": ".ds-timeseries-*"
- },
- "api": "ilm.explain_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-tutorial.asciidoc",
- "line": 214
- },
- "digest": "84c5b2e53fab9b7421f9c6fc2bae563c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \".ds-timeseries-000001\": {\n \"index\": \".ds-timeseries-000001\",\n \"managed\": true,\n \"policy\": \"timeseries_policy\", <1>\n \"lifecycle_date_millis\": 1538475653281,\n \"age\": \"30s\", <2>\n \"phase\": \"hot\",\n \"phase_time_millis\": 1538475653317,\n \"action\": \"rollover\",\n \"action_time_millis\": 1538475653317,\n \"step\": \"check-rollover-ready\", <3>\n \"step_time_millis\": 1538475653317,\n \"phase_execution\": {\n \"policy\": \"timeseries_policy\",\n \"phase_definition\": { <4>\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"50gb\",\n \"max_age\": \"30d\"\n }\n }\n },\n \"version\": 1,\n \"modified_date_in_millis\": 1539609701576\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/ilm-tutorial.asciidoc",
- "line": 325
- },
- "digest": "4d01c243f7406c98546311ec1ff6b7e6",
- "lang": "console",
- "found": [],
- "source": "PUT _template/timeseries_template\n{\n \"index_patterns\": [\"timeseries-*\"], <1>\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1,\n \"index.lifecycle.name\": \"timeseries_policy\", <2>\n \"index.lifecycle.rollover_alias\": \"timeseries\" <3>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/timeseries_template",
- "query": null,
- "body": {
- "index_patterns": [
- "timeseries-*"
- ],
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1,
- "index.lifecycle.name": "timeseries_policy",
- "index.lifecycle.rollover_alias": "timeseries"
- }
- },
- "params": {
- "name": "timeseries_template"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-tutorial.asciidoc",
- "line": 367
- },
- "digest": "7148c8512079d378af70302e65502dd2",
- "lang": "console",
- "found": [],
- "source": "PUT timeseries-000001\n{\n \"aliases\": {\n \"timeseries\": {\n \"is_write_index\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/timeseries-000001",
- "query": null,
- "body": {
- "aliases": {
- "timeseries": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "timeseries-000001"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-tutorial.asciidoc",
- "line": 399
- },
- "digest": "2ffa953b29ed0156c9e610daf66b8e48",
- "lang": "console",
- "found": [],
- "source": "GET timeseries-*/_ilm/explain",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/timeseries-*/_ilm/explain",
- "query": null,
- "body": null,
- "params": {
- "index": "timeseries-*"
- },
- "api": "ilm.explain_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-allocate.asciidoc",
- "line": 54
- },
- "digest": "1116c769f39f0c7fe86ec2a4871efcd5",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"allocate\" : {\n \"number_of_replicas\" : 2\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "allocate": {
- "number_of_replicas": 2
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-allocate.asciidoc",
- "line": 82
- },
- "digest": "0518c673094fb18ecb491a3b78af4695",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"allocate\" : {\n \"include\" : {\n \"box_type\": \"hot,warm\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "allocate": {
- "include": {
- "box_type": "hot,warm"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-allocate.asciidoc",
- "line": 112
- },
- "digest": "9d461ae140ddc018efd2650559800cd1",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"allocate\" : {\n \"number_of_replicas\": 1,\n \"require\" : {\n \"box_type\": \"cold\"\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "allocate": {
- "number_of_replicas": 1,
- "require": {
- "box_type": "cold"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-delete.asciidoc",
- "line": 25
- },
- "digest": "053497b6960f80fd7b005b7c6d54358f",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"delete\": {\n \"actions\": {\n \"delete\" : { }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "delete": {
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-forcemerge.asciidoc",
- "line": 37
- },
- "digest": "eb5486d2fe4283475bf9e0e09280be16",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"forcemerge\" : {\n \"max_num_segments\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "forcemerge": {
- "max_num_segments": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-freeze.asciidoc",
- "line": 23
- },
- "digest": "0345fbd95c4516a89ac5ad261a16be8f",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"cold\": {\n \"actions\": {\n \"freeze\" : { }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "cold": {
- "actions": {
- "freeze": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-readonly.asciidoc",
- "line": 18
- },
- "digest": "fc9a1b1173690a911725cff3912e9755",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"readonly\" : { }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "readonly": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-rollover.asciidoc",
- "line": 30
- },
- "digest": "d7e7489b7d176aa854dfc785a12feab3",
- "lang": "console",
- "found": [],
- "source": "PUT my_index-000001\n{\n \"settings\": {\n \"index.lifecycle.name\": \"my_policy\",\n \"index.lifecycle.rollover_alias\": \"my_data\"\n },\n \"aliases\": {\n \"my_data\": {\n \"is_write_index\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index-000001",
- "query": null,
- "body": {
- "settings": {
- "index.lifecycle.name": "my_policy",
- "index.lifecycle.rollover_alias": "my_data"
- },
- "aliases": {
- "my_data": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "my_index-000001"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-rollover.asciidoc",
- "line": 79
- },
- "digest": "19211ccf772f1dee7b500c21f4a9a805",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\" : {\n \"max_size\": \"100GB\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "100GB"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-rollover.asciidoc",
- "line": 102
- },
- "digest": "cfd4b34f35e531a20739a3b308d57134",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\" : {\n \"max_docs\": 100000000\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_docs": 100000000
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-rollover.asciidoc",
- "line": 125
- },
- "digest": "d4a41fb74b41b41a0ee114a2311f2815",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\" : {\n \"max_age\": \"7d\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_age": "7d"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-rollover.asciidoc",
- "line": 150
- },
- "digest": "8940f2b911220acc9afef6360b6c13c4",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\" : {\n \"max_age\": \"7d\",\n \"max_size\": \"100GB\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_age": "7d",
- "max_size": "100GB"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-rollover.asciidoc",
- "line": 178
- },
- "digest": "f6c79fa1c01bb4539d0cba0bd62c1ce0",
- "lang": "console",
- "found": [],
- "source": "PUT /_ilm/policy/rollover_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"50G\"\n }\n }\n },\n \"delete\": {\n \"min_age\": \"1d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/rollover_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "50G"
- }
- }
- },
- "delete": {
- "min_age": "1d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "rollover_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-searchable-snapshot.asciidoc",
- "line": 36
- },
- "digest": "3f2e5132e35b9e8b3203a4a0541cf0d4",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"cold\": {\n \"actions\": {\n \"searchable_snapshot\" : {\n \"snapshot_repository\" : \"backing_repo\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "cold": {
- "actions": {
- "searchable_snapshot": {
- "snapshot_repository": "backing_repo"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-set-priority.asciidoc",
- "line": 29
- },
- "digest": "149a0eea54cdf6ea3052af6dba2d2a63",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"set_priority\" : {\n \"priority\": 50\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "set_priority": {
- "priority": 50
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-shrink.asciidoc",
- "line": 49
- },
- "digest": "f3b4ddce8ff21fc1a76a7c0d9c36650e",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"actions\": {\n \"shrink\" : {\n \"number_of_shards\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "actions": {
- "shrink": {
- "number_of_shards": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-unfollow.asciidoc",
- "line": 54
- },
- "digest": "a5a58e8ad66afe831bc295500e3e8739",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"unfollow\" : {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "unfollow": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/actions/ilm-wait-for-snapshot.asciidoc",
- "line": 21
- },
- "digest": "83062a543163370328cf2e21a68c1bd3",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"delete\": {\n \"actions\": {\n \"wait_for_snapshot\" : {\n \"policy\": \"slm-policy-name\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "delete": {
- "actions": {
- "wait_for_snapshot": {
- "policy": "slm-policy-name"
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/set-up-lifecycle-policy.asciidoc",
- "line": 44
- },
- "digest": "7ecf197610e30c20f7206513ce393822",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"hot\": {\n \"actions\": {\n \"rollover\": {\n \"max_size\": \"25GB\" <1>\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {} <2>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "hot": {
- "actions": {
- "rollover": {
- "max_size": "25GB"
- }
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/set-up-lifecycle-policy.asciidoc",
- "line": 91
- },
- "digest": "f29c02d259065033bd557519d1b21481",
- "lang": "console",
- "found": [],
- "source": "PUT _template/my_template\n{\n \"index_patterns\": [\"test-*\"], <1>\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1,\n \"index.lifecycle.name\": \"my_policy\", <2>\n \"index.lifecycle.rollover_alias\": \"test-alias\" <3>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/my_template",
- "query": null,
- "body": {
- "index_patterns": [
- "test-*"
- ],
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1,
- "index.lifecycle.name": "my_policy",
- "index.lifecycle.rollover_alias": "test-alias"
- }
- },
- "params": {
- "name": "my_template"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/set-up-lifecycle-policy.asciidoc",
- "line": 138
- },
- "digest": "25737fd456fd317cc4cc2db76b6cf28e",
- "lang": "console",
- "found": [],
- "source": "PUT test-000001\n{\n \"aliases\": {\n \"test-alias\":{\n \"is_write_index\": true <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test-000001",
- "query": null,
- "body": {
- "aliases": {
- "test-alias": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "test-000001"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/set-up-lifecycle-policy.asciidoc",
- "line": 175
- },
- "digest": "d690a6af462c70a783625a323e11c72c",
- "lang": "console",
- "found": [],
- "source": "PUT test-index\n{\n \"settings\": {\n \"number_of_shards\": 1,\n \"number_of_replicas\": 1,\n \"index.lifecycle.name\": \"my_policy\" <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test-index",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 1,
- "index.lifecycle.name": "my_policy"
- }
- },
- "params": {
- "index": "test-index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/set-up-lifecycle-policy.asciidoc",
- "line": 251
- },
- "digest": "ec195297eb804cba1cb19c9926773059",
- "lang": "console",
- "found": [],
- "source": "PUT mylogs-pre-ilm*/_settings <1>\n{\n \"index\": {\n \"lifecycle\": {\n \"name\": \"mylogs_policy_existing\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/mylogs-pre-ilm*/_settings",
- "query": null,
- "body": {
- "index": {
- "lifecycle": {
- "name": "mylogs_policy_existing"
- }
- }
- },
- "params": {
- "index": "mylogs-pre-ilm*"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 16
- },
- "digest": "1b37e2237c9e3aaf84d56cc5c0bdb9ec",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/shrink-index\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"5d\",\n \"actions\": {\n \"shrink\": {\n \"number_of_shards\": 4\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/shrink-index",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "min_age": "5d",
- "actions": {
- "shrink": {
- "number_of_shards": 4
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "shrink-index"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 39
- },
- "digest": "9b196e961ef4b8c7e07b4e3c8f94c647",
- "lang": "console",
- "found": [],
- "source": "PUT /myindex\n{\n \"settings\": {\n \"index.number_of_shards\": 2,\n \"index.lifecycle.name\": \"shrink-index\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/myindex",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 2,
- "index.lifecycle.name": "shrink-index"
- }
- },
- "params": {
- "index": "myindex"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 58
- },
- "digest": "943f92e1d3fa566ef23659be2d96f222",
- "lang": "console",
- "found": [],
- "source": "GET /myindex/_ilm/explain",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/myindex/_ilm/explain",
- "query": null,
- "body": null,
- "params": {
- "index": "myindex"
- },
- "api": "ilm.explain_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 66
- },
- "digest": "e2c63d3708faebbeb5e705dde67e3c9c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\" : {\n \"myindex\" : {\n \"index\" : \"myindex\",\n \"managed\" : true,\n \"policy\" : \"shrink-index\", <1>\n \"lifecycle_date_millis\" : 1541717265865,\n \"age\": \"5.1d\", <2>\n \"phase\" : \"warm\", <3>\n \"phase_time_millis\" : 1541717272601,\n \"action\" : \"shrink\", <4>\n \"action_time_millis\" : 1541717272601,\n \"step\" : \"ERROR\", <5>\n \"step_time_millis\" : 1541717272688,\n \"failed_step\" : \"shrink\", <6>\n \"step_info\" : {\n \"type\" : \"illegal_argument_exception\", <7>\n \"reason\" : \"the number of target shards [4] must be less that the number of source shards [2]\"\n },\n \"phase_execution\" : {\n \"policy\" : \"shrink-index\",\n \"phase_definition\" : { <8>\n \"min_age\" : \"5d\",\n \"actions\" : {\n \"shrink\" : {\n \"number_of_shards\" : 4\n }\n }\n },\n \"version\" : 1,\n \"modified_date_in_millis\" : 1541717264230\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 117
- },
- "digest": "bd5bd5d8b3d81241335fe1e5747080ac",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/shrink-index\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"5d\",\n \"actions\": {\n \"shrink\": {\n \"number_of_shards\": 1\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/shrink-index",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "min_age": "5d",
- "actions": {
- "shrink": {
- "number_of_shards": 1
- }
- }
- }
- }
- }
- },
- "params": {
- "policy": "shrink-index"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/error-handling.asciidoc",
- "line": 143
- },
- "digest": "235513edcb5ce3fe2e38a781eeefa6a0",
- "lang": "console",
- "found": [],
- "source": "POST /myindex/_ilm/retry",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/myindex/_ilm/retry",
- "query": null,
- "body": null,
- "params": {
- "index": "myindex"
- },
- "api": "ilm.retry"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/start-stop.asciidoc",
- "line": 59
- },
- "digest": "182df084f028479ecbe8d7648ddad892",
- "lang": "console",
- "found": [],
- "source": "GET _ilm/status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ilm/status",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.get_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/start-stop.asciidoc",
- "line": 66
- },
- "digest": "99e0bec31e49636bc0053ac66bc29352",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"RUNNING\"\n}"
- },
- {
- "source_location": {
- "file": "ilm/start-stop.asciidoc",
- "line": 82
- },
- "digest": "585a34ad79aee16678b37da785933ac8",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/stop",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.stop"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/start-stop.asciidoc",
- "line": 100
- },
- "digest": "8de1c258461189d65cba97dbc94600cd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"STOPPING\"\n}"
- },
- {
- "source_location": {
- "file": "ilm/start-stop.asciidoc",
- "line": 120
- },
- "digest": "db8563ab7fe37081a9bb66c91d65d673",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"STOPPED\"\n}"
- },
- {
- "source_location": {
- "file": "ilm/start-stop.asciidoc",
- "line": 135
- },
- "digest": "72ae3851160fcf02b8e2cdfd4e57d238",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/start",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.start"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 75
- },
- "digest": "5df1ed33b5fcf3b9d85c20d100780d43",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\": {\n \"indices.lifecycle.poll_interval\": \"1m\" <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.lifecycle.poll_interval": "1m"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 158
- },
- "digest": "afadb6bb7d0fa5a4531708af1ea8f9f8",
- "lang": "console",
- "found": [],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"mylogs-*\" <1>\n },\n \"dest\": {\n \"index\": \"mylogs\", <2>\n \"op_type\": \"create\" <3>\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "mylogs-*"
- },
- "dest": {
- "index": "mylogs",
- "op_type": "create"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/ilm-with-existing-indices.asciidoc",
- "line": 184
- },
- "digest": "227e19aecb349f31e74898384322ae01",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"transient\": {\n \"indices.lifecycle.poll_interval\": null\n }\n}\n",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.lifecycle.poll_interval": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/production.asciidoc",
- "line": 50
- },
- "digest": "a941fd568f2e20e13df909ab24506073",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.collection.enabled\": false\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.collection.enabled": false
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/production.asciidoc",
- "line": 88
- },
- "digest": "0b47b0bef81b9b5eecfb3775695bd6ad",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/remote_monitor\n{\n \"password\" : \"changeme\",\n \"roles\" : [ \"remote_monitoring_agent\"],\n \"full_name\" : \"Internal Agent For Remote Monitoring\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/remote_monitor",
- "query": null,
- "body": {
- "password": "changeme",
- "roles": [
- "remote_monitoring_agent"
- ],
- "full_name": "Internal Agent For Remote Monitoring"
- },
- "params": {
- "username": "remote_monitor"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/configuring-metricbeat.asciidoc",
- "line": 29
- },
- "digest": "fb2b8d642e16132eebcff4f8b6d592d1",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.collection.enabled\": true\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.collection.enabled": true
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/configuring-metricbeat.asciidoc",
- "line": 195
- },
- "digest": "519603821dc5b883fc2cf50e3d164084",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.elasticsearch.collection.enabled\": false\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.elasticsearch.collection.enabled": false
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/configuring-filebeat.asciidoc",
- "line": 39
- },
- "digest": "fb2b8d642e16132eebcff4f8b6d592d1",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.collection.enabled\": true\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.collection.enabled": true
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/indices.asciidoc",
- "line": 12
- },
- "digest": "83dfd0852101eca3ba8174c9c38b4e73",
- "lang": "console",
- "found": [],
- "source": "GET /_template/.monitoring-*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/.monitoring-*",
- "query": null,
- "body": null,
- "params": {
- "name": ".monitoring-*"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/indices.asciidoc",
- "line": 29
- },
- "digest": "a63906c63a8681c72d53ee0fcf2ffd35",
- "lang": "console",
- "found": [],
- "source": "PUT /_template/custom_monitoring\n{\n \"index_patterns\": \".monitoring-*\",\n \"order\": 1,\n \"settings\": {\n \"number_of_shards\": 5,\n \"number_of_replicas\": 2\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/custom_monitoring",
- "query": null,
- "body": {
- "index_patterns": ".monitoring-*",
- "order": 1,
- "settings": {
- "number_of_shards": 5,
- "number_of_replicas": 2
- }
- },
- "params": {
- "name": "custom_monitoring"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "monitoring/collecting-monitoring-data.asciidoc",
- "line": 60
- },
- "digest": "fb2b8d642e16132eebcff4f8b6d592d1",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"xpack.monitoring.collection.enabled\": true\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.monitoring.collection.enabled": true
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "frozen-indices.asciidoc",
- "line": 66
- },
- "digest": "f9018c483fb6b810d8a921668addfc71",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_forcemerge?max_num_segments=1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_forcemerge",
- "query": {
- "max_num_segments": "1"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "frozen-indices.asciidoc",
- "line": 83
- },
- "digest": "0652fc9f77639fce67a87dc2e33cef51",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search?q=user:kimchy&ignore_throttled=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "q": "user:kimchy",
- "ignore_throttled": "false"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "frozen-indices.asciidoc",
- "line": 97
- },
- "digest": "9ff10591660890ba9d00eb14168c3b67",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/indices/twitter?v&h=i,sth",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/indices/twitter",
- "query": {
- "v": true,
- "h": "i,sth"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "cat.indices"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 35
- },
- "digest": "3acad8c67832b281b9f15349492b8328",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"60m\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "60m"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 124
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 139
- },
- "digest": "618c9d42284c067891fb57034a4fd834",
- "lang": "console",
- "found": [],
- "source": "POST _rollup/job/sensor/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_rollup/job/sensor/_start",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.start_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 153
- },
- "digest": "4e63a0fd56cc5d59595baa0b0721f971",
- "lang": "console",
- "found": [],
- "source": "GET /sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "max_temperature": {
- "max": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 175
- },
- "digest": "82742a24e16fbaffa950867499a39b97",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 102,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : ... ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"max_temperature\" : {\n \"value\" : 202.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 210
- },
- "digest": "e0f8ecc665f547d5365699ab8773e298",
- "lang": "console",
- "found": [],
- "source": "GET /sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"timeline\": {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"7d\"\n },\n \"aggs\": {\n \"nodes\": {\n \"terms\": {\n \"field\": \"node\"\n },\n \"aggs\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n },\n \"avg_voltage\": {\n \"avg\": {\n \"field\": \"voltage\"\n }\n }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "timeline": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "7d"
- },
- "aggs": {
- "nodes": {
- "terms": {
- "field": "node"
- },
- "aggs": {
- "max_temperature": {
- "max": {
- "field": "temperature"
- }
- },
- "avg_voltage": {
- "avg": {
- "field": "voltage"
- }
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-getting-started.asciidoc",
- "line": 248
- },
- "digest": "0d4cb421d11583bbf5d139ee669930db",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 93,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : ... ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"timeline\" : {\n \"meta\" : { },\n \"buckets\" : [\n {\n \"key_as_string\" : \"2018-01-18T00:00:00.000Z\",\n \"key\" : 1516233600000,\n \"doc_count\" : 6,\n \"nodes\" : {\n \"doc_count_error_upper_bound\" : 0,\n \"sum_other_doc_count\" : 0,\n \"buckets\" : [\n {\n \"key\" : \"a\",\n \"doc_count\" : 2,\n \"max_temperature\" : {\n \"value\" : 202.0\n },\n \"avg_voltage\" : {\n \"value\" : 5.1499998569488525\n }\n },\n {\n \"key\" : \"b\",\n \"doc_count\" : 2,\n \"max_temperature\" : {\n \"value\" : 201.0\n },\n \"avg_voltage\" : {\n \"value\" : 5.700000047683716\n }\n },\n {\n \"key\" : \"c\",\n \"doc_count\" : 2,\n \"max_temperature\" : {\n \"value\" : 202.0\n },\n \"avg_voltage\" : {\n \"value\" : 4.099999904632568\n }\n }\n ]\n }\n }\n ]\n }\n }\n}\n"
- },
- {
- "source_location": {
- "file": "rollup/rollup-search-limitations.asciidoc",
- "line": 45
- },
- "digest": "3d1cea1ad861d1ee62e5f34b84371943",
- "lang": "console",
- "found": [],
- "source": "GET sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"avg_temperature\": {\n \"avg\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "avg_temperature": {
- "avg": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/rollup-search-limitations.asciidoc",
- "line": 64
- },
- "digest": "b010489cc7d519a628dcbc1ce81adb3c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"error\" : {\n \"root_cause\" : [\n {\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"There is not a rollup job that has a [avg] agg with name [avg_temperature] which also satisfies all requirements of query.\",\n \"stack_trace\": ...\n }\n ],\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"There is not a rollup job that has a [avg] agg with name [avg_temperature] which also satisfies all requirements of query.\",\n \"stack_trace\": ...\n },\n \"status\": 400\n}"
- },
- {
- "source_location": {
- "file": "transform/ecommerce-tutorial.asciidoc",
- "line": 78
- },
- "digest": "8345d2615f43a934fe1871a5120eca1d",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"term\": {\"currency\": \"EUR\"}\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"total_quantity.sum\": {\n \"sum\": {\n \"field\": \"total_quantity\"\n }\n },\n \"taxless_total_price.sum\": {\n \"sum\": {\n \"field\": \"taxless_total_price\"\n }\n },\n \"total_quantity.max\": {\n \"max\": {\n \"field\": \"total_quantity\"\n }\n },\n \"order_id.cardinality\": {\n \"cardinality\": {\n \"field\": \"order_id\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce",
- "query": {
- "bool": {
- "filter": {
- "term": {
- "currency": "EUR"
- }
- }
- }
- }
- },
- "pivot": {
- "group_by": {
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "total_quantity.sum": {
- "sum": {
- "field": "total_quantity"
- }
- },
- "taxless_total_price.sum": {
- "sum": {
- "field": "taxless_total_price"
- }
- },
- "total_quantity.max": {
- "max": {
- "field": "total_quantity"
- }
- },
- "order_id.cardinality": {
- "cardinality": {
- "field": "order_id"
- }
- }
- }
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/ecommerce-tutorial.asciidoc",
- "line": 154
- },
- "digest": "c68404749f090ab191c0fd5f651635cf",
- "lang": "console",
- "found": [],
- "source": "PUT _transform/ecommerce-customer-transform\n{\n \"source\": {\n \"index\": [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"term\": {\n \"currency\": \"EUR\"\n }\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"total_quantity.sum\": {\n \"sum\": {\n \"field\": \"total_quantity\"\n }\n },\n \"taxless_total_price.sum\": {\n \"sum\": {\n \"field\": \"taxless_total_price\"\n }\n },\n \"total_quantity.max\": {\n \"max\": {\n \"field\": \"total_quantity\"\n }\n },\n \"order_id.cardinality\": {\n \"cardinality\": {\n \"field\": \"order_id\"\n }\n }\n }\n },\n \"dest\": {\n \"index\": \"ecommerce-customers\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_transform/ecommerce-customer-transform",
- "query": null,
- "body": {
- "source": {
- "index": [
- "kibana_sample_data_ecommerce"
- ],
- "query": {
- "bool": {
- "filter": {
- "term": {
- "currency": "EUR"
- }
- }
- }
- }
- },
- "pivot": {
- "group_by": {
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "total_quantity.sum": {
- "sum": {
- "field": "total_quantity"
- }
- },
- "taxless_total_price.sum": {
- "sum": {
- "field": "taxless_total_price"
- }
- },
- "total_quantity.max": {
- "max": {
- "field": "total_quantity"
- }
- },
- "order_id.cardinality": {
- "cardinality": {
- "field": "order_id"
- }
- }
- }
- },
- "dest": {
- "index": "ecommerce-customers"
- }
- },
- "params": {
- "transform_id": "ecommerce-customer-transform"
- },
- "api": "transform.put_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/ecommerce-tutorial.asciidoc",
- "line": 233
- },
- "digest": "4ded8ad815ac0e83b1c21a6c18fd0763",
- "lang": "console",
- "found": [],
- "source": "POST _transform/ecommerce-customer-transform/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/ecommerce-customer-transform/_start",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce-customer-transform"
- },
- "api": "transform.start_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 29
- },
- "digest": "88341b4eba71ec722f3e38fa1696fe87",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"dest\" : { <1>\n \"index\" : \"sample_ecommerce_orders_by_customer\"\n },\n \"pivot\": {\n \"group_by\": { <2>\n \"user\": { \"terms\": { \"field\": \"user\" }},\n \"customer_id\": { \"terms\": { \"field\": \"customer_id\" }}\n },\n \"aggregations\": {\n \"order_count\": { \"value_count\": { \"field\": \"order_id\" }},\n \"total_order_amt\": { \"sum\": { \"field\": \"taxful_total_price\" }},\n \"avg_amt_per_order\": { \"avg\": { \"field\": \"taxful_total_price\" }},\n \"avg_unique_products_per_order\": { \"avg\": { \"field\": \"total_unique_products\" }},\n \"total_unique_products\": { \"cardinality\": { \"field\": \"products.product_id\" }}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce"
- },
- "dest": {
- "index": "sample_ecommerce_orders_by_customer"
- },
- "pivot": {
- "group_by": {
- "user": {
- "terms": {
- "field": "user"
- }
- },
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "order_count": {
- "value_count": {
- "field": "order_id"
- }
- },
- "total_order_amt": {
- "sum": {
- "field": "taxful_total_price"
- }
- },
- "avg_amt_per_order": {
- "avg": {
- "field": "taxful_total_price"
- }
- },
- "avg_unique_products_per_order": {
- "avg": {
- "field": "total_unique_products"
- }
- },
- "total_unique_products": {
- "cardinality": {
- "field": "products.product_id"
- }
- }
- }
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 115
- },
- "digest": "be9376b1e354ad9c6bdad83f6a0ce5ad",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_flights\",\n \"query\": { <1>\n \"bool\": {\n \"filter\": [\n { \"term\": { \"Cancelled\": false } }\n ]\n }\n }\n },\n \"dest\" : { <2>\n \"index\" : \"sample_flight_delays_by_carrier\"\n },\n \"pivot\": {\n \"group_by\": { <3>\n \"carrier\": { \"terms\": { \"field\": \"Carrier\" }}\n },\n \"aggregations\": {\n \"flights_count\": { \"value_count\": { \"field\": \"FlightNum\" }},\n \"delay_mins_total\": { \"sum\": { \"field\": \"FlightDelayMin\" }},\n \"flight_mins_total\": { \"sum\": { \"field\": \"FlightTimeMin\" }},\n \"delay_time_percentage\": { <4>\n \"bucket_script\": {\n \"buckets_path\": {\n \"delay_time\": \"delay_mins_total.value\",\n \"flight_time\": \"flight_mins_total.value\"\n },\n \"script\": \"(params.delay_time / params.flight_time) * 100\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_flights",
- "query": {
- "bool": {
- "filter": [
- {
- "term": {
- "Cancelled": false
- }
- }
- ]
- }
- }
- },
- "dest": {
- "index": "sample_flight_delays_by_carrier"
- },
- "pivot": {
- "group_by": {
- "carrier": {
- "terms": {
- "field": "Carrier"
- }
- }
- },
- "aggregations": {
- "flights_count": {
- "value_count": {
- "field": "FlightNum"
- }
- },
- "delay_mins_total": {
- "sum": {
- "field": "FlightDelayMin"
- }
- },
- "flight_mins_total": {
- "sum": {
- "field": "FlightTimeMin"
- }
- },
- "delay_time_percentage": {
- "bucket_script": {
- "buckets_path": {
- "delay_time": "delay_mins_total.value",
- "flight_time": "flight_mins_total.value"
- },
- "script": "(params.delay_time / params.flight_time) * 100"
- }
- }
- }
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 202
- },
- "digest": "7bc36ea4a24937de6c009397861baf05",
- "lang": "console",
- "found": [],
- "source": "PUT _transform/suspicious_client_ips\n{\n \"source\": {\n \"index\": \"kibana_sample_data_logs\"\n },\n \"dest\" : { <1>\n \"index\" : \"sample_weblogs_by_clientip\"\n },\n \"sync\" : { <2>\n \"time\": {\n \"field\": \"timestamp\",\n \"delay\": \"60s\"\n }\n },\n \"pivot\": {\n \"group_by\": { <3>\n \"clientip\": { \"terms\": { \"field\": \"clientip\" } }\n },\n \"aggregations\": {\n \"url_dc\": { \"cardinality\": { \"field\": \"url.keyword\" }},\n \"bytes_sum\": { \"sum\": { \"field\": \"bytes\" }},\n \"geo.src_dc\": { \"cardinality\": { \"field\": \"geo.src\" }},\n \"agent_dc\": { \"cardinality\": { \"field\": \"agent.keyword\" }},\n \"geo.dest_dc\": { \"cardinality\": { \"field\": \"geo.dest\" }},\n \"responses.total\": { \"value_count\": { \"field\": \"timestamp\" }},\n \"success\" : { <4>\n \"filter\": {\n \"term\": { \"response\" : \"200\"}}\n },\n \"error404\" : {\n \"filter\": {\n \"term\": { \"response\" : \"404\"}}\n },\n \"error503\" : {\n \"filter\": {\n \"term\": { \"response\" : \"503\"}}\n },\n \"timestamp.min\": { \"min\": { \"field\": \"timestamp\" }},\n \"timestamp.max\": { \"max\": { \"field\": \"timestamp\" }},\n \"timestamp.duration_ms\": { <5>\n \"bucket_script\": {\n \"buckets_path\": {\n \"min_time\": \"timestamp.min.value\",\n \"max_time\": \"timestamp.max.value\"\n },\n \"script\": \"(params.max_time - params.min_time)\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_transform/suspicious_client_ips",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_logs"
- },
- "dest": {
- "index": "sample_weblogs_by_clientip"
- },
- "sync": {
- "time": {
- "field": "timestamp",
- "delay": "60s"
- }
- },
- "pivot": {
- "group_by": {
- "clientip": {
- "terms": {
- "field": "clientip"
- }
- }
- },
- "aggregations": {
- "url_dc": {
- "cardinality": {
- "field": "url.keyword"
- }
- },
- "bytes_sum": {
- "sum": {
- "field": "bytes"
- }
- },
- "geo.src_dc": {
- "cardinality": {
- "field": "geo.src"
- }
- },
- "agent_dc": {
- "cardinality": {
- "field": "agent.keyword"
- }
- },
- "geo.dest_dc": {
- "cardinality": {
- "field": "geo.dest"
- }
- },
- "responses.total": {
- "value_count": {
- "field": "timestamp"
- }
- },
- "success": {
- "filter": {
- "term": {
- "response": "200"
- }
- }
- },
- "error404": {
- "filter": {
- "term": {
- "response": "404"
- }
- }
- },
- "error503": {
- "filter": {
- "term": {
- "response": "503"
- }
- }
- },
- "timestamp.min": {
- "min": {
- "field": "timestamp"
- }
- },
- "timestamp.max": {
- "max": {
- "field": "timestamp"
- }
- },
- "timestamp.duration_ms": {
- "bucket_script": {
- "buckets_path": {
- "min_time": "timestamp.min.value",
- "max_time": "timestamp.max.value"
- },
- "script": "(params.max_time - params.min_time)"
- }
- }
- }
- }
- },
- "params": {
- "transform_id": "suspicious_client_ips"
- },
- "api": "transform.put_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 272
- },
- "digest": "4bd42e31ac4a5cf237777f1a0e97aba8",
- "lang": "console",
- "found": [],
- "source": "POST _transform/suspicious_client_ips/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/suspicious_client_ips/_start",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "suspicious_client_ips"
- },
- "api": "transform.start_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/examples.asciidoc",
- "line": 282
- },
- "digest": "14f2dab0583c5a9fcc39931d33194872",
- "lang": "console",
- "found": [],
- "source": "GET sample_weblogs_by_clientip/_search",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sample_weblogs_by_clientip/_search",
- "query": null,
- "body": null,
- "params": {
- "index": "sample_weblogs_by_clientip"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/painless-examples.asciidoc",
- "line": 163
- },
- "digest": "8ce484cceef334f0a8ad3a40570b3425",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": [ <1>\n \"kibana_sample_data_logs\"\n ]\n },\n \"pivot\": {\n \"group_by\": {\n \"agent\": {\n \"terms\": {\n \"script\": { <2>\n \"source\": \"\"\"String agent = doc['agent.keyword'].value;\n if (agent.contains(\"MSIE\")) {\n return \"internet explorer\";\n } else if (agent.contains(\"AppleWebKit\")) {\n return \"safari\";\n } else if (agent.contains('Firefox')) {\n return \"firefox\";\n } else { return agent }\"\"\",\n \"lang\": \"painless\"\n }\n }\n }\n },\n \"aggregations\": { <3>\n \"200\": {\n \"filter\": {\n \"term\": {\n \"response\": \"200\"\n }\n }\n },\n \"404\": {\n \"filter\": {\n \"term\": {\n \"response\": \"404\"\n }\n }\n },\n \"503\": {\n \"filter\": {\n \"term\": {\n \"response\": \"503\"\n }\n }\n }\n }\n },\n \"dest\": { <4>\n \"index\": \"pivot_logs\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "source": {
- "index": [
- "kibana_sample_data_logs"
- ]
- },
- "pivot": {
- "group_by": {
- "agent": {
- "terms": {
- "script": {
- "source": "String agent = doc['agent.keyword'].value;\n if (agent.contains(\"MSIE\")) {\n return \"internet explorer\";\n } else if (agent.contains(\"AppleWebKit\")) {\n return \"safari\";\n } else if (agent.contains('Firefox')) {\n return \"firefox\";\n } else { return agent }",
- "lang": "painless"
- }
- }
- }
- },
- "aggregations": {
- "200": {
- "filter": {
- "term": {
- "response": "200"
- }
- }
- },
- "404": {
- "filter": {
- "term": {
- "response": "404"
- }
- }
- },
- "503": {
- "filter": {
- "term": {
- "response": "503"
- }
- }
- }
- }
- },
- "dest": {
- "index": "pivot_logs"
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/painless-examples.asciidoc",
- "line": 301
- },
- "digest": "e4b64b8277af259a52c8d3940157b5fa",
- "lang": "console",
- "found": [],
- "source": "PUT _transform/data_log\n{\n \"source\": {\n \"index\": \"kibana_sample_data_logs\"\n },\n \"dest\": {\n \"index\": \"data-logs-by-client\"\n },\n \"pivot\": {\n \"group_by\": {\n \"machine.os\": {\"terms\": {\"field\": \"machine.os.keyword\"}},\n \"machine.ip\": {\"terms\": {\"field\": \"clientip\"}}\n },\n \"aggregations\": {\n \"time_frame.lte\": {\n \"max\": {\n \"field\": \"timestamp\"\n }\n },\n \"time_frame.gte\": {\n \"min\": {\n \"field\": \"timestamp\"\n }\n },\n \"time_length\": { <1>\n \"bucket_script\": {\n \"buckets_path\": { <2>\n \"min\": \"time_frame.gte.value\",\n \"max\": \"time_frame.lte.value\"\n },\n \"script\": \"params.max - params.min\" <3>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_transform/data_log",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_logs"
- },
- "dest": {
- "index": "data-logs-by-client"
- },
- "pivot": {
- "group_by": {
- "machine.os": {
- "terms": {
- "field": "machine.os.keyword"
- }
- },
- "machine.ip": {
- "terms": {
- "field": "clientip"
- }
- }
- },
- "aggregations": {
- "time_frame.lte": {
- "max": {
- "field": "timestamp"
- }
- },
- "time_frame.gte": {
- "min": {
- "field": "timestamp"
- }
- },
- "time_length": {
- "bucket_script": {
- "buckets_path": {
- "min": "time_frame.gte.value",
- "max": "time_frame.lte.value"
- },
- "script": "params.max - params.min"
- }
- }
- }
- }
- },
- "params": {
- "transform_id": "data_log"
- },
- "api": "transform.put_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/painless-examples.asciidoc",
- "line": 417
- },
- "digest": "22908e2f01460917d3145a53e3fb7546",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"id\" : \"index_compare\",\n \"source\" : { <1>\n \"index\" : [\n \"index1\",\n \"index2\"\n ],\n \"query\" : {\n \"match_all\" : { }\n }\n },\n \"dest\" : { <2>\n \"index\" : \"compare\"\n },\n \"pivot\" : {\n \"group_by\" : {\n \"unique-id\" : {\n \"terms\" : {\n \"field\" : \"\" <3>\n }\n }\n },\n \"aggregations\" : {\n \"compare\" : { <4>\n \"scripted_metric\" : {\n \"init_script\" : \"\",\n \"map_script\" : \"state.doc = new HashMap(params['_source'])\", <5>\n \"combine_script\" : \"return state\", <6>\n \"reduce_script\" : \"\"\" <7>\n if (states.size() != 2) {\n return \"count_mismatch\"\n }\n if (states.get(0).equals(states.get(1))) {\n return \"match\"\n } else {\n return \"mismatch\"\n }\n \"\"\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "id": "index_compare",
- "source": {
- "index": [
- "index1",
- "index2"
- ],
- "query": {
- "match_all": {}
- }
- },
- "dest": {
- "index": "compare"
- },
- "pivot": {
- "group_by": {
- "unique-id": {
- "terms": {
- "field": ""
- }
- }
- },
- "aggregations": {
- "compare": {
- "scripted_metric": {
- "init_script": "",
- "map_script": "state.doc = new HashMap(params['_source'])",
- "combine_script": "return state",
- "reduce_script": " \n if (states.size() != 2) {\n return \"count_mismatch\"\n }\n if (states.get(0).equals(states.get(1))) {\n return \"match\"\n } else {\n return \"mismatch\"\n }\n "
- }
- }
- }
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-cluster-config.asciidoc",
- "line": 41
- },
- "digest": "ee79edafcbc80dfda496e3a26506dcbc",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/settings?pretty&flat_settings&filter_path=persistent",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/settings",
- "query": {
- "pretty": true,
- "flat_settings": true,
- "filter_path": "persistent"
- },
- "body": null,
- "params": null,
- "api": "cluster.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 79
- },
- "digest": "92b3749a473cf2e7ff4055316662a4fe",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_backup_location"
- }
- },
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 102
- },
- "digest": "43a7b43711eab81ad093e67ecc221327",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/snapshot_user\n{\n \"password\" : \"secret\",\n \"roles\" : [ \"snapshot_user\" ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/snapshot_user",
- "query": null,
- "body": {
- "password": "secret",
- "roles": [
- "snapshot_user"
- ]
- },
- "params": {
- "username": "snapshot_user"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 120
- },
- "digest": "7acf1099282366553cb8b093ed4fcd00",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup/snapshot_1\n{\n \"indices\": \".security\",\n \"include_global_state\": true <1>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": {
- "indices": ".security",
- "include_global_state": true
- },
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 190
- },
- "digest": "ff930e6409b6a923ef1c9e7fc99f24cc",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "high-availability/backup-and-restore-security-config.asciidoc",
- "line": 196
- },
- "digest": "020c56e520ff6556ebfaf98efaef56aa",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/overview.asciidoc",
- "line": 205
- },
- "digest": "7c5e41a7c0075d87b8f8348a6efa990c",
- "lang": "console",
- "found": [],
- "source": "POST /follower_index/_ccr/pause_follow\n\nPOST /follower_index/_close\n\nPUT /follower_index/_ccr/follow?wait_for_active_shards=1\n{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/follower_index/_ccr/pause_follow",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.pause_follow"
- },
- {
- "method": "POST",
- "url": "/follower_index/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "indices.close"
- },
- {
- "method": "PUT",
- "url": "/follower_index/_ccr/follow",
- "query": {
- "wait_for_active_shards": "1"
- },
- "body": {
- "remote_cluster": "remote_cluster",
- "leader_index": "leader_index"
- },
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 94
- },
- "digest": "9ad38ab4d9c3983e97e8c38fec611f10",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\" : {\n \"cluster\" : {\n \"remote\" : {\n \"leader\" : {\n \"seeds\" : [\n \"127.0.0.1:9300\" <1>\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "leader": {
- "seeds": [
- "127.0.0.1:9300"
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 119
- },
- "digest": "cc0cca5556ec6224c7134c233734beed",
- "lang": "console",
- "found": [],
- "source": "GET /_remote/info",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_remote/info",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.remote_info"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 128
- },
- "digest": "741e6e2a7786f6c5ad12ee6f3ca35160",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"leader\" : {\n \"seeds\" : [\n \"127.0.0.1:9300\"\n ],\n \"connected\" : true, <1>\n \"num_nodes_connected\" : 1, <2>\n \"max_connections_per_cluster\" : 3,\n \"initial_connect_timeout\" : \"30s\",\n \"skip_unavailable\" : false,\n \"mode\" : \"sniff\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 165
- },
- "digest": "74ed3197e0e77750f5255c6df0cc0fe5",
- "lang": "console",
- "found": [],
- "source": "PUT /server-metrics\n{\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : 1,\n \"number_of_replicas\" : 0\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"accept\" : {\n \"type\" : \"long\"\n },\n \"deny\" : {\n \"type\" : \"long\"\n },\n \"host\" : {\n \"type\" : \"keyword\"\n },\n \"response\" : {\n \"type\" : \"float\"\n },\n \"service\" : {\n \"type\" : \"keyword\"\n },\n \"total\" : {\n \"type\" : \"long\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/server-metrics",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "number_of_shards": 1,
- "number_of_replicas": 0
- }
- },
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- },
- "accept": {
- "type": "long"
- },
- "deny": {
- "type": "long"
- },
- "host": {
- "type": "keyword"
- },
- "response": {
- "type": "float"
- },
- "service": {
- "type": "keyword"
- },
- "total": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "server-metrics"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 214
- },
- "digest": "278da0495c9008e6d9f25a5d5f0339b7",
- "lang": "console",
- "found": [],
- "source": "PUT /server-metrics-copy/_ccr/follow?wait_for_active_shards=1\n{\n \"remote_cluster\" : \"leader\",\n \"leader_index\" : \"server-metrics\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/server-metrics-copy/_ccr/follow",
- "query": {
- "wait_for_active_shards": "1"
- },
- "body": {
- "remote_cluster": "leader",
- "leader_index": "server-metrics"
- },
- "params": {
- "index": "server-metrics-copy"
- },
- "api": "ccr.follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/getting-started.asciidoc",
- "line": 276
- },
- "digest": "6b104a66ab47fc1e1f24a5738f82feb4",
- "lang": "console",
- "found": [],
- "source": "PUT /_ccr/auto_follow/beats\n{\n \"remote_cluster\" : \"leader\",\n \"leader_index_patterns\" :\n [\n \"metricbeat-*\", <1>\n \"packetbeat-*\" <2>\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-copy\" <3>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ccr/auto_follow/beats",
- "query": null,
- "body": {
- "remote_cluster": "leader",
- "leader_index_patterns": [
- "metricbeat-*",
- "packetbeat-*"
- ],
- "follow_index_pattern": "{{leader_index}}-copy"
- },
- "params": {
- "name": "beats"
- },
- "api": "ccr.put_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 25
- },
- "digest": "92b3749a473cf2e7ff4055316662a4fe",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_backup_location"
- }
- },
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 39
- },
- "digest": "ff930e6409b6a923ef1c9e7fc99f24cc",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 46
- },
- "digest": "321f12509469d89609b6d398b8d94e45",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_backup\": {\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 64
- },
- "digest": "b9e4f7a80d21c85f88f578219df8e192",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/repo*,*backup*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/repo*,*backup*",
- "query": null,
- "body": null,
- "params": {
- "repository": "repo*,*backup*"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 72
- },
- "digest": "0d754b0d8d13c6d39ea353978dfe5992",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot",
- "query": null,
- "body": null,
- "params": null,
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 79
- },
- "digest": "37432cda12eb63ce59d186b55233c6e1",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/_all",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/_all",
- "query": null,
- "body": null,
- "params": {
- "repository": "_all"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 87
- },
- "digest": "2b8d2065be3002b0be26598d6ad803a6",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_backup",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_backup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.delete_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 124
- },
- "digest": "44b410249d477c640c127bfc7320e365",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_fs_backup\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"/mount/backups/my_fs_backup_location\",\n \"compress\": true\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_fs_backup",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "/mount/backups/my_fs_backup_location",
- "compress": true
- }
- },
- "params": {
- "repository": "my_fs_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 140
- },
- "digest": "8988215f3a4fc4b7a7ef4a9c5be3391e",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_fs_backup\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_fs_backup_location\",\n \"compress\": true\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_fs_backup",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_fs_backup_location",
- "compress": true
- }
- },
- "params": {
- "repository": "my_fs_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 181
- },
- "digest": "955ddfaf872af3aff420e6a80bc40bac",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_read_only_url_repository\n{\n \"type\": \"url\",\n \"settings\": {\n \"url\": \"file:/mount/backups/my_fs_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_read_only_url_repository",
- "query": null,
- "body": {
- "type": "url",
- "settings": {
- "url": "file:/mount/backups/my_fs_backup_location"
- }
- },
- "params": {
- "repository": "my_read_only_url_repository"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 249
- },
- "digest": "98ee9bfa32b64ca22e4338544b36c370",
- "lang": "console",
- "found": [],
- "source": "PUT _snapshot/my_src_only_repository\n{\n \"type\": \"source\",\n \"settings\": {\n \"delegate_type\": \"fs\",\n \"location\": \"my_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_src_only_repository",
- "query": null,
- "body": {
- "type": "source",
- "settings": {
- "delegate_type": "fs",
- "location": "my_backup_location"
- }
- },
- "params": {
- "repository": "my_src_only_repository"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 280
- },
- "digest": "f1a7cf532da3a8f9a52a401a90e3a998",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_unverified_backup?verify=false\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_unverified_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_unverified_backup",
- "query": {
- "verify": "false"
- },
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_unverified_backup_location"
- }
- },
- "params": {
- "repository": "my_unverified_backup"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 294
- },
- "digest": "337cd2c3f9e11665f00786705037f86c",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_unverified_backup/_verify",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_unverified_backup/_verify",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_unverified_backup"
- },
- "api": "snapshot.verify_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 311
- },
- "digest": "6aca241c0361d26f134712821e2d09a9",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_repository/_cleanup",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_repository/_cleanup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.cleanup_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/register-repository.asciidoc",
- "line": 319
- },
- "digest": "5e309dfb203bf2b89cd8a4c353c4b6f5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"results\": {\n \"deleted_bytes\": 20,\n \"deleted_blobs\": 5\n }\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 23
- },
- "digest": "2ab78817eacb5030a447e7fac6b91591",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup/snapshot_1?wait_for_completion=true",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": {
- "wait_for_completion": "true"
- },
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 36
- },
- "digest": "6a4f30129fb3f02296ab98fd8e180f07",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_backup/snapshot_2?wait_for_completion=true\n{\n \"indices\": \"data_stream_1,index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"kimchy\",\n \"taken_because\": \"backup before upgrading\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup/snapshot_2",
- "query": {
- "wait_for_completion": "true"
- },
- "body": {
- "indices": "data_stream_1,index_1,index_2",
- "ignore_unavailable": true,
- "include_global_state": false,
- "metadata": {
- "taken_by": "kimchy",
- "taken_because": "backup before upgrading"
- }
- },
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_2"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 88
- },
- "digest": "7eb0303e39243fbb9bf51a99270cd022",
- "lang": "console",
- "found": [],
- "source": "# PUT /_snapshot/my_backup/\nPUT /_snapshot/my_backup/%3Csnapshot-%7Bnow%2Fd%7D%3E",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_backup/%3Csnapshot-%7Bnow%2Fd%7D%3E",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "%3Csnapshot-%7Bnow%2Fd%7D%3E"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 118
- },
- "digest": "020c56e520ff6556ebfaf98efaef56aa",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 149
- },
- "digest": "0b77ebfb06c63ccbad857b39bb4ff851",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_*,some_other_snapshot",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_*,some_other_snapshot",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_*,some_other_snapshot"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 157
- },
- "digest": "fb224f0ae2a03567b6d9b165e7dd24b6",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/_all",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/_all",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "_all"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 177
- },
- "digest": "677fdf84ac97bb107207b6966143144b",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/_all\nGET /_snapshot/my_backup,my_fs_backup\nGET /_snapshot/my*/snap*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/_all",
- "query": null,
- "body": null,
- "params": {
- "repository": "_all"
- },
- "api": "snapshot.get_repository"
- },
- {
- "method": "GET",
- "url": "/_snapshot/my_backup,my_fs_backup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup,my_fs_backup"
- },
- "api": "snapshot.get_repository"
- },
- {
- "method": "GET",
- "url": "/_snapshot/my*/snap*",
- "query": null,
- "body": null,
- "params": {
- "repository": "my*",
- "snapshot": "snap*"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 187
- },
- "digest": "155c438e215890cdcb4879eaaadf4046",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/_current",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/_current",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "_current"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 195
- },
- "digest": "0784fbe88299be4f02eaa86368e93203",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_backup/snapshot_2",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_backup/snapshot_2",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_2"
- },
- "api": "snapshot.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/take-snapshot.asciidoc",
- "line": 209
- },
- "digest": "88151217a2f66fc25ccdc26805e75be1",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_backup/my_backup,my_fs_backup\nDELETE /_snapshot/my_backup/snap*",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_backup/my_backup,my_fs_backup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "my_backup,my_fs_backup"
- },
- "api": "snapshot.delete"
- },
- {
- "method": "DELETE",
- "url": "/_snapshot/my_backup/snap*",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snap*"
- },
- "api": "snapshot.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 24
- },
- "digest": "853ca73db9b596cc4ddda66b3ec8faa2",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_backup/snapshot_1/_restore",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_backup/snapshot_1/_restore",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.restore"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 74
- },
- "digest": "d43ecb0a1c938eeafb1a5dd8ecd4fdda",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_backup/snapshot_1/_restore\n{\n \"indices\": \"data_stream_1,index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false, <1>\n \"rename_pattern\": \"index_(.+)\",\n \"rename_replacement\": \"restored_index_$1\",\n \"include_aliases\": false\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_backup/snapshot_1/_restore",
- "query": null,
- "body": {
- "indices": "data_stream_1,index_1,index_2",
- "ignore_unavailable": true,
- "include_global_state": false,
- "rename_pattern": "index_(.+)",
- "rename_replacement": "restored_index_$1",
- "include_aliases": false
- },
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.restore"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 129
- },
- "digest": "922df55507c66533fcadc850eecabcff",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_backup/snapshot_1/_restore\n{\n \"indices\": \"index_1\",\n \"ignore_unavailable\": true,\n \"index_settings\": {\n \"index.number_of_replicas\": 0\n },\n \"ignore_index_settings\": [\n \"index.refresh_interval\"\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_backup/snapshot_1/_restore",
- "query": null,
- "body": {
- "indices": "index_1",
- "ignore_unavailable": true,
- "index_settings": {
- "index.number_of_replicas": 0
- },
- "ignore_index_settings": [
- "index.refresh_interval"
- ]
- },
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.restore"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 189
- },
- "digest": "1ae301364751c376b3d26581a36d8975",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/_status",
- "query": null,
- "body": null,
- "params": null,
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 198
- },
- "digest": "db1913b97109b86cfc5efc7cfcd65d93",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/_status",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup"
- },
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 207
- },
- "digest": "e566ca0098be82a2847c17069711a822",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1/_status",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 215
- },
- "digest": "fd7dbd4240410907a1d6823eb1ee3b03",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"snapshots\": [\n {\n \"snapshot\": \"snapshot_1\",\n \"repository\": \"my_backup\",\n \"uuid\": \"XuBo4l4ISYiVg0nYUen9zg\",\n \"state\": \"SUCCESS\",\n \"include_global_state\": true,\n \"shards_stats\": {\n \"initializing\": 0,\n \"started\": 0,\n \"finalizing\": 0,\n \"done\": 5,\n \"failed\": 0,\n \"total\": 5\n },\n \"stats\": {\n \"incremental\": {\n \"file_count\": 8,\n \"size_in_bytes\": 4704\n },\n \"processed\": {\n \"file_count\": 7,\n \"size_in_bytes\": 4254\n },\n \"total\": {\n \"file_count\": 8,\n \"size_in_bytes\": 4704\n },\n \"start_time_in_millis\": 1526280280355,\n \"time_in_millis\": 358\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/restore-snapshot.asciidoc",
- "line": 263
- },
- "digest": "2432f86346177533cabdabbd4eb41b30",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1,snapshot_2/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1,snapshot_2/_status",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1,snapshot_2"
- },
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/monitor-snapshot-restore.asciidoc",
- "line": 32
- },
- "digest": "020c56e520ff6556ebfaf98efaef56aa",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/monitor-snapshot-restore.asciidoc",
- "line": 43
- },
- "digest": "e566ca0098be82a2847c17069711a822",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_backup/snapshot_1/_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_backup/snapshot_1/_status",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.status"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/monitor-snapshot-restore.asciidoc",
- "line": 73
- },
- "digest": "86c723fc6212d34166661e7dac223491",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_backup/snapshot_1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_backup/snapshot_1",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_backup",
- "snapshot": "snapshot_1"
- },
- "api": "snapshot.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 34
- },
- "digest": "89b72dd7f747f6297c2b089e8bc807be",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_repository\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_repository",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_backup_location"
- }
- },
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 66
- },
- "digest": "0da01289c561448254d521504d5122dd",
- "lang": "console",
- "found": [],
- "source": "PUT /_slm/policy/nightly-snapshots\n{\n \"schedule\": \"0 30 2 * * ?\", <1>\n \"name\": \"\", <2>\n \"repository\": \"my_repository\", <3>\n \"config\": { <4>\n \"indices\": [\"*\"] <5>\n },\n \"retention\": { <6>\n \"expire_after\": \"30d\", <7>\n \"min_count\": 5, <8>\n \"max_count\": 50 <9>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_slm/policy/nightly-snapshots",
- "query": null,
- "body": {
- "schedule": "0 30 2 * * ?",
- "name": "",
- "repository": "my_repository",
- "config": {
- "indices": [
- "*"
- ]
- },
- "retention": {
- "expire_after": "30d",
- "min_count": 5,
- "max_count": 50
- }
- },
- "params": {
- "policy_id": "nightly-snapshots"
- },
- "api": "slm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 119
- },
- "digest": "af5ff39759d3af0525d941634a6cdb82",
- "lang": "console",
- "found": [],
- "source": "POST /_slm/policy/nightly-snapshots/_execute",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 129
- },
- "digest": "f1b545d3c3eeedf8ae09c56070c26053",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/policy/nightly-snapshots?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/policy/nightly-snapshots",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "policy_id": "nightly-snapshots"
- },
- "api": "slm.get_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/getting-started-slm.asciidoc",
- "line": 144
- },
- "digest": "7aea418330cf711313289fc6b078835d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nightly-snapshots\" : {\n \"version\": 1,\n \"modified_date\": \"2019-04-23T01:30:00.000Z\",\n \"modified_date_millis\": 1556048137314,\n \"policy\" : {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"*\"],\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n },\n \"last_success\": { <1>\n \"snapshot_name\": \"nightly-snap-2019.04.24-tmtnyjtrsxkhbrrdcgg18a\", <2>\n \"time_string\": \"2019-04-24T16:43:49.316Z\",\n \"time\": 1556124229316\n } ,\n \"last_failure\": { <3>\n \"snapshot_name\": \"nightly-snap-2019.04.02-lohisb5ith2n8hxacaq3mw\",\n \"time_string\": \"2019-04-02T01:30:00.000Z\",\n \"time\": 1556042030000,\n \"details\": \"{\\\"type\\\":\\\"index_not_found_exception\\\",\\\"reason\\\":\\\"no such index [important]\\\",\\\"resource.type\\\":\\\"index_or_alias\\\",\\\"resource.id\\\":\\\"important\\\",\\\"index_uuid\\\":\\\"_na_\\\",\\\"index\\\":\\\"important\\\",\\\"stack_trace\\\":\\\"[important] IndexNotFoundException[no such index [important]]\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.indexNotFoundException(IndexNameExpressionResolver.java:762)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.innerResolve(IndexNameExpressionResolver.java:714)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.resolve(IndexNameExpressionResolver.java:670)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:163)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndexNames(IndexNameExpressionResolver.java:142)\\\\n\\\\tat org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndexNames(IndexNameExpressionResolver.java:102)\\\\n\\\\tat org.elasticsearch.snapshots.SnapshotsService$1.execute(SnapshotsService.java:280)\\\\n\\\\tat org.elasticsearch.cluster.ClusterStateUpdateTask.execute(ClusterStateUpdateTask.java:47)\\\\n\\\\tat org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:687)\\\\n\\\\tat org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:310)\\\\n\\\\tat org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:210)\\\\n\\\\tat org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:142)\\\\n\\\\tat org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150)\\\\n\\\\tat org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188)\\\\n\\\\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:688)\\\\n\\\\tat org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:252)\\\\n\\\\tat org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:215)\\\\n\\\\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\\\\n\\\\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\\\\n\\\\tat java.base/java.lang.Thread.run(Thread.java:834)\\\\n\\\"}\"\n } ,\n \"next_execution\": \"2019-04-24T01:30:00.000Z\", <4>\n \"next_execution_millis\": 1556048160000\n }\n}"
- },
- {
- "source_location": {
- "file": "slm/slm-security.asciidoc",
- "line": 25
- },
- "digest": "1d7abeea98f6ed64cc8371794c90a921",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/slm-admin\n{\n \"cluster\": [\"manage_slm\", \"cluster:admin/snapshot/*\"],\n \"indices\": [\n {\n \"names\": [\".slm-history-*\"],\n \"privileges\": [\"all\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/slm-admin",
- "query": null,
- "body": {
- "cluster": [
- "manage_slm",
- "cluster:admin/snapshot/*"
- ],
- "indices": [
- {
- "names": [
- ".slm-history-*"
- ],
- "privileges": [
- "all"
- ]
- }
- ]
- },
- "params": {
- "name": "slm-admin"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/slm-security.asciidoc",
- "line": 46
- },
- "digest": "ef76d0e4cdc2881c161a5557a98a3446",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/slm-read-only\n{\n \"cluster\": [\"read_slm\"],\n \"indices\": [\n {\n \"names\": [\".slm-history-*\"],\n \"privileges\": [\"read\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/slm-read-only",
- "query": null,
- "body": {
- "cluster": [
- "read_slm"
- ],
- "indices": [
- {
- "names": [
- ".slm-history-*"
- ],
- "privileges": [
- "read"
- ]
- }
- ]
- },
- "params": {
- "name": "slm-read-only"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/slm-retention.asciidoc",
- "line": 54
- },
- "digest": "55e8ddf643726dec51531ada0bec7143",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.get_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/built-in-users.asciidoc",
- "line": 142
- },
- "digest": "6f0389ac52808df23bb6081a1acd4eed",
- "lang": "console",
- "found": [],
- "source": "PUT _security/user/logstash_system/_enable",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/user/logstash_system/_enable",
- "query": null,
- "body": null,
- "params": {
- "username": "logstash_system"
- },
- "api": "security.enable_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-active-directory-realm.asciidoc",
- "line": 178
- },
- "digest": "21e95d29bc37deb5689a654aa323b4ba",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/admins\n{\n \"roles\" : [ \"monitoring\" , \"user\" ],\n \"rules\" : { \"field\" : {\n \"groups\" : \"cn=admins,dc=example,dc=com\" <1>\n } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/admins",
- "query": null,
- "body": {
- "roles": [
- "monitoring",
- "user"
- ],
- "rules": {
- "field": {
- "groups": "cn=admins,dc=example,dc=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "admins"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-active-directory-realm.asciidoc",
- "line": 192
- },
- "digest": "bd0d30a7683037e1ebadd163514765d4",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/basic_users\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"any\": [\n { \"field\" : {\n \"groups\" : \"cn=users,dc=example,dc=com\" <1>\n } },\n { \"field\" : {\n \"dn\" : \"cn=John Doe,cn=contractors,dc=example,dc=com\" <2>\n } }\n ] },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/basic_users",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "any": [
- {
- "field": {
- "groups": "cn=users,dc=example,dc=com"
- }
- },
- {
- "field": {
- "dn": "cn=John Doe,cn=contractors,dc=example,dc=com"
- }
- }
- ]
- },
- "enabled": true
- },
- "params": {
- "name": "basic_users"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-ldap-realm.asciidoc",
- "line": 138
- },
- "digest": "21e95d29bc37deb5689a654aa323b4ba",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/admins\n{\n \"roles\" : [ \"monitoring\" , \"user\" ],\n \"rules\" : { \"field\" : {\n \"groups\" : \"cn=admins,dc=example,dc=com\" <1>\n } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/admins",
- "query": null,
- "body": {
- "roles": [
- "monitoring",
- "user"
- ],
- "rules": {
- "field": {
- "groups": "cn=admins,dc=example,dc=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "admins"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-ldap-realm.asciidoc",
- "line": 152
- },
- "digest": "38ffa96674b5fd4042589af0ebb0437b",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/basic_users\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"field\" : {\n \"groups\" : \"cn=users,dc=example,dc=com\" <1>\n } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/basic_users",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "field": {
- "groups": "cn=users,dc=example,dc=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "basic_users"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-pki-realm.asciidoc",
- "line": 163
- },
- "digest": "70bbe14bc4d5a5d58e81ab2b02408817",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/users\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"field\" : {\n \"dn\" : \"cn=John Doe,ou=example,o=com\" <1>\n } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/users",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "field": {
- "dn": "cn=John Doe,ou=example,o=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "users"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-pki-realm.asciidoc",
- "line": 271
- },
- "digest": "1f8a6d2cc57ed8997a52354aca371aac",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/direct_pki_only\n{\n \"roles\" : [ \"role_for_pki1_direct\" ],\n \"rules\" : {\n \"all\": [\n {\n \"field\": {\"realm.name\": \"pki1\"}\n },\n {\n \"field\": {\n \"metadata.pki_delegated_by_user\": null <1>\n }\n }\n ]\n },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/direct_pki_only",
- "query": null,
- "body": {
- "roles": [
- "role_for_pki1_direct"
- ],
- "rules": {
- "all": [
- {
- "field": {
- "realm.name": "pki1"
- }
- },
- {
- "field": {
- "metadata.pki_delegated_by_user": null
- }
- }
- ]
- },
- "enabled": true
- },
- "params": {
- "name": "direct_pki_only"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/configuring-kerberos-realm.asciidoc",
- "line": 179
- },
- "digest": "9584b042223982e0bfde8d12d42c9705",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/kerbrolemapping\n{\n \"roles\" : [ \"monitoring_user\" ],\n \"enabled\": true,\n \"rules\" : {\n \"field\" : { \"username\" : \"user@REALM\" }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/kerbrolemapping",
- "query": null,
- "body": {
- "roles": [
- "monitoring_user"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "username": "user@REALM"
- }
- }
- },
- "params": {
- "name": "kerbrolemapping"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 646
- },
- "digest": "862907653d1c18d2e80eff7f421200e2",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/saml-example\n{\n \"roles\": [ \"example_role\" ], <1>\n \"enabled\": true,\n \"rules\": {\n \"field\": { \"realm.name\": \"saml1\" }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/saml-example",
- "query": null,
- "body": {
- "roles": [
- "example_role"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "realm.name": "saml1"
- }
- }
- },
- "params": {
- "name": "saml-example"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 685
- },
- "digest": "3806cae804fe77bf38b85561592c745b",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/saml-finance\n{\n \"roles\": [ \"finance_data\" ],\n \"enabled\": true,\n \"rules\": { \"all\": [\n { \"field\": { \"realm.name\": \"saml1\" } },\n { \"field\": { \"groups\": \"finance-team\" } }\n ] }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/saml-finance",
- "query": null,
- "body": {
- "roles": [
- "finance_data"
- ],
- "enabled": true,
- "rules": {
- "all": [
- {
- "field": {
- "realm.name": "saml1"
- }
- },
- {
- "field": {
- "groups": "finance-team"
- }
- }
- ]
- }
- },
- "params": {
- "name": "saml-finance"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 898
- },
- "digest": "49cb3f48a0097bfc597c52fa51c6d379",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/saml-service-role\n{\n \"cluster\" : [\"manage_saml\", \"manage_token\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/saml-service-role",
- "query": null,
- "body": {
- "cluster": [
- "manage_saml",
- "manage_token"
- ]
- },
- "params": {
- "name": "saml-service-role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 906
- },
- "digest": "b2b26f8568c5dba7649e79f09b859272",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/saml-service-user\n{\n \"password\" : \"\",\n \"roles\" : [\"saml-service-role\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/saml-service-user",
- "query": null,
- "body": {
- "password": "",
- "roles": [
- "saml-service-role"
- ]
- },
- "params": {
- "username": "saml-service-user"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 926
- },
- "digest": "a5dfcfd1cfb3558e7912456669c92eee",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/prepare\n{\n \"realm\" : \"saml1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 949
- },
- "digest": "8e208098a0156c4c92afe0a06960b230",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/authenticate\n{\n \"content\" : \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" : [\"4fee3b046395c4e751011e97f8900b5273d56685\"]\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 978
- },
- "digest": "9eda9c39428b0c2c53cbd8ee7ae0f888",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/authenticate\n{\n \"content\" : \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" : []\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 993
- },
- "digest": "553904c175a76d5ba83bc5d46fff7373",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/logout\n{\n \"token\" : \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\": \"mJdXLtmvTUSpoLwMvdBt_w\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/saml-guide.asciidoc",
- "line": 1011
- },
- "digest": "a71154ea11a5214f409ecfd118e9b5e3",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/invalidate\n{\n \"query\" : \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\" : \"saml1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 430
- },
- "digest": "10de9fd4a38755020a07c4ec964d44c9",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/oidc-example\n{\n \"roles\": [ \"example_role\" ], <1>\n \"enabled\": true,\n \"rules\": {\n \"field\": { \"realm.name\": \"oidc1\" }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/oidc-example",
- "query": null,
- "body": {
- "roles": [
- "example_role"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "realm.name": "oidc1"
- }
- }
- },
- "params": {
- "name": "oidc-example"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 469
- },
- "digest": "f3ab820e1f2f54ea718017aeae865742",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/oidc-finance\n{\n \"roles\": [ \"finance_data\" ],\n \"enabled\": true,\n \"rules\": { \"all\": [\n { \"field\": { \"realm.name\": \"oidc1\" } },\n { \"field\": { \"groups\": \"finance-team\" } }\n ] }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/oidc-finance",
- "query": null,
- "body": {
- "roles": [
- "finance_data"
- ],
- "enabled": true,
- "rules": {
- "all": [
- {
- "field": {
- "realm.name": "oidc1"
- }
- },
- {
- "field": {
- "groups": "finance-team"
- }
- }
- ]
- }
- },
- "params": {
- "name": "oidc-finance"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 604
- },
- "digest": "a325f31e94fb1e8739258910593504a8",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/facilitator-role\n{\n \"cluster\" : [\"manage_oidc\", \"manage_token\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/facilitator-role",
- "query": null,
- "body": {
- "cluster": [
- "manage_oidc",
- "manage_token"
- ]
- },
- "params": {
- "name": "facilitator-role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 613
- },
- "digest": "53e4ac5a4009fd21024f4b31e54aa83f",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/facilitator\n{\n \"password\" : \"\",\n \"roles\" : [ \"facilitator-role\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/facilitator",
- "query": null,
- "body": {
- "password": "",
- "roles": [
- "facilitator-role"
- ]
- },
- "params": {
- "username": "facilitator"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 633
- },
- "digest": "e3019fd5f23458ae49ad9854c97d321c",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/prepare\n{\n \"realm\" : \"oidc1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 656
- },
- "digest": "9c01db07c9ac395b6370e3b33965c21f",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/authenticate\n{\n \"redirect_uri\" : \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" : \"oidc1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authentication/oidc-guide.asciidoc",
- "line": 674
- },
- "digest": "2a1eece9a59ac1773edcf0a932c26de0",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/logout\n{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/managing-roles.asciidoc",
- "line": 158
- },
- "digest": "d3e5edac5b461020017fd9d8ec7a91fa",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/clicks_admin\n{\n \"run_as\": [ \"clicks_watcher_1\" ],\n \"cluster\": [ \"monitor\" ],\n \"indices\": [\n {\n \"names\": [ \"events-*\" ],\n \"privileges\": [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"category\", \"@timestamp\", \"message\" ]\n },\n \"query\": \"{\\\"match\\\": {\\\"category\\\": \\\"click\\\"}}\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/clicks_admin",
- "query": null,
- "body": {
- "run_as": [
- "clicks_watcher_1"
- ],
- "cluster": [
- "monitor"
- ],
- "indices": [
- {
- "names": [
- "events-*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "category",
- "@timestamp",
- "message"
- ]
- },
- "query": "{\"match\": {\"category\": \"click\"}}"
- }
- ]
- },
- "params": {
- "name": "clicks_admin"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/document-level-security.asciidoc",
- "line": 18
- },
- "digest": "6365312d470426cab1b77e9ffde49170",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/click_role\n{\n \"indices\": [\n {\n \"names\": [ \"events-*\" ],\n \"privileges\": [ \"read\" ],\n \"query\": \"{\\\"match\\\": {\\\"category\\\": \\\"click\\\"}}\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/click_role",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "events-*"
- ],
- "privileges": [
- "read"
- ],
- "query": "{\"match\": {\"category\": \"click\"}}"
- }
- ]
- },
- "params": {
- "name": "click_role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/document-level-security.asciidoc",
- "line": 41
- },
- "digest": "c79e8ee86b332302b25c5c1f5f4f89d7",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/dept_role\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"query\" : {\n \"term\" : { \"department_id\" : 12 }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/dept_role",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "query": {
- "term": {
- "department_id": 12
- }
- }
- }
- ]
- },
- "params": {
- "name": "dept_role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 18
- },
- "digest": "976e5f9baf81bd6ca0e9f80916a0a4f9",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role1\n{\n \"indices\": [\n {\n \"names\": [ \"events-*\" ],\n \"privileges\": [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"category\", \"@timestamp\", \"message\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role1",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "events-*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "category",
- "@timestamp",
- "message"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role1"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 43
- },
- "digest": "7c9076f3e93a8f61189783c736bf6082",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role2\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"event_*\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role2",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "event_*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role2"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 77
- },
- "digest": "d7d92816cac64b7c70d72b0000eeeeea",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role3\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"customer.handle\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role3",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "customer.handle"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role3"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 96
- },
- "digest": "bb28d1f7f3f09f5061d7f4351aee89fc",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role4\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"customer.*\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role4",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "customer.*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role4"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 114
- },
- "digest": "7a987cd13383bdc990155d7bd5fb221e",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role5\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\" : [ \"*\"],\n \"except\": [ \"customer.handle\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role5",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "*"
- ],
- "except": [
- "customer.handle"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role5"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 142
- },
- "digest": "962e6187bbd71c5749376efed04b65ba",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role6\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"except\": [ \"customer.handle\" ],\n \"grant\" : [ \"customer.*\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role6",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "except": [
- "customer.handle"
- ],
- "grant": [
- "customer.*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role6"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/field-level-security.asciidoc",
- "line": 169
- },
- "digest": "a1acf454bd6477183ce27ace872deb46",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/test_role7\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\": [ \"a.*\" ],\n \"except\" : [ \"a.b*\" ]\n }\n }\n ]\n}\n\nPOST /_security/role/test_role8\n{\n \"indices\" : [\n {\n \"names\" : [ \"*\" ],\n \"privileges\" : [ \"read\" ],\n \"field_security\" : {\n \"grant\": [ \"a.b*\" ],\n \"except\" : [ \"a.b.c*\" ]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/test_role7",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "a.*"
- ],
- "except": [
- "a.b*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role7"
- },
- "api": "security.put_role"
- },
- {
- "method": "POST",
- "url": "/_security/role/test_role8",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "*"
- ],
- "privileges": [
- "read"
- ],
- "field_security": {
- "grant": [
- "a.b*"
- ],
- "except": [
- "a.b.c*"
- ]
- }
- }
- ]
- },
- "params": {
- "name": "test_role8"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/alias-privileges.asciidoc",
- "line": 70
- },
- "digest": "474700a60cce2a786b7fd5bedf7df687",
- "lang": "console",
- "found": [],
- "source": "GET /.ds-logs-000002/_doc/2",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.ds-logs-000002/_doc/2",
- "query": null,
- "body": null,
- "params": {
- "index": ".ds-logs-000002",
- "id": "2"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/alias-privileges.asciidoc",
- "line": 94
- },
- "digest": "65c86eb274d4ef4fb0a1649ac35c1305",
- "lang": "console",
- "found": [],
- "source": "GET /.ds-logs-000003/_doc/2",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.ds-logs-000003/_doc/2",
- "query": null,
- "body": null,
- "params": {
- "index": ".ds-logs-000003",
- "id": "2"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/alias-privileges.asciidoc",
- "line": 136
- },
- "digest": "195fe9fadf952ddd7a69c8aaf98d47a1",
- "lang": "console",
- "found": [],
- "source": "GET /current_year/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/current_year/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "current_year",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/alias-privileges.asciidoc",
- "line": 162
- },
- "digest": "c4d60fd70ef1be46616a0d4e7578d8b9",
- "lang": "console",
- "found": [],
- "source": "PUT /2015\n{\n \"aliases\" : {\n \"current_year\" : {}\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/2015",
- "query": null,
- "body": {
- "aliases": {
- "current_year": {}
- }
- },
- "params": {
- "index": "2015"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/alias-privileges.asciidoc",
- "line": 174
- },
- "digest": "06f6cb6e20d2faf6599cfe1f39c6c56b",
- "lang": "console",
- "found": [],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"2015\", \"alias\" : \"current_year\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "2015",
- "alias": "current_year"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/mapping-roles.asciidoc",
- "line": 119
- },
- "digest": "f2359acfb6eaa919125463cc1d3a7cd1",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/admins\n{\n \"roles\" : [ \"monitoring\", \"user\" ],\n \"rules\" : { \"field\" : { \"groups\" : \"cn=admins,dc=example,dc=com\" } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/admins",
- "query": null,
- "body": {
- "roles": [
- "monitoring",
- "user"
- ],
- "rules": {
- "field": {
- "groups": "cn=admins,dc=example,dc=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "admins"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/mapping-roles.asciidoc",
- "line": 129
- },
- "digest": "3ea33023474e77d73ac0540e3a02b0b2",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/basic_users\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"any\" : [\n { \"field\" : { \"dn\" : \"cn=John Doe,cn=contractors,dc=example,dc=com\" } },\n { \"field\" : { \"groups\" : \"cn=users,dc=example,dc=com\" } }\n ] },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/basic_users",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "any": [
- {
- "field": {
- "dn": "cn=John Doe,cn=contractors,dc=example,dc=com"
- }
- },
- {
- "field": {
- "groups": "cn=users,dc=example,dc=com"
- }
- }
- ]
- },
- "enabled": true
- },
- "params": {
- "name": "basic_users"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/mapping-roles.asciidoc",
- "line": 161
- },
- "digest": "81ee2ad368208c4c78098292547b0577",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/admin_user\n{\n \"roles\" : [ \"monitoring\" ],\n \"rules\" : { \"field\" : { \"dn\" : \"cn=Admin,ou=example,o=com\" } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/admin_user",
- "query": null,
- "body": {
- "roles": [
- "monitoring"
- ],
- "rules": {
- "field": {
- "dn": "cn=Admin,ou=example,o=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "admin_user"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/mapping-roles.asciidoc",
- "line": 171
- },
- "digest": "87846c3ddacab1da4af626ae8099e4be",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/role_mapping/basic_user\n{\n \"roles\" : [ \"user\" ],\n \"rules\" : { \"field\" : { \"dn\" : \"cn=John Doe,ou=example,o=com\" } },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/role_mapping/basic_user",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "rules": {
- "field": {
- "dn": "cn=John Doe,ou=example,o=com"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "basic_user"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/role-templates.asciidoc",
- "line": 16
- },
- "digest": "fa154ca3d40df55e3f40d6636fe805de",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/example1\n{\n \"indices\" : [\n {\n \"names\" : [ \"my_index\" ],\n \"privileges\" : [ \"read\" ],\n \"query\" : {\n \"template\" : {\n \"source\" : {\n \"term\" : { \"acl.username\" : \"{{_user.username}}\" }\n }\n }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/example1",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "my_index"
- ],
- "privileges": [
- "read"
- ],
- "query": {
- "template": {
- "source": {
- "term": {
- "acl.username": "{{_user.username}}"
- }
- }
- }
- }
- }
- ]
- },
- "params": {
- "name": "example1"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/authorization/role-templates.asciidoc",
- "line": 52
- },
- "digest": "91b0ce11b58f1d3d8bdfe11d38b820fa",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/example2\n{\n \"indices\" : [\n {\n \"names\" : [ \"my_index\" ],\n \"privileges\" : [ \"read\" ],\n \"query\" : {\n \"template\" : {\n \"source\" : {\n \"term\" : { \"group.id\" : \"{{_user.metadata.group_id}}\" }\n }\n }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/example2",
- "query": null,
- "body": {
- "indices": [
- {
- "names": [
- "my_index"
- ],
- "privileges": [
- "read"
- ],
- "query": {
- "template": {
- "source": {
- "term": {
- "group.id": "{{_user.metadata.group_id}}"
- }
- }
- }
- }
- }
- ]
- },
- "params": {
- "name": "example2"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/auditing/output-logfile.asciidoc",
- "line": 27
- },
- "digest": "a465177ff9450120097e7f6cf13dbc33",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\": {\n \"logger.org.elasticsearch.xpack.security.audit.logfile.DeprecatedLoggingAuditTrail\": \"off\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "logger.org.elasticsearch.xpack.security.audit.logfile.DeprecatedLoggingAuditTrail": "off"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/using-ip-filtering.asciidoc",
- "line": 118
- },
- "digest": "d453198d420e84e4200f8f4f0ed6b83c",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\" : {\n \"xpack.security.transport.filter.allow\" : \"172.16.0.0/24\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.security.transport.filter.allow": "172.16.0.0/24"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/using-ip-filtering.asciidoc",
- "line": 130
- },
- "digest": "da9ffa564574978ea2b1e2bdb36bfd93",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\" : {\n \"xpack.security.transport.filter.enabled\" : false\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "xpack.security.transport.filter.enabled": false
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 54
- },
- "digest": "b13d05599a1c186137f81cad94f3fcc1",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster\": {\n \"remote\": {\n \"one\": {\n \"seeds\": [ \"10.0.1.1:9300\" ]\n },\n \"two\": {\n \"seeds\": [ \"10.0.2.1:9300\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster": {
- "remote": {
- "one": {
- "seeds": [
- "10.0.1.1:9300"
- ]
- },
- "two": {
- "seeds": [
- "10.0.2.1:9300"
- ]
- }
- }
- }
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 86
- },
- "digest": "b06c2363c9071d9d5027a8562dd1b7ab",
- "lang": "console",
- "found": [],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.remote.two.seeds\": [ \"10.0.2.1:9300\" ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "cluster.remote.two.seeds": [
- "10.0.2.1:9300"
- ]
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 101
- },
- "digest": "f479f0f364da5ddd096eac93bb4dd207",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/cluster_two_logs\n{\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/cluster_two_logs",
- "query": null,
- "body": {},
- "params": {
- "name": "cluster_two_logs"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 111
- },
- "digest": "743c2583a226963fec7bd6a29e40205f",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/cluster_two_logs\n{\n \"cluster\": [],\n \"indices\": [\n {\n \"names\": [\n \"logs-*\"\n ],\n \"privileges\": [\n \"read\",\n \"read_cross_cluster\"\n ]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/cluster_two_logs",
- "query": null,
- "body": {
- "cluster": [],
- "indices": [
- {
- "names": [
- "logs-*"
- ],
- "privileges": [
- "read",
- "read_cross_cluster"
- ]
- }
- ]
- },
- "params": {
- "name": "cluster_two_logs"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 132
- },
- "digest": "b6f04e699bbf90f233bb0253f6844958",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/alice\n{\n \"password\" : \"somepassword\",\n \"roles\" : [ \"cluster_two_logs\" ],\n \"full_name\" : \"Alice\",\n \"email\" : \"alice@example.com\",\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/alice",
- "query": null,
- "body": {
- "password": "somepassword",
- "roles": [
- "cluster_two_logs"
- ],
- "full_name": "Alice",
- "email": "alice@example.com",
- "enabled": true
- },
- "params": {
- "username": "alice"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc",
- "line": 147
- },
- "digest": "efe3cb41fcafd981b8fb51fc7337d1d0",
- "lang": "console",
- "found": [],
- "source": "GET two:logs-2017.04/_search\n{\n \"query\": {\n \"match_all\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/two:logs-2017.04/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- }
- },
- "params": {
- "index": "two:logs-2017.04"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/securing-communications/tutorial-tls-addnodes.asciidoc",
- "line": 156
- },
- "digest": "b02e4907c9936c1adc16ccce9d49900d",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _cluster/health",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/security/securing-communications/tutorial-tls-addnodes.asciidoc",
- "line": 166
- },
- "digest": "9296d687ad779f8c57896edff2791c0d",
- "lang": "console",
- "found": [],
- "source": "GET _cat/nodes?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 32
- },
- "digest": "a45eb0cdd138d9c894ca2de9352549a1",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_error_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" } <1>\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_error_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- }
- },
- "params": {
- "id": "log_error_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 66
- },
- "digest": "69d9b8fd364596aa37eae6864d8a6d89",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search?pretty\n{\n \"sort\" : [\n { \"result.execution_time\" : \"desc\" }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "sort": [
- {
- "result.execution_time": "desc"
- }
- ]
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 89
- },
- "digest": "c42ee13e461422d242c94332d3c38f87",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_error_watch\n{\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" }},\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total.value\" : { \"gt\" : 0 }} <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_error_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total.value": {
- "gt": 0
- }
- }
- }
- },
- "params": {
- "id": "log_error_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 119
- },
- "digest": "1414d40bb1e9d7644b72245bbb5ec834",
- "lang": "console",
- "found": [],
- "source": "POST logs/_doc\n{\n \"timestamp\" : \"2015-05-17T18:12:07.613Z\",\n \"request\" : \"GET index.html\",\n \"status_code\" : 404,\n \"message\" : \"Error: File not found\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs/_doc",
- "query": null,
- "body": {
- "timestamp": "2015-05-17T18:12:07.613Z",
- "request": "GET index.html",
- "status_code": 404,
- "message": "Error: File not found"
- },
- "params": {
- "index": "logs"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 136
- },
- "digest": "9aa2327ae315c39f2bce2bd22e0deb1b",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search?pretty\n{\n \"query\" : {\n \"bool\" : {\n \"must\" : [\n { \"match\" : { \"result.condition.met\" : true }},\n { \"range\" : { \"result.execution_time\" : { \"from\" : \"now-10s\" }}}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "result.condition.met": true
- }
- },
- {
- "range": {
- "result.execution_time": {
- "from": "now-10s"
- }
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 166
- },
- "digest": "6a832c7eb7db40b21ab9848d3af19536",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_error_watch\n{\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" }},\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total.value\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total.value}} errors in the logs\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_error_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total.value": {
- "gt": 0
- }
- }
- },
- "actions": {
- "log_error": {
- "logging": {
- "text": "Found {{ctx.payload.hits.total.value}} errors in the logs"
- }
- }
- }
- },
- "params": {
- "id": "log_error_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/getting-started.asciidoc",
- "line": 207
- },
- "digest": "67a490d749a0c3bb16a266663423893d",
- "lang": "console",
- "found": [],
- "source": "DELETE _watcher/watch/log_error_watch",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_watcher/watch/log_error_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "log_error_watch"
- },
- "api": "watcher.delete_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/how-watcher-works.asciidoc",
- "line": 51
- },
- "digest": "b40ea21b877503cc392b5f17e4730814",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_errors\n{\n \"metadata\" : { <1>\n \"color\" : \"red\"\n },\n \"trigger\" : { <2>\n \"schedule\" : {\n \"interval\" : \"5m\"\n }\n },\n \"input\" : { <3>\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"size\" : 0,\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : { <4>\n \"compare\" : { \"ctx.payload.hits.total.value\" : { \"gt\" : 5 }}\n },\n \"transform\" : { <5>\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"actions\" : { <6>\n \"my_webhook\" : {\n \"webhook\" : {\n \"method\" : \"POST\",\n \"host\" : \"mylisteninghost\",\n \"port\" : 9200,\n \"path\" : \"/{{watch_id}}\",\n \"body\" : \"Encountered {{ctx.payload.hits.total.value}} errors\"\n }\n },\n \"email_administrator\" : {\n \"email\" : {\n \"to\" : \"sys.admino@host.domain\",\n \"subject\" : \"Encountered {{ctx.payload.hits.total.value}} errors\",\n \"body\" : \"Too many error in the system, see attached data\",\n \"attachments\" : {\n \"attached_data\" : {\n \"data\" : {\n \"format\" : \"json\"\n }\n }\n },\n \"priority\" : \"high\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_errors",
- "query": null,
- "body": {
- "metadata": {
- "color": "red"
- },
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "size": 0,
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total.value": {
- "gt": 5
- }
- }
- },
- "transform": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "actions": {
- "my_webhook": {
- "webhook": {
- "method": "POST",
- "host": "mylisteninghost",
- "port": 9200,
- "path": "/{{watch_id}}",
- "body": "Encountered {{ctx.payload.hits.total.value}} errors"
- }
- },
- "email_administrator": {
- "email": {
- "to": "sys.admino@host.domain",
- "subject": "Encountered {{ctx.payload.hits.total.value}} errors",
- "body": "Too many error in the system, see attached data",
- "attachments": {
- "attached_data": {
- "data": {
- "format": "json"
- }
- }
- },
- "priority": "high"
- }
- }
- }
- },
- "params": {
- "id": "log_errors"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/how-watcher-works.asciidoc",
- "line": 157
- },
- "digest": "1d918e206ad8dab916e59183da24d9ec",
- "lang": "console",
- "found": [],
- "source": "PUT .watches/_settings\n{\n \"index.routing.allocation.include.role\": \"watcher\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/.watches/_settings",
- "query": null,
- "body": {
- "index.routing.allocation.include.role": "watcher"
- },
- "params": {
- "index": ".watches"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 49
- },
- "digest": "85d2e33791f1a74a69dfb04a60e69306",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/error_logs_alert\n{\n \"metadata\" : {\n \"color\" : \"red\"\n },\n \"trigger\" : {\n \"schedule\" : {\n \"interval\" : \"5m\"\n }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"size\" : 0,\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 5 }}\n },\n \"actions\" : {\n \"email_administrator\" : {\n \"throttle_period\": \"15m\", <1>\n \"email\" : { <2>\n \"to\" : \"sys.admino@host.domain\",\n \"subject\" : \"Encountered {{ctx.payload.hits.total}} errors\",\n \"body\" : \"Too many error in the system, see attached data\",\n \"attachments\" : {\n \"attached_data\" : {\n \"data\" : {\n \"format\" : \"json\"\n }\n }\n },\n \"priority\" : \"high\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/error_logs_alert",
- "query": null,
- "body": {
- "metadata": {
- "color": "red"
- },
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "size": 0,
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 5
- }
- }
- },
- "actions": {
- "email_administrator": {
- "throttle_period": "15m",
- "email": {
- "to": "sys.admino@host.domain",
- "subject": "Encountered {{ctx.payload.hits.total}} errors",
- "body": "Too many error in the system, see attached data",
- "attachments": {
- "attached_data": {
- "data": {
- "format": "json"
- }
- }
- },
- "priority": "high"
- }
- }
- }
- },
- "params": {
- "id": "error_logs_alert"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 104
- },
- "digest": "406a0f1c1aac947bcee58f86b6d036c1",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_event_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"5m\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"size\" : 0,\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 5 }}\n },\n \"throttle_period\" : \"15m\", <1>\n \"actions\" : {\n \"email_administrator\" : {\n \"email\" : {\n \"to\" : \"sys.admino@host.domain\",\n \"subject\" : \"Encountered {{ctx.payload.hits.total}} errors\",\n \"body\" : \"Too many error in the system, see attached data\",\n \"attachments\" : {\n \"attached_data\" : {\n \"data\" : {\n \"format\" : \"json\"\n }\n }\n },\n \"priority\" : \"high\"\n }\n },\n \"notify_pager\" : {\n \"webhook\" : {\n \"method\" : \"POST\",\n \"host\" : \"pager.service.domain\",\n \"port\" : 1234,\n \"path\" : \"/{{watch_id}}\",\n \"body\" : \"Encountered {{ctx.payload.hits.total}} errors\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_event_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "size": 0,
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 5
- }
- }
- },
- "throttle_period": "15m",
- "actions": {
- "email_administrator": {
- "email": {
- "to": "sys.admino@host.domain",
- "subject": "Encountered {{ctx.payload.hits.total}} errors",
- "body": "Too many error in the system, see attached data",
- "attachments": {
- "attached_data": {
- "data": {
- "format": "json"
- }
- }
- },
- "priority": "high"
- }
- },
- "notify_pager": {
- "webhook": {
- "method": "POST",
- "host": "pager.service.domain",
- "port": 1234,
- "path": "/{{watch_id}}",
- "body": "Encountered {{ctx.payload.hits.total}} errors"
- }
- }
- }
- },
- "params": {
- "id": "log_event_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 178
- },
- "digest": "3d48d1ba49f680aac32177d653944623",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch//_ack/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 205
- },
- "digest": "9eef31d85ebaf6c27054d7375715dbe0",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_event_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"5m\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 } }\n },\n \"actions\" : {\n \"log_hits\" : {\n \"foreach\" : \"ctx.payload.hits.hits\", <1>\n \"max_iterations\" : 500,\n \"logging\" : {\n \"text\" : \"Found id {{ctx.payload._id}} with field {{ctx.payload._source.my_field}}\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_event_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "log_hits": {
- "foreach": "ctx.payload.hits.hits",
- "max_iterations": 500,
- "logging": {
- "text": "Found id {{ctx.payload._id}} with field {{ctx.payload._source.my_field}}"
- }
- }
- }
- },
- "params": {
- "id": "log_event_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/actions.asciidoc",
- "line": 250
- },
- "digest": "f67d8aab9106ad24b1d2c771d3840ed1",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/log_event_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"5m\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : \"log-events\",\n \"body\" : {\n \"size\" : 0,\n \"query\" : { \"match\" : { \"status\" : \"error\" } }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 } }\n },\n \"actions\" : {\n \"email_administrator\" : {\n \"email\" : {\n \"to\" : \"sys.admino@host.domain\",\n \"subject\" : \"Encountered {{ctx.payload.hits.total}} errors\",\n \"body\" : \"Too many error in the system, see attached data\",\n \"attachments\" : {\n \"attached_data\" : {\n \"data\" : {\n \"format\" : \"json\"\n }\n }\n },\n \"priority\" : \"high\"\n }\n },\n \"notify_pager\" : {\n \"condition\": { <1>\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 5 } }\n },\n \"webhook\" : {\n \"method\" : \"POST\",\n \"host\" : \"pager.service.domain\",\n \"port\" : 1234,\n \"path\" : \"/{{watch_id}}\",\n \"body\" : \"Encountered {{ctx.payload.hits.total}} errors\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/log_event_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "5m"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": "log-events",
- "body": {
- "size": 0,
- "query": {
- "match": {
- "status": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "email_administrator": {
- "email": {
- "to": "sys.admino@host.domain",
- "subject": "Encountered {{ctx.payload.hits.total}} errors",
- "body": "Too many error in the system, see attached data",
- "attachments": {
- "attached_data": {
- "data": {
- "format": "json"
- }
- }
- },
- "priority": "high"
- }
- },
- "notify_pager": {
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 5
- }
- }
- },
- "webhook": {
- "method": "POST",
- "host": "pager.service.domain",
- "port": 1234,
- "path": "/{{watch_id}}",
- "body": "Encountered {{ctx.payload.hits.total}} errors"
- }
- }
- }
- },
- "params": {
- "id": "log_event_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/managing-watches.asciidoc",
- "line": 30
- },
- "digest": "92a03184d36ce0367676952f8310771c",
- "lang": "console",
- "found": [],
- "source": "GET .watches/_search\n{\n \"size\" : 100\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watches/_search",
- "query": null,
- "body": {
- "size": 100
- },
- "params": {
- "index": ".watches"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 27
- },
- "digest": "dd0b196a099e1cca08c5ce4dd74e935a",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" } <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 45
- },
- "digest": "1e9cab0b2727624e22e8cf4e7ca498ac",
- "lang": "console",
- "found": [],
- "source": "GET _cluster/health?pretty",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": {
- "pretty": true
- },
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 54
- },
- "digest": "221e9b14567f950008459af77757750e",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" }\n },\n \"input\" : {\n \"http\" : {\n \"request\" : {\n \"host\" : \"localhost\",\n \"port\" : 9200,\n \"path\" : \"/_cluster/health\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "http": {
- "request": {
- "host": "localhost",
- "port": 9200,
- "path": "/_cluster/health"
- }
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 76
- },
- "digest": "239f615e0009c5cb1dc4e82ec4c0dab5",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" }\n },\n \"input\" : {\n \"http\" : {\n \"request\" : {\n \"host\" : \"localhost\",\n \"port\" : 9200,\n \"path\" : \"/_cluster/health\",\n \"auth\": {\n \"basic\": {\n \"username\": \"elastic\",\n \"password\": \"x-pack-test-password\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "http": {
- "request": {
- "host": "localhost",
- "port": 9200,
- "path": "/_cluster/health",
- "auth": {
- "basic": {
- "username": "elastic",
- "password": "x-pack-test-password"
- }
- }
- }
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 115
- },
- "digest": "dfb20907cfc5ac520ea3b1dba5f00811",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search\n{\n \"sort\" : [\n { \"result.execution_time\" : \"desc\" }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "result.execution_time": "desc"
- }
- ]
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 137
- },
- "digest": "90f1f5304922fb6d097846dd1444c075",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" } <1>\n },\n \"input\" : {\n \"http\" : {\n \"request\" : {\n \"host\" : \"localhost\",\n \"port\" : 9200,\n \"path\" : \"/_cluster/health\"\n }\n }\n },\n \"condition\" : {\n \"compare\" : {\n \"ctx.payload.status\" : { \"eq\" : \"red\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "http": {
- "request": {
- "host": "localhost",
- "port": 9200,
- "path": "/_cluster/health"
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.status": {
- "eq": "red"
- }
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 169
- },
- "digest": "95c03bdef4faf6bef039c986f4cb3aba",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search?pretty\n{\n \"query\" : {\n \"match\" : { \"result.condition.met\" : true }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "match": {
- "result.condition.met": true
- }
- }
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 193
- },
- "digest": "007179b5e241da650562a5f0a5007823",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/cluster_health_watch\n{\n \"trigger\" : {\n \"schedule\" : { \"interval\" : \"10s\" }\n },\n \"input\" : {\n \"http\" : {\n \"request\" : {\n \"host\" : \"localhost\",\n \"port\" : 9200,\n \"path\" : \"/_cluster/health\"\n }\n }\n },\n \"condition\" : {\n \"compare\" : {\n \"ctx.payload.status\" : { \"eq\" : \"red\" }\n }\n },\n \"actions\" : {\n \"send_email\" : {\n \"email\" : {\n \"to\" : \"username@example.org\",\n \"subject\" : \"Cluster Status Warning\",\n \"body\" : \"Cluster status is RED\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "http": {
- "request": {
- "host": "localhost",
- "port": 9200,
- "path": "/_cluster/health"
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.status": {
- "eq": "red"
- }
- }
- },
- "actions": {
- "send_email": {
- "email": {
- "to": "username@example.org",
- "subject": "Cluster Status Warning",
- "body": "Cluster status is RED"
- }
- }
- }
- },
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 259
- },
- "digest": "95c03bdef4faf6bef039c986f4cb3aba",
- "lang": "console",
- "found": [],
- "source": "GET .watcher-history*/_search?pretty\n{\n \"query\" : {\n \"match\" : { \"result.condition.met\" : true }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watcher-history*/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "query": {
- "match": {
- "result.condition.met": true
- }
- }
- },
- "params": {
- "index": ".watcher-history*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc",
- "line": 280
- },
- "digest": "60b0fc1b6ae418621ff1b31591fa1fce",
- "lang": "console",
- "found": [],
- "source": "DELETE _watcher/watch/cluster_health_watch",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_watcher/watch/cluster_health_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "cluster_health_watch"
- },
- "api": "watcher.delete_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-meetupdata.asciidoc",
- "line": 203
- },
- "digest": "a54bebda65a6d11a6823e04f02b5db20",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/meetup\n{\n \"trigger\": {\n \"schedule\": {\n \"interval\": \"1h\"\n }\n },\n \"input\": {\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logstash\"\n ],\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-3h\"\n }\n }\n },\n {\n \"match\": {\n \"group.group_topics.topic_name\": \"Open Source\"\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"group_by_city\": {\n \"terms\": {\n \"field\": \"group.group_city.keyword\",\n \"size\": 5\n },\n \"aggs\": {\n \"group_by_event\": {\n \"terms\": {\n \"field\": \"event.event_url.keyword\",\n \"size\": 5\n },\n \"aggs\": {\n \"get_latest\": {\n \"terms\": {\n \"field\": \"@timestamp\",\n \"size\": 1,\n \"order\": {\n \"_key\": \"desc\"\n }\n },\n \"aggs\": {\n \"group_by_event_name\": {\n \"terms\": {\n \"field\": \"event.event_name.keyword\"\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\": {\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n \"actions\": { <1>\n \"email_me\": {\n \"throttle_period\": \"10m\",\n \"email\": {\n \"from\": \"username@example.org\", <2>\n \"to\": \"recipient@example.org\", <3>\n \"subject\": \"Open Source events\",\n \"body\": {\n \"html\": \"Found events matching Open Source: {{#ctx.payload.aggregations.group_by_city.buckets}}- {{key}} ({{doc_count}})
{{/ctx.payload.aggregations.group_by_city.buckets}}
\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/meetup",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "interval": "1h"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logstash"
- ],
- "body": {
- "size": 0,
- "query": {
- "bool": {
- "filter": [
- {
- "range": {
- "@timestamp": {
- "gte": "now-3h"
- }
- }
- },
- {
- "match": {
- "group.group_topics.topic_name": "Open Source"
- }
- }
- ]
- }
- },
- "aggs": {
- "group_by_city": {
- "terms": {
- "field": "group.group_city.keyword",
- "size": 5
- },
- "aggs": {
- "group_by_event": {
- "terms": {
- "field": "event.event_url.keyword",
- "size": 5
- },
- "aggs": {
- "get_latest": {
- "terms": {
- "field": "@timestamp",
- "size": 1,
- "order": {
- "_key": "desc"
- }
- },
- "aggs": {
- "group_by_event_name": {
- "terms": {
- "field": "event.event_name.keyword"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "email_me": {
- "throttle_period": "10m",
- "email": {
- "from": "username@example.org",
- "to": "recipient@example.org",
- "subject": "Open Source events",
- "body": {
- "html": "Found events matching Open Source: {{#ctx.payload.aggregations.group_by_city.buckets}}- {{key}} ({{doc_count}})
{{/ctx.payload.aggregations.group_by_city.buckets}}
"
- }
- }
- }
- }
- },
- "params": {
- "id": "meetup"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/example-watches/example-watch-meetupdata.asciidoc",
- "line": 307
- },
- "digest": "4be6ee22c2cddc72c21a76cda23705ed",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/meetup/_execute",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/meetup/_execute",
- "query": null,
- "body": null,
- "params": {
- "id": "meetup"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/troubleshooting.asciidoc",
- "line": 18
- },
- "digest": "2856a5ceff1861aa9a78099f1c517fe7",
- "lang": "console",
- "found": [],
- "source": "GET .watches/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/.watches/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": ".watches"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/watcher/troubleshooting.asciidoc",
- "line": 33
- },
- "digest": "e905543b281e9c41395304da76ed2ea3",
- "lang": "console",
- "found": [],
- "source": "DELETE .watches",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/.watches",
- "query": null,
- "body": null,
- "params": {
- "index": ".watches"
- },
- "api": "indices.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 11
- },
- "digest": "397bdb40d0146102f1f4c6a35675e16a",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"settings\": {\n \"analysis\": {\n \"analyzer\": {\n \"english_exact\": {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"lowercase\"\n ]\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"body\": {\n \"type\": \"text\",\n \"analyzer\": \"english\",\n \"fields\": {\n \"exact\": {\n \"type\": \"text\",\n \"analyzer\": \"english_exact\"\n }\n }\n }\n }\n }\n}\n\nPUT index/_doc/1\n{\n \"body\": \"Ski resort\"\n}\n\nPUT index/_doc/2\n{\n \"body\": \"A pair of skis\"\n}\n\nPOST index/_refresh",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "settings": {
- "analysis": {
- "analyzer": {
- "english_exact": {
- "tokenizer": "standard",
- "filter": [
- "lowercase"
- ]
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "body": {
- "type": "text",
- "analyzer": "english",
- "fields": {
- "exact": {
- "type": "text",
- "analyzer": "english_exact"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "body": "Ski resort"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/2",
- "query": null,
- "body": {
- "body": "A pair of skis"
- },
- "params": {
- "index": "index",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/index/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "index"
- },
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 58
- },
- "digest": "bf2e6ea2bae621b9b2fee7003e891f86",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"simple_query_string\": {\n \"fields\": [ \"body\" ],\n \"query\": \"ski\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "fields": [
- "body"
- ],
- "query": "ski"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 72
- },
- "digest": "bb388254a1591e1f5be7982af19c3729",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 2,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 2,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.18232156,\n \"hits\": [\n {\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 0.18232156,\n \"_source\": {\n \"body\": \"Ski resort\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"2\",\n \"_score\": 0.18232156,\n \"_source\": {\n \"body\": \"A pair of skis\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 116
- },
- "digest": "3f94ed945ae6416a0eb372c2db14d7e0",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"simple_query_string\": {\n \"fields\": [ \"body.exact\" ],\n \"query\": \"ski\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "fields": [
- "body.exact"
- ],
- "query": "ski"
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 130
- },
- "digest": "9fa3ddfa07814f82845343e677bd441b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 1,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.8025915,\n \"hits\": [\n {\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 0.8025915,\n \"_source\": {\n \"body\": \"Ski resort\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 173
- },
- "digest": "26abfc49c238c2b5d259983ac38dbcee",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"simple_query_string\": {\n \"fields\": [ \"body\" ],\n \"quote_field_suffix\": \".exact\",\n \"query\": \"\\\"ski\\\"\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "simple_query_string": {
- "fields": [
- "body"
- ],
- "quote_field_suffix": ".exact",
- "query": "\"ski\""
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/stemming.asciidoc",
- "line": 188
- },
- "digest": "192ff39ffdc681f9b2359563c3c6c113",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 2,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.8025915,\n \"hits\": [\n {\n \"_index\": \"index\",\n \"_id\": \"1\",\n \"_score\": 0.8025915,\n \"_source\": {\n \"body\": \"Ski resort\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "how-to/recipes/scoring.asciidoc",
- "line": 123
- },
- "digest": "a0f15dd7fcb07bc8543fe04c2907d4b9",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\" : {\n \"script_score\" : {\n \"query\" : {\n \"match\": { \"body\": \"elasticsearch\" }\n },\n \"script\" : {\n \"source\" : \"_score * saturation(doc['pagerank'].value, 10)\" <1>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "script_score": {
- "query": {
- "match": {
- "body": "elasticsearch"
- }
- },
- "script": {
- "source": "_score * saturation(doc['pagerank'].value, 10)"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/recipes/scoring.asciidoc",
- "line": 168
- },
- "digest": "0dfa66a019712e413652c5eddd057ba8",
- "lang": "console",
- "found": [],
- "source": "GET _search\n{\n \"query\" : {\n \"bool\" : {\n \"must\": {\n \"match\": { \"body\": \"elasticsearch\" }\n },\n \"should\": {\n \"rank_feature\": {\n \"field\": \"pagerank\", <1>\n \"saturation\": {\n \"pivot\": 10\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "body": "elasticsearch"
- }
- },
- "should": {
- "rank_feature": {
- "field": "pagerank",
- "saturation": {
- "pivot": 10
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 52
- },
- "digest": "12facf3617a41551ce2f0c4d005cb1c7",
- "lang": "console",
- "found": [],
- "source": "PUT movies\n{\n \"mappings\": {\n \"properties\": {\n \"name_and_plot\": {\n \"type\": \"text\"\n },\n \"name\": {\n \"type\": \"text\",\n \"copy_to\": \"name_and_plot\"\n },\n \"plot\": {\n \"type\": \"text\",\n \"copy_to\": \"name_and_plot\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/movies",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name_and_plot": {
- "type": "text"
- },
- "name": {
- "type": "text",
- "copy_to": "name_and_plot"
- },
- "plot": {
- "type": "text",
- "copy_to": "name_and_plot"
- }
- }
- }
- },
- "params": {
- "index": "movies"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 86
- },
- "digest": "a008f42379930edc354b4074e0a33344",
- "lang": "console",
- "found": [],
- "source": "PUT index/_doc/1\n{\n \"designation\": \"spoon\",\n \"price\": 13\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "designation": "spoon",
- "price": 13
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 97
- },
- "digest": "a0a7557bb7e2aff7918557cd648f41af",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"aggs\": {\n \"price_ranges\": {\n \"range\": {\n \"field\": \"price\",\n \"ranges\": [\n { \"to\": 10 },\n { \"from\": 10, \"to\": 100 },\n { \"from\": 100 }\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "range": {
- "field": "price",
- "ranges": [
- {
- "to": 10
- },
- {
- "from": 10,
- "to": 100
- },
- {
- "from": 100
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 120
- },
- "digest": "a4bae4d956bc0a663f42cfec36bf8e0b",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"price_range\": {\n \"type\": \"keyword\"\n }\n }\n }\n}\n\nPUT index/_doc/1\n{\n \"designation\": \"spoon\",\n \"price\": 13,\n \"price_range\": \"10-100\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "price_range": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "designation": "spoon",
- "price": 13,
- "price_range": "10-100"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 144
- },
- "digest": "7dedb148ff74912de81b8f8275f0d7f3",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"aggs\": {\n \"price_ranges\": {\n \"terms\": {\n \"field\": \"price_range\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "aggs": {
- "price_ranges": {
- "terms": {
- "field": "price_range"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 188
- },
- "digest": "34fff811cf60997f6df89928e5a41387",
- "lang": "console",
- "found": [],
- "source": "GET /my_test_scores/_search\n{\n \"query\": {\n \"term\": {\n \"grad_year\": \"2020\"\n }\n },\n \"sort\": [\n {\n \"_script\": {\n \"type\": \"number\",\n \"script\": {\n \"source\": \"doc['math_score'].value + doc['verbal_score'].value\"\n },\n \"order\": \"desc\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_test_scores/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "grad_year": "2020"
- }
- },
- "sort": [
- {
- "_script": {
- "type": "number",
- "script": {
- "source": "doc['math_score'].value + doc['verbal_score'].value"
- },
- "order": "desc"
- }
- }
- ]
- },
- "params": {
- "index": "my_test_scores"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 219
- },
- "digest": "dda949d20d07a9edbe64cefc623df945",
- "lang": "console",
- "found": [],
- "source": "PUT /my_test_scores/_mapping\n{\n \"properties\": {\n \"total_score\": {\n \"type\": \"long\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_test_scores/_mapping",
- "query": null,
- "body": {
- "properties": {
- "total_score": {
- "type": "long"
- }
- }
- },
- "params": {
- "index": "my_test_scores"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 236
- },
- "digest": "295b3aaeb223612afdd991744dc9c873",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/my_test_scores_pipeline\n{\n \"description\": \"Calculates the total test score\",\n \"processors\": [\n {\n \"script\": {\n \"source\": \"ctx.total_score = (ctx.math_score + ctx.verbal_score)\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my_test_scores_pipeline",
- "query": null,
- "body": {
- "description": "Calculates the total test score",
- "processors": [
- {
- "script": {
- "source": "ctx.total_score = (ctx.math_score + ctx.verbal_score)"
- }
- }
- ]
- },
- "params": {
- "id": "my_test_scores_pipeline"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 255
- },
- "digest": "f70ff57c80cdbce3f1e7c63ee307c92d",
- "lang": "console",
- "found": [],
- "source": "POST /_reindex\n{\n \"source\": {\n \"index\": \"my_test_scores\"\n },\n \"dest\": {\n \"index\": \"my_test_scores_2\",\n \"pipeline\": \"my_test_scores_pipeline\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "my_test_scores"
- },
- "dest": {
- "index": "my_test_scores_2",
- "pipeline": "my_test_scores_pipeline"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 272
- },
- "digest": "161d6932c412a01a47ee0883b12056ca",
- "lang": "console",
- "found": [],
- "source": "POST /my_test_scores_2/_doc/?pipeline=my_test_scores_pipeline\n{\n \"student\": \"kimchy\",\n \"grad_year\": \"2020\",\n \"math_score\": 800,\n \"verbal_score\": 800\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_test_scores_2/_doc/",
- "query": {
- "pipeline": "my_test_scores_pipeline"
- },
- "body": {
- "student": "kimchy",
- "grad_year": "2020",
- "math_score": 800,
- "verbal_score": 800
- },
- "params": {
- "index": "my_test_scores_2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 288
- },
- "digest": "aab42564d36970fe9e2f6eab560470a0",
- "lang": "console",
- "found": [],
- "source": "GET /my_test_scores_2/_search\n{\n \"query\": {\n \"term\": {\n \"grad_year\": \"2020\"\n }\n },\n \"sort\": [\n {\n \"total_score\": {\n \"order\": \"desc\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_test_scores_2/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "grad_year": "2020"
- }
- },
- "sort": [
- {
- "total_score": {
- "order": "desc"
- }
- }
- ]
- },
- "params": {
- "index": "my_test_scores_2"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 337
- },
- "digest": "102c7de25d13c87cf28839ada9f63c95",
- "lang": "console",
- "found": [],
- "source": "PUT index/_doc/1\n{\n \"my_date\": \"2016-05-11T16:30:55.328Z\"\n}\n\nGET index/_search\n{\n \"query\": {\n \"constant_score\": {\n \"filter\": {\n \"range\": {\n \"my_date\": {\n \"gte\": \"now-1h\",\n \"lte\": \"now\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index/_doc/1",
- "query": null,
- "body": {
- "my_date": "2016-05-11T16:30:55.328Z"
- },
- "params": {
- "index": "index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "range": {
- "my_date": {
- "gte": "now-1h",
- "lte": "now"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 363
- },
- "digest": "17dd67a66c49f7eb618dd17430e48dfa",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"constant_score\": {\n \"filter\": {\n \"range\": {\n \"my_date\": {\n \"gte\": \"now-1h/m\",\n \"lte\": \"now/m\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "range": {
- "my_date": {
- "gte": "now-1h/m",
- "lte": "now/m"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 396
- },
- "digest": "abc7a670a47516b58b6b07d7497b140c",
- "lang": "console",
- "found": [],
- "source": "GET index/_search\n{\n \"query\": {\n \"constant_score\": {\n \"filter\": {\n \"bool\": {\n \"should\": [\n {\n \"range\": {\n \"my_date\": {\n \"gte\": \"now-1h\",\n \"lte\": \"now-1h/m\"\n }\n }\n },\n {\n \"range\": {\n \"my_date\": {\n \"gt\": \"now-1h/m\",\n \"lt\": \"now/m\"\n }\n }\n },\n {\n \"range\": {\n \"my_date\": {\n \"gte\": \"now/m\",\n \"lte\": \"now\"\n }\n }\n }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index/_search",
- "query": null,
- "body": {
- "query": {
- "constant_score": {
- "filter": {
- "bool": {
- "should": [
- {
- "range": {
- "my_date": {
- "gte": "now-1h",
- "lte": "now-1h/m"
- }
- }
- },
- {
- "range": {
- "my_date": {
- "gt": "now-1h/m",
- "lt": "now/m"
- }
- }
- },
- {
- "range": {
- "my_date": {
- "gte": "now/m",
- "lte": "now"
- }
- }
- }
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 468
- },
- "digest": "971c7a36ee79f2b3aa82c64ea338de70",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\",\n \"eager_global_ordinals\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "keyword",
- "eager_global_ordinals": true
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 599
- },
- "digest": "9559de0c2190f99fcc344887fc7b232a",
- "lang": "console",
- "found": [],
- "source": "PUT bicycles\n{\n \"mappings\": {\n \"properties\": {\n \"cycle_type\": {\n \"type\": \"constant_keyword\",\n \"value\": \"bicycle\"\n },\n \"name\": {\n \"type\": \"text\"\n }\n }\n }\n}\n\nPUT other_cycles\n{\n \"mappings\": {\n \"properties\": {\n \"cycle_type\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"text\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/bicycles",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "cycle_type": {
- "type": "constant_keyword",
- "value": "bicycle"
- },
- "name": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "bicycles"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/other_cycles",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "cycle_type": {
- "type": "keyword"
- },
- "name": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "other_cycles"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 637
- },
- "digest": "14936b96cfb8ff999a833f615ba75495",
- "lang": "console",
- "found": [],
- "source": "GET bicycles,other_cycles/_search\n{\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"description\": \"dutch\"\n }\n },\n \"filter\": {\n \"term\": {\n \"cycle_type\": \"bicycle\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bicycles,other_cycles/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "description": "dutch"
- }
- },
- "filter": {
- "term": {
- "cycle_type": "bicycle"
- }
- }
- }
- }
- },
- "params": {
- "index": "bicycles,other_cycles"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/search-speed.asciidoc",
- "line": 662
- },
- "digest": "9de10a59a5f56dd0906be627896cc789",
- "lang": "console",
- "found": [],
- "source": "GET bicycles,other_cycles/_search\n{\n \"query\": {\n \"match\": {\n \"description\": \"dutch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/bicycles,other_cycles/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "description": "dutch"
- }
- }
- },
- "params": {
- "index": "bicycles,other_cycles"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 14
- },
- "digest": "e273060a675c959fd5f3cde27c8aff07",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"integer\",\n \"index\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "integer",
- "index": false
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 34
- },
- "digest": "c8568f4f02f75db9afd669880db98a16",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"text\",\n \"norms\": false\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "text",
- "norms": false
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 54
- },
- "digest": "1a5cd30017368fe4888454a13c6e8561",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"text\",\n \"index_options\": \"freqs\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "text",
- "index_options": "freqs"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 74
- },
- "digest": "ae3ae58724c413734b67a90a6ddb319f",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"properties\": {\n \"foo\": {\n \"type\": \"text\",\n \"norms\": false,\n \"index_options\": \"freqs\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "foo": {
- "type": "text",
- "norms": false,
- "index_options": "freqs"
- }
- }
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/disk-usage.asciidoc",
- "line": 106
- },
- "digest": "597d456edfcb3d410954a3e9b5babf9a",
- "lang": "console",
- "found": [],
- "source": "PUT index\n{\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"strings\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"keyword\"\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index",
- "query": null,
- "body": {
- "mappings": {
- "dynamic_templates": [
- {
- "strings": {
- "match_mapping_type": "string",
- "mapping": {
- "type": "keyword"
- }
- }
- }
- ]
- }
- },
- "params": {
- "index": "index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "how-to/avoid-oversharding.asciidoc",
- "line": 136
- },
- "digest": "3574da9ffe6372071d9bc9e79e3de3f0",
- "lang": "console",
- "found": [],
- "source": "POST /_reindex\n{\n \"source\": {\n \"index\": \"foo-2019.10.*\"\n },\n \"dest\": {\n \"index\": \"foo-2019.10\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "foo-2019.10.*"
- },
- "dest": {
- "index": "foo-2019.10"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 88
- },
- "digest": "978088f989d45dd09339582e9cbc60e0",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "# GET //_search\nGET /%3Clogstash-%7Bnow%2Fd%7D%3E/_search\n{\n \"query\" : {\n \"match\": {\n \"test\": \"data\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/%3Clogstash-%7Bnow%2Fd%7D%3E/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "params": {
- "index": "%3Clogstash-%7Bnow%2Fd%7D%3E"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 142
- },
- "digest": "a34d70d7022eb4ba48909d440c80390f",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "# GET /,,/_search\nGET /%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogstash-%7Bnow%2Fd%7D%3E/_search\n{\n \"query\" : {\n \"match\": {\n \"test\": \"data\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogstash-%7Bnow%2Fd%7D%3E/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "params": {
- "index": "%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogstash-%7Bnow%2Fd%7D%3E"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 231
- },
- "digest": "09dbd90c5e22ea4a17b4cf9aa72e08ae",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search?q=elasticsearch&filter_path=took,hits.hits._id,hits.hits._score",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "q": "elasticsearch",
- "filter_path": "took,hits.hits._id,hits.hits._score"
- },
- "body": null,
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 239
- },
- "digest": "0936e4cc7952b267b16a3b764d4e25ee",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 3,\n \"hits\" : {\n \"hits\" : [\n {\n \"_id\" : \"0\",\n \"_score\" : 1.6375021\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 259
- },
- "digest": "1dbb8cf17fbc45c87c7d2f75f15f9778",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cluster/state?filter_path=metadata.indices.*.stat*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "metadata.indices.*.stat*"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 267
- },
- "digest": "b1447d563c8b8d3e653cf62eaf11612c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"metadata\" : {\n \"indices\" : {\n \"twitter\": {\"state\": \"open\"}\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 282
- },
- "digest": "1252fa45847edba5ec2b2f33da70ec5b",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cluster/state?filter_path=routing_table.indices.**.state",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "routing_table.indices.**.state"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 290
- },
- "digest": "5ed13422ab669b54b3238a57b57d94e2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"routing_table\": {\n \"indices\": {\n \"twitter\": {\n \"shards\": {\n \"0\": [{\"state\": \"STARTED\"}, {\"state\": \"UNASSIGNED\"}]\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 307
- },
- "digest": "621665fdbd7fc103c09bfeed28b67b1a",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_count?filter_path=-_shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_count",
- "query": {
- "filter_path": "-_shards"
- },
- "body": null,
- "params": null,
- "api": "count"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 315
- },
- "digest": "09108f6f3c42ee4bbe387d3c28713174",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 5\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 326
- },
- "digest": "1e18a67caf8f06ff2710ec4a8b30f625",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cluster/state?filter_path=metadata.indices.*.state,-metadata.indices.logstash-*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state",
- "query": {
- "filter_path": "metadata.indices.*.state,-metadata.indices.logstash-*"
- },
- "body": null,
- "params": null,
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 334
- },
- "digest": "c0aafcb374103c000f5c61010ef9d160",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"metadata\" : {\n \"indices\" : {\n \"index-1\" : {\"state\" : \"open\"},\n \"index-2\" : {\"state\" : \"open\"},\n \"index-3\" : {\"state\" : \"open\"}\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 353
- },
- "digest": "6464124d1677f4552ddddd95a340ca3a",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /library/_doc?refresh\n{\"title\": \"Book #1\", \"rating\": 200.1}\nPOST /library/_doc?refresh\n{\"title\": \"Book #2\", \"rating\": 1.7}\nPOST /library/_doc?refresh\n{\"title\": \"Book #3\", \"rating\": 0.1}\nGET /_search?filter_path=hits.hits._source&_source=title&sort=rating:desc",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/library/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Book #1",
- "rating": 200.1
- },
- "params": {
- "index": "library"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/library/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Book #2",
- "rating": 1.7
- },
- "params": {
- "index": "library"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/library/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Book #3",
- "rating": 0.1
- },
- "params": {
- "index": "library"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "filter_path": "hits.hits._source",
- "_source": "title",
- "sort": "rating:desc"
- },
- "body": null,
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 364
- },
- "digest": "ca0212c413612a028f3405cc29e4ff8a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\" : {\n \"hits\" : [ {\n \"_source\":{\"title\":\"Book #1\"}\n }, {\n \"_source\":{\"title\":\"Book #2\"}\n }, {\n \"_source\":{\"title\":\"Book #3\"}\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 386
- },
- "digest": "b9a153725b28fdd0a5aabd7f17a8c2d7",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_settings?flat_settings=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_settings",
- "query": {
- "flat_settings": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 394
- },
- "digest": "eef497b2139cfd6c73f8d1dc3cf4daa4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"twitter\" : {\n \"settings\": {\n \"index.number_of_replicas\": \"1\",\n \"index.number_of_shards\": \"1\",\n \"index.creation_date\": \"1474389951325\",\n \"index.uuid\": \"n6gzFZTgS664GUfx0Xrpjw\",\n \"index.version.created\": ...,\n \"index.provided_name\" : \"twitter\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 416
- },
- "digest": "5925c23a173a63bdb30b458248d1df76",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_settings?flat_settings=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_settings",
- "query": {
- "flat_settings": "false"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 424
- },
- "digest": "a5cc24f6d552e19c56f88840561750b3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"twitter\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_replicas\": \"1\",\n \"number_of_shards\": \"1\",\n \"creation_date\": \"1474389951325\",\n \"uuid\": \"n6gzFZTgS664GUfx0Xrpjw\",\n \"version\": {\n \"created\": ...\n },\n \"provided_name\" : \"twitter\"\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 580
- },
- "digest": "a6f8636b03cc5f677b7d89e750328612",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "js"
- ],
- "source": "POST /twitter/_search?size=surprise_me",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "surprise_me"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 589
- },
- "digest": "be8a94d6faacfb7ca0d36d222e0ae4c9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"error\" : {\n \"root_cause\" : [\n {\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"Failed to parse int parameter [size] with value [surprise_me]\"\n }\n ],\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"Failed to parse int parameter [size] with value [surprise_me]\",\n \"caused_by\" : {\n \"type\" : \"number_format_exception\",\n \"reason\" : \"For input string: \\\"surprise_me\\\"\"\n }\n },\n \"status\" : 400\n}"
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 612
- },
- "digest": "6d1e75312a28a5ba23837abf768f2510",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "js"
- ],
- "source": "POST /twitter/_search?size=surprise_me&error_trace=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "surprise_me",
- "error_trace": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "api-conventions.asciidoc",
- "line": 620
- },
- "digest": "ddad5df34c874dfe814a44e1e0d57148",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"error\": {\n \"root_cause\": [\n {\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"Failed to parse int parameter [size] with value [surprise_me]\",\n \"stack_trace\": \"Failed to parse int parameter [size] with value [surprise_me]]; nested: IllegalArgumentException...\"\n }\n ],\n \"type\": \"illegal_argument_exception\",\n \"reason\": \"Failed to parse int parameter [size] with value [surprise_me]\",\n \"stack_trace\": \"java.lang.IllegalArgumentException: Failed to parse int parameter [size] with value [surprise_me]\\n at org.elasticsearch.rest.RestRequest.paramAsInt(RestRequest.java:175)...\",\n \"caused_by\": {\n \"type\": \"number_format_exception\",\n \"reason\": \"For input string: \\\"surprise_me\\\"\",\n \"stack_trace\": \"java.lang.NumberFormatException: For input string: \\\"surprise_me\\\"\\n at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)...\"\n }\n },\n \"status\": 400\n}"
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-decision.asciidoc",
- "line": 15
- },
- "digest": "0d142c34961983f6aab5f12965407bab",
- "lang": "console",
- "found": [],
- "source": "GET /_autoscaling/decision/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_autoscaling/decision/",
- "query": null,
- "body": null,
- "params": null,
- "api": "autoscaling.get_autoscaling_decision"
- }
- ]
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-decision.asciidoc",
- "line": 40
- },
- "digest": "f1335bacda32b273ecc9603498eff65c",
- "lang": "console",
- "found": [],
- "source": "GET /_autoscaling/decision",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_autoscaling/decision",
- "query": null,
- "body": null,
- "params": null,
- "api": "autoscaling.get_autoscaling_decision"
- }
- ]
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-decision.asciidoc",
- "line": 48
- },
- "digest": "593e620f6cd30342d9382c78d23bd74d",
- "lang": "console-result",
- "found": [],
- "source": "{\n decisions: []\n}"
- },
- {
- "source_location": {
- "file": "autoscaling/apis/delete-autoscaling-policy.asciidoc",
- "line": 15
- },
- "digest": "e7e47d671e68046629a7969c55eed8b6",
- "lang": "console",
- "found": [],
- "source": "PUT /_autoscaling/policy/my_autoscaling_policy\n{\n \"policy\": {\n \"deciders\": {\n \"always\": {\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_autoscaling/policy/my_autoscaling_policy",
- "query": null,
- "body": {
- "policy": {
- "deciders": {
- "always": {}
- }
- }
- },
- "params": {
- "name": "my_autoscaling_policy"
- },
- "api": "autoscaling.put_autoscaling_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "autoscaling/apis/delete-autoscaling-policy.asciidoc",
- "line": 29
- },
- "digest": "50a9623c153cabe64101efb633e10e6c",
- "lang": "console",
- "found": [],
- "source": "DELETE /_autoscaling/policy/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "autoscaling/apis/delete-autoscaling-policy.asciidoc",
- "line": 52
- },
- "digest": "b620ef4400d2f660fe2c67835938442c",
- "lang": "console",
- "found": [],
- "source": "DELETE /_autoscaling/policy/my_autoscaling_policy",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_autoscaling/policy/my_autoscaling_policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my_autoscaling_policy"
- },
- "api": "autoscaling.delete_autoscaling_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "autoscaling/apis/delete-autoscaling-policy.asciidoc",
- "line": 60
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-policy.asciidoc",
- "line": 15
- },
- "digest": "e7e47d671e68046629a7969c55eed8b6",
- "lang": "console",
- "found": [],
- "source": "PUT /_autoscaling/policy/my_autoscaling_policy\n{\n \"policy\": {\n \"deciders\": {\n \"always\": {\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_autoscaling/policy/my_autoscaling_policy",
- "query": null,
- "body": {
- "policy": {
- "deciders": {
- "always": {}
- }
- }
- },
- "params": {
- "name": "my_autoscaling_policy"
- },
- "api": "autoscaling.put_autoscaling_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-policy.asciidoc",
- "line": 29
- },
- "digest": "fb4799d2fe4011bf6084f89d97d9a4a5",
- "lang": "console",
- "found": [],
- "source": "GET /_autoscaling/policy/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-policy.asciidoc",
- "line": 52
- },
- "digest": "0ea146b178561bc8b9002bed8a35641f",
- "lang": "console",
- "found": [],
- "source": "GET /_autoscaling/policy/my_autoscaling_policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_autoscaling/policy/my_autoscaling_policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my_autoscaling_policy"
- },
- "api": "autoscaling.get_autoscaling_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "autoscaling/apis/get-autoscaling-policy.asciidoc",
- "line": 60
- },
- "digest": "55dd86a01e4ca379ba7637bdbb2620cf",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"policy\": {\n \"deciders\": \n }\n}"
- },
- {
- "source_location": {
- "file": "autoscaling/apis/put-autoscaling-policy.asciidoc",
- "line": 15
- },
- "digest": "4015b1eb9a15be7a3468bca965c52958",
- "lang": "console",
- "found": [],
- "source": "PUT /_autoscaling/policy/\n{\n \"policy\": {\n \"deciders\": {\n \"always\": {\n }\n }\n }\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "autoscaling/apis/put-autoscaling-policy.asciidoc",
- "line": 47
- },
- "digest": "e7e47d671e68046629a7969c55eed8b6",
- "lang": "console",
- "found": [],
- "source": "PUT /_autoscaling/policy/my_autoscaling_policy\n{\n \"policy\": {\n \"deciders\": {\n \"always\": {\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_autoscaling/policy/my_autoscaling_policy",
- "query": null,
- "body": {
- "policy": {
- "deciders": {
- "always": {}
- }
- }
- },
- "params": {
- "name": "my_autoscaling_policy"
- },
- "api": "autoscaling.put_autoscaling_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "autoscaling/apis/put-autoscaling-policy.asciidoc",
- "line": 63
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 36
- },
- "digest": "45bde49f35ffae3f3dabc77a592241b4",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/master?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/master",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.master"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 57
- },
- "digest": "179dabbc531ede7a1813d1a11ce5b5fd",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/master?help",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/master",
- "query": {
- "help": true
- },
- "body": null,
- "params": null,
- "api": "cat.master"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 85
- },
- "digest": "d940059e16675a40e3d278073331eeed",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodes?h=ip,port,heapPercent,name",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "h": "ip,port,heapPercent,name"
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 121
- },
- "digest": "53b027c2d3ac80e93d398762c55894eb",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/indices?bytes=b&s=store.size:desc&v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/indices",
- "query": {
- "bytes": "b",
- "s": "store.size:desc",
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.indices"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat.asciidoc",
- "line": 211
- },
- "digest": "794fa23d07c42900b5e97fb9bf323941",
- "lang": "console",
- "found": [],
- "source": "GET _cat/templates?v&s=order:desc,index_patterns",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/templates",
- "query": {
- "v": true,
- "s": "order:desc,index_patterns"
- },
- "body": null,
- "params": null,
- "api": "cat.templates"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/alias.asciidoc",
- "line": 75
- },
- "digest": "a003467caeafcb2a935522efb83080cb",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/aliases?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/aliases",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/allocation.asciidoc",
- "line": 47
- },
- "digest": "5c7ece1f30267adabdb832424871900a",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/allocation?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/allocation",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.allocation"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/anomaly-detectors.asciidoc",
- "line": 270
- },
- "digest": "bb03aeaba69c110f86505fa0e4e5035d",
- "lang": "console",
- "found": [],
- "source": "GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/ml/anomaly_detectors",
- "query": {
- "h": "id,s,dpr,mb",
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.ml_jobs"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/anomaly-detectors.asciidoc",
- "line": 276
- },
- "digest": "39271e983530b6eb89f38c4098549021",
- "lang": "console-result",
- "found": [],
- "source": "id s dpr mb\nhigh_sum_total_sales closed 14022 1.5mb\nlow_request_rate closed 1216 40.5kb\nresponse_code_rates closed 28146 132.7kb\nurl_scanning closed 28146 501.6kb"
- },
- {
- "source_location": {
- "file": "cat/count.asciidoc",
- "line": 57
- },
- "digest": "e7553d4bb4fd82d8f80a4d7af2624afb",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/count/twitter?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/count/twitter",
- "query": {
- "v": true
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "cat.count"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/count.asciidoc",
- "line": 79
- },
- "digest": "0a1f8ad54b1d8c9feeaceaeed16c8490",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/count?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/count",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.count"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/dataframeanalytics.asciidoc",
- "line": 124
- },
- "digest": "7c6f205c98da14c68d3d936639462dd3",
- "lang": "console",
- "found": [],
- "source": "GET _cat/ml/data_frame/analytics?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/ml/data_frame/analytics",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.ml_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/dataframeanalytics.asciidoc",
- "line": 130
- },
- "digest": "821d07ed9a229f9d5cc34651124da6e8",
- "lang": "console-result",
- "found": [],
- "source": "id create_time type state\nclassifier_job_1 2020-02-12T11:49:09.594Z classification stopped\nclassifier_job_2 2020-02-12T11:49:14.479Z classification stopped\nclassifier_job_3 2020-02-12T11:49:16.928Z classification stopped\nclassifier_job_4 2020-02-12T11:49:19.127Z classification stopped\nclassifier_job_5 2020-02-12T11:49:21.349Z classification stopped"
- },
- {
- "source_location": {
- "file": "cat/datafeeds.asciidoc",
- "line": 118
- },
- "digest": "4f57307b38318e9d8416923e12ff47ed",
- "lang": "console",
- "found": [],
- "source": "GET _cat/ml/datafeeds?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/ml/datafeeds",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.ml_datafeeds"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/datafeeds.asciidoc",
- "line": 124
- },
- "digest": "a22d26ed1bb89879243a707a73fa4e1c",
- "lang": "console-result",
- "found": [],
- "source": "id state buckets.count search.count\ndatafeed-high_sum_total_sales stopped 743 7\ndatafeed-low_request_rate stopped 1457 3\ndatafeed-response_code_rates stopped 1460 18\ndatafeed-url_scanning stopped 1460 18"
- },
- {
- "source_location": {
- "file": "cat/fielddata.asciidoc",
- "line": 90
- },
- "digest": "973f2d7fbff9f310b21108b31d7ad413",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/fielddata?v&fields=body",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/fielddata",
- "query": {
- "v": true,
- "fields": "body"
- },
- "body": null,
- "params": null,
- "api": "cat.fielddata"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/fielddata.asciidoc",
- "line": 114
- },
- "digest": "62daf8e41b9e984d18d6cc51f247c7ad",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/fielddata/body,soul?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/fielddata/body,soul",
- "query": {
- "v": true
- },
- "body": null,
- "params": {
- "fields": "body,soul"
- },
- "api": "cat.fielddata"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/fielddata.asciidoc",
- "line": 140
- },
- "digest": "b26ff669b3c88fb0872fa0a923972f54",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/fielddata?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/fielddata",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.fielddata"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/health.asciidoc",
- "line": 69
- },
- "digest": "f8cc4b331a19ff4df8e4a490f906ee69",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cat/health?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/health.asciidoc",
- "line": 89
- },
- "digest": "ccd9e2cf7181de67cf9ab0df1a02c575",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_cat/health?v&ts=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/health",
- "query": {
- "v": true,
- "ts": "false"
- },
- "body": null,
- "params": null,
- "api": "cat.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/indices.asciidoc",
- "line": 100
- },
- "digest": "073539a7e38be3cdf13008330b6a536a",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cat/indices/twi*?v&s=index",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/indices/twi*",
- "query": {
- "v": true,
- "s": "index"
- },
- "body": null,
- "params": {
- "index": "twi*"
- },
- "api": "cat.indices"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/master.asciidoc",
- "line": 39
- },
- "digest": "45bde49f35ffae3f3dabc77a592241b4",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/master?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/master",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.master"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/nodeattrs.asciidoc",
- "line": 69
- },
- "digest": "e20e2e6f949ac660a77840a9263fadef",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodeattrs?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodeattrs",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.nodeattrs"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/nodeattrs.asciidoc",
- "line": 100
- },
- "digest": "0c69c638073cc8518187b678dd33443c",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodeattrs?v&h=name,pid,attr,value",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodeattrs",
- "query": {
- "v": true,
- "h": "name,pid,attr,value"
- },
- "body": null,
- "params": null,
- "api": "cat.nodeattrs"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/nodes.asciidoc",
- "line": 304
- },
- "digest": "db20adb70a8e8d0709d15ba0daf18d23",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodes?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/nodes.asciidoc",
- "line": 332
- },
- "digest": "21d3e98d911642ab3bda2657f7a06f80",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/nodes?v&h=id,ip,port,v,m",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/nodes",
- "query": {
- "v": true,
- "h": "id,ip,port,v,m"
- },
- "body": null,
- "params": null,
- "api": "cat.nodes"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/pending_tasks.asciidoc",
- "line": 39
- },
- "digest": "dc2e9e499c7037eb9327cc84a942c5e9",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/pending_tasks?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/pending_tasks",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.pending_tasks"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/plugins.asciidoc",
- "line": 38
- },
- "digest": "3796d69e8339bab58e70fdde9f9c09ad",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/plugins?v&s=component&h=name,component,version,description",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/plugins",
- "query": {
- "v": true,
- "s": "component",
- "h": "name,component,version,description"
- },
- "body": null,
- "params": null,
- "api": "cat.plugins"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/recovery.asciidoc",
- "line": 75
- },
- "digest": "0497361415e63295f2151b34818ad1ab",
- "lang": "console",
- "found": [],
- "source": "GET _cat/recovery?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/recovery.asciidoc",
- "line": 104
- },
- "digest": "be9390dd19d724364b72bf081b3593d7",
- "lang": "console",
- "found": [],
- "source": "GET _cat/recovery?v&h=i,s,t,ty,st,shost,thost,f,fp,b,bp",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": {
- "v": true,
- "h": "i,s,t,ty,st,shost,thost,f,fp,b,bp"
- },
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/recovery.asciidoc",
- "line": 134
- },
- "digest": "a213728fa704ca23c5983809332d3fb3",
- "lang": "console",
- "found": [],
- "source": "GET _cat/recovery?v&h=i,s,t,ty,st,rep,snap,f,fp,b,bp",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/recovery",
- "query": {
- "v": true,
- "h": "i,s,t,ty,st,rep,snap,f,fp,b,bp"
- },
- "body": null,
- "params": null,
- "api": "cat.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/repositories.asciidoc",
- "line": 38
- },
- "digest": "6fa570aac5033e3b25d3071a6c9ea3dc",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/repositories?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/repositories",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.repositories"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 294
- },
- "digest": "7e126e2751311db60cfcbb22c9c41caa",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 320
- },
- "digest": "e42e92050dd1c20262ce9e38f4b42ba0",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards/twitt*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards/twitt*",
- "query": null,
- "body": null,
- "params": {
- "index": "twitt*"
- },
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 341
- },
- "digest": "7e126e2751311db60cfcbb22c9c41caa",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 364
- },
- "digest": "7e126e2751311db60cfcbb22c9c41caa",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/shards.asciidoc",
- "line": 385
- },
- "digest": "25c0e66a433a0cd596e0641b752ff6d7",
- "lang": "console",
- "found": [],
- "source": "GET _cat/shards?h=index,shard,prirep,state,unassigned.reason",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/shards",
- "query": {
- "h": "index,shard,prirep,state,unassigned.reason"
- },
- "body": null,
- "params": null,
- "api": "cat.shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/segments.asciidoc",
- "line": 116
- },
- "digest": "6f507269ad5b31d2bb0885c1b18aac1a",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/segments?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/segments",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/snapshots.asciidoc",
- "line": 115
- },
- "digest": "706fc4b9e4df1f6ee3fe34194492c20e",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/snapshots/repo1?v&s=id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/snapshots/repo1",
- "query": {
- "v": true,
- "s": "id"
- },
- "body": null,
- "params": {
- "repository": "repo1"
- },
- "api": "cat.snapshots"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/tasks.asciidoc",
- "line": 57
- },
- "digest": "f3422381d36398fcb2612692b11b1e96",
- "lang": "console",
- "found": [],
- "source": "GET _cat/tasks?v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/tasks",
- "query": {
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.tasks"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/tasks.asciidoc",
- "line": 65
- },
- "digest": "c2613cffe0ea615550bb2a0ef9c76697",
- "lang": "console-result",
- "found": [],
- "source": "action task_id parent_task_id type start_time timestamp running_time ip node\ncluster:monitor/tasks/lists[n] oTUltX4IQMOUUVeiohTt8A:124 oTUltX4IQMOUUVeiohTt8A:123 direct 1458585884904 01:48:24 44.1micros 127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A\ncluster:monitor/tasks/lists oTUltX4IQMOUUVeiohTt8A:123 - transport 1458585884904 01:48:24 186.2micros 127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A"
- },
- {
- "source_location": {
- "file": "cat/templates.asciidoc",
- "line": 50
- },
- "digest": "289e6033c96f931844770114113cad6a",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/templates?v&s=name",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/templates",
- "query": {
- "v": true,
- "s": "name"
- },
- "body": null,
- "params": null,
- "api": "cat.templates"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/thread_pool.asciidoc",
- "line": 124
- },
- "digest": "ad88e46bb06739991498dee248850223",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/thread_pool",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/thread_pool",
- "query": null,
- "body": null,
- "params": null,
- "api": "cat.thread_pool"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/thread_pool.asciidoc",
- "line": 160
- },
- "digest": "ab5e724a4baa0cc44df33f7d62583e7f",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/thread_pool/generic?v&h=id,name,active,rejected,completed",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/thread_pool/generic",
- "query": {
- "v": true,
- "h": "id,name,active,rejected,completed"
- },
- "body": null,
- "params": {
- "thread_pool_patterns": "generic"
- },
- "api": "cat.thread_pool"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/trainedmodel.asciidoc",
- "line": 113
- },
- "digest": "1d56d3532d30d60c1d93d75b6a377a49",
- "lang": "console",
- "found": [],
- "source": "GET _cat/ml/trained_models?h=c,o,l,ct,v&v",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/ml/trained_models",
- "query": {
- "h": "c,o,l,ct,v",
- "v": true
- },
- "body": null,
- "params": null,
- "api": "cat.ml_trained_models"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/trainedmodel.asciidoc",
- "line": 120
- },
- "digest": "bf7dead020ccabeb72f695804845ef14",
- "lang": "console-result",
- "found": [],
- "source": "id created_by operations license create_time version\nddddd-1580216177138 _xpack 196 PLATINUM 2020-01-28T12:56:17.138Z 8.0.0\nflight-regress-1580215685537 _xpack 102 PLATINUM 2020-01-28T12:48:05.537Z 8.0.0\nlang_ident_model_1 _xpack 39629 BASIC 2019-12-05T12:28:34.594Z 7.6.0"
- },
- {
- "source_location": {
- "file": "cat/transforms.asciidoc",
- "line": 172
- },
- "digest": "da8c3c635ea1101d6a1a5eb1db2ffebd",
- "lang": "console",
- "found": [],
- "source": "GET /_cat/transforms?v&format=json",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cat/transforms",
- "query": {
- "v": true,
- "format": "json"
- },
- "body": null,
- "params": null,
- "api": "cat.transforms"
- }
- ]
- },
- {
- "source_location": {
- "file": "cat/transforms.asciidoc",
- "line": 178
- },
- "digest": "abfe7e2fe7e503fdb4fc3b9c6be18b07",
- "lang": "console-result",
- "found": [],
- "source": "[\n {\n \"id\" : \"ecommerce_transform\",\n \"create_time\" : \"2020-03-20T20:31:25.077Z\",\n \"version\" : \"7.7.0\",\n \"source_index\" : \"kibana_sample_data_ecommerce\",\n \"dest_index\" : \"kibana_sample_data_ecommerce_transform\",\n \"pipeline\" : null,\n \"description\" : \"Maximum priced ecommerce data by customer_id in Asia\",\n \"transform_type\" : \"continuous\",\n \"frequency\" : \"5m\",\n \"max_page_search_size\" : \"500\",\n \"state\" : \"STARTED\"\n }\n]"
- },
- {
- "source_location": {
- "file": "cluster.asciidoc",
- "line": 56
- },
- "digest": "2c602b4ee8f22cda2cdf19bad31da0af",
- "lang": "console",
- "found": [],
- "source": "# If no filters are given, the default is to select all nodes\nGET /_nodes\n# Explicitly select all nodes\nGET /_nodes/_all\n# Select just the local node\nGET /_nodes/_local\n# Select the elected master node\nGET /_nodes/_master\n# Select nodes by name, which can include wildcards\nGET /_nodes/node_name_goes_here\nGET /_nodes/node_name_goes_*\n# Select nodes by address, which can include wildcards\nGET /_nodes/10.0.0.3,10.0.0.4\nGET /_nodes/10.0.0.*\n# Select nodes by role\nGET /_nodes/_all,master:false\nGET /_nodes/data:true,ingest:true\nGET /_nodes/coordinating_only:true\nGET /_nodes/master:true,voting_only:false\n# Select nodes by custom attribute (e.g. with something like `node.attr.rack: 2` in the configuration file)\nGET /_nodes/rack:2\nGET /_nodes/ra*:2\nGET /_nodes/ra*:2*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes",
- "query": null,
- "body": null,
- "params": null,
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_all",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_all"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_local",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_local"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_master",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_master"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/node_name_goes_here",
- "query": null,
- "body": null,
- "params": {
- "node_id": "node_name_goes_here"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/node_name_goes_*",
- "query": null,
- "body": null,
- "params": {
- "node_id": "node_name_goes_*"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/10.0.0.3,10.0.0.4",
- "query": null,
- "body": null,
- "params": {
- "node_id": "10.0.0.3,10.0.0.4"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/10.0.0.*",
- "query": null,
- "body": null,
- "params": {
- "node_id": "10.0.0.*"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_all,master:false",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_all,master:false"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/data:true,ingest:true",
- "query": null,
- "body": null,
- "params": {
- "node_id": "data:true,ingest:true"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/coordinating_only:true",
- "query": null,
- "body": null,
- "params": {
- "node_id": "coordinating_only:true"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/master:true,voting_only:false",
- "query": null,
- "body": null,
- "params": {
- "node_id": "master:true,voting_only:false"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/rack:2",
- "query": null,
- "body": null,
- "params": {
- "node_id": "rack:2"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/ra*:2",
- "query": null,
- "body": null,
- "params": {
- "node_id": "ra*:2"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/ra*:2*",
- "query": null,
- "body": null,
- "params": {
- "node_id": "ra*:2*"
- },
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/allocation-explain.asciidoc",
- "line": 77
- },
- "digest": "2663038cfc46b106edaef607d553c99c",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/allocation/explain\n{\n \"index\": \"myindex\",\n \"shard\": 0,\n \"primary\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/allocation/explain",
- "query": null,
- "body": {
- "index": "myindex",
- "shard": 0,
- "primary": true
- },
- "params": null,
- "api": "cluster.allocation_explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/allocation-explain.asciidoc",
- "line": 90
- },
- "digest": "75fb2de2b47c564833ab14049c295384",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/allocation/explain\n{\n \"index\": \"myindex\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"nodeA\" <1>\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/allocation/explain",
- "query": null,
- "body": {
- "index": "myindex",
- "shard": 0,
- "primary": false,
- "current_node": "nodeA"
- },
- "params": null,
- "api": "cluster.allocation_explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/allocation-explain.asciidoc",
- "line": 114
- },
- "digest": "9db57741b46cc9f088cebd6a34ba147d",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index?master_timeout=1s&timeout=1s\n{\"settings\": {\"index.routing.allocation.include._name\": \"non_existent_node\"} }\n\nGET /_cluster/allocation/explain\n{\n \"index\": \"my_index\",\n \"shard\": 0,\n \"primary\": true\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": {
- "master_timeout": "1s",
- "timeout": "1s"
- },
- "body": {
- "settings": {
- "index.routing.allocation.include._name": "non_existent_node"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- },
- {
- "method": "GET",
- "url": "/_cluster/allocation/explain",
- "query": null,
- "body": {
- "index": "my_index",
- "shard": 0,
- "primary": true
- },
- "params": null,
- "api": "cluster.allocation_explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/allocation-explain.asciidoc",
- "line": 130
- },
- "digest": "5baf4aac3e1293fc528d56b91699e781",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"index\" : \"my_index\",\n \"shard\" : 0,\n \"primary\" : true,\n \"current_state\" : \"unassigned\", <1>\n \"unassigned_info\" : {\n \"reason\" : \"INDEX_CREATED\", <2>\n \"at\" : \"2017-01-04T18:08:16.600Z\",\n \"last_allocation_status\" : \"no\"\n },\n \"can_allocate\" : \"no\", <3>\n \"allocate_explanation\" : \"cannot allocate because allocation is not permitted to any of the nodes\",\n \"node_allocation_decisions\" : [\n {\n \"node_id\" : \"8qt2rY-pT6KNZB3-hGfLnw\",\n \"node_name\" : \"node-0\",\n \"transport_address\" : \"127.0.0.1:9401\",\n \"node_attributes\" : {},\n \"node_decision\" : \"no\", <4>\n \"weight_ranking\" : 1,\n \"deciders\" : [\n {\n \"decider\" : \"filter\", <5>\n \"decision\" : \"NO\",\n \"explanation\" : \"node does not match index setting [index.routing.allocation.include] filters [_name:\\\"non_existent_node\\\"]\" <6>\n }\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "cluster/health.asciidoc",
- "line": 36
- },
- "digest": "04f5dd677c777bcb15d7d5fa63275fc8",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cluster/health?wait_for_status=yellow&timeout=50s",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": {
- "wait_for_status": "yellow",
- "timeout": "50s"
- },
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/health.asciidoc",
- "line": 150
- },
- "digest": "b02e4907c9936c1adc16ccce9d49900d",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _cluster/health",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/health.asciidoc",
- "line": 159
- },
- "digest": "a6936420cb762a0f7f53a5ec54e52f36",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"cluster_name\" : \"testcluster\",\n \"status\" : \"yellow\",\n \"timed_out\" : false,\n \"number_of_nodes\" : 1,\n \"number_of_data_nodes\" : 1,\n \"active_primary_shards\" : 1,\n \"active_shards\" : 1,\n \"relocating_shards\" : 0,\n \"initializing_shards\" : 0,\n \"unassigned_shards\" : 1,\n \"delayed_unassigned_shards\": 0,\n \"number_of_pending_tasks\" : 0,\n \"number_of_in_flight_fetch\": 0,\n \"task_max_waiting_in_queue_millis\": 0,\n \"active_shards_percent_as_number\": 50.0\n}"
- },
- {
- "source_location": {
- "file": "cluster/health.asciidoc",
- "line": 186
- },
- "digest": "c48264ec5d9b9679fddd72e5c44425b9",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_cluster/health/twitter?level=shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/health/twitter",
- "query": {
- "level": "shards"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "cluster.health"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/reroute.asciidoc",
- "line": 185
- },
- "digest": "c5488b3888749d3d5b9808ab28d384eb",
- "lang": "console",
- "found": [],
- "source": "POST /_cluster/reroute\n{\n \"commands\" : [\n {\n \"move\" : {\n \"index\" : \"test\", \"shard\" : 0,\n \"from_node\" : \"node1\", \"to_node\" : \"node2\"\n }\n },\n {\n \"allocate_replica\" : {\n \"index\" : \"test\", \"shard\" : 1,\n \"node\" : \"node3\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_cluster/reroute",
- "query": null,
- "body": {
- "commands": [
- {
- "move": {
- "index": "test",
- "shard": 0,
- "from_node": "node1",
- "to_node": "node2"
- }
- },
- {
- "allocate_replica": {
- "index": "test",
- "shard": 1,
- "node": "node3"
- }
- }
- ]
- },
- "params": null,
- "api": "cluster.reroute"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/state.asciidoc",
- "line": 139
- },
- "digest": "b66be1daf6c220eb66d94e708b2fae39",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state/metadata,routing_table/foo,bar",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state/metadata,routing_table/foo,bar",
- "query": null,
- "body": null,
- "params": {
- "metric": "metadata,routing_table",
- "index": "foo,bar"
- },
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/state.asciidoc",
- "line": 146
- },
- "digest": "0fa220ee3fb267020382f74aa70eb1e9",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state/_all/foo,bar",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state/_all/foo,bar",
- "query": null,
- "body": null,
- "params": {
- "metric": "_all",
- "index": "foo,bar"
- },
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/state.asciidoc",
- "line": 153
- },
- "digest": "a3cfd350c73a104b99a998c6be931408",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/state/blocks",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/state/blocks",
- "query": null,
- "body": null,
- "params": {
- "metric": "blocks"
- },
- "api": "cluster.state"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/stats.asciidoc",
- "line": 1100
- },
- "digest": "861f5f61409dc87f3671293b87839ff7",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/stats?human&pretty",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/stats",
- "query": {
- "human": true,
- "pretty": true
- },
- "body": null,
- "params": null,
- "api": "cluster.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/stats.asciidoc",
- "line": 1346
- },
- "digest": "71c629c44bf3c542a0daacbfc253c4b0",
- "lang": "console",
- "found": [],
- "source": "GET /_cluster/stats/nodes/node1,node*,master:false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_cluster/stats/nodes/node1,node*,master:false",
- "query": null,
- "body": null,
- "params": {
- "node_id": "node1,node*,master:false"
- },
- "api": "cluster.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 62
- },
- "digest": "37f4bd6dd220db648998fc340b3dfa69",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"persistent\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"50mb\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "indices.recovery.max_bytes_per_sec": "50mb"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 75
- },
- "digest": "8c05281b724106e703c05df661188c4f",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings?flat_settings=true\n{\n \"transient\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"20mb\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": {
- "flat_settings": "true"
- },
- "body": {
- "transient": {
- "indices.recovery.max_bytes_per_sec": "20mb"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 89
- },
- "digest": "dc16ba440e7be92b884ab4e06cba00c2",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"persistent\" : { },\n \"transient\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"20mb\"\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 104
- },
- "digest": "1f25c9ef11f574f1ba0ad974bf653cd4",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"transient\" : {\n \"indices.recovery.max_bytes_per_sec\" : null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.recovery.max_bytes_per_sec": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 117
- },
- "digest": "5146a52d0e9cb82665c29ad890df6ead",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"persistent\" : {},\n \"transient\" : {}\n}"
- },
- {
- "source_location": {
- "file": "cluster/update-settings.asciidoc",
- "line": 131
- },
- "digest": "32496570a397852bece96f4da5d17a7e",
- "lang": "console",
- "found": [],
- "source": "PUT /_cluster/settings\n{\n \"transient\" : {\n \"indices.recovery.*\" : null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "indices.recovery.*": null
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-usage.asciidoc",
- "line": 61
- },
- "digest": "3d6a56dd3d93ece0e3da3fb66b4696d3",
- "lang": "console",
- "found": [],
- "source": "GET _nodes/usage",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/usage",
- "query": null,
- "body": null,
- "params": null,
- "api": "nodes.usage"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-usage.asciidoc",
- "line": 69
- },
- "digest": "187cc2082eeaa32d13363bd6cb39a923",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_nodes\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"cluster_name\": \"my_cluster\",\n \"nodes\": {\n \"pQHNt5rXTTWNvUgOrdynKg\": {\n \"timestamp\": 1492553961812, <1>\n \"since\": 1492553906606, <2>\n \"rest_actions\": {\n \"nodes_usage_action\": 1,\n \"create_index_action\": 1,\n \"document_get_action\": 1,\n \"search_action\": 19, <3>\n \"nodes_info_action\": 36\n },\n \"aggregations\": {\n ...\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/nodes-hot-threads.asciidoc",
- "line": 64
- },
- "digest": "77c099c97ea6911e2dd6e996da7dcca0",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/hot_threads\nGET /_nodes/nodeId1,nodeId2/hot_threads",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/hot_threads",
- "query": null,
- "body": null,
- "params": null,
- "api": "nodes.hot_threads"
- },
- {
- "method": "GET",
- "url": "/_nodes/nodeId1,nodeId2/hot_threads",
- "query": null,
- "body": null,
- "params": {
- "node_id": "nodeId1,nodeId2"
- },
- "api": "nodes.hot_threads"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 165
- },
- "digest": "3c4d7ef8422d2db423a8f23effcddaa1",
- "lang": "console",
- "found": [],
- "source": "# return just process\nGET /_nodes/process\n\n# same as above\nGET /_nodes/_all/process\n\n# return just jvm and process of only nodeId1 and nodeId2\nGET /_nodes/nodeId1,nodeId2/jvm,process\n\n# same as above\nGET /_nodes/nodeId1,nodeId2/info/jvm,process\n\n# return all the information of only nodeId1 and nodeId2\nGET /_nodes/nodeId1,nodeId2/_all",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/process",
- "query": null,
- "body": null,
- "params": {
- "node_id": "process"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/_all/process",
- "query": null,
- "body": null,
- "params": {
- "node_id": "_all",
- "metric": "process"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/nodeId1,nodeId2/jvm,process",
- "query": null,
- "body": null,
- "params": {
- "node_id": "nodeId1,nodeId2",
- "metric": "jvm,process"
- },
- "api": "nodes.info"
- },
- {
- "method": "GET",
- "url": "/_nodes/nodeId1,nodeId2/_all",
- "query": null,
- "body": null,
- "params": {
- "node_id": "nodeId1,nodeId2",
- "metric": "_all"
- },
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 192
- },
- "digest": "68b64313bf89ec3f2c645da61999dbb4",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/plugins",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/plugins",
- "query": null,
- "body": null,
- "params": {
- "node_id": "plugins"
- },
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 200
- },
- "digest": "482734cbb2bea52b69e21cc779b00dcd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_nodes\": ...\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"build_flavor\": \"{build_flavor}\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [\n \"master\",\n \"data\",\n \"ingest\"\n ],\n \"attributes\": {},\n \"plugins\": [\n {\n \"name\": \"analysis-icu\",\n \"version\": \"{version}\",\n \"description\": \"The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.\",\n \"classname\": \"org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin\",\n \"has_native_controller\": false\n }\n ],\n \"modules\": [\n {\n \"name\": \"lang-painless\",\n \"version\": \"{version}\",\n \"description\": \"An easy, safe and fast scripting language for Elasticsearch\",\n \"classname\": \"org.elasticsearch.painless.PainlessPlugin\",\n \"has_native_controller\": false\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 263
- },
- "digest": "0c464965126cc09e6812716a145991d4",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/ingest",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/ingest",
- "query": null,
- "body": null,
- "params": {
- "node_id": "ingest"
- },
- "api": "nodes.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-info.asciidoc",
- "line": 271
- },
- "digest": "e5909bdf16ebbcdb6e4e7da443ad367a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_nodes\": ...\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"build_flavor\": \"{build_flavor}\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [],\n \"attributes\": {},\n \"ingest\": {\n \"processors\": [\n {\n \"type\": \"date\"\n },\n {\n \"type\": \"uppercase\"\n },\n {\n \"type\": \"set\"\n },\n {\n \"type\": \"lowercase\"\n },\n {\n \"type\": \"gsub\"\n },\n {\n \"type\": \"convert\"\n },\n {\n \"type\": \"remove\"\n },\n {\n \"type\": \"fail\"\n },\n {\n \"type\": \"foreach\"\n },\n {\n \"type\": \"split\"\n },\n {\n \"type\": \"trim\"\n },\n {\n \"type\": \"rename\"\n },\n {\n \"type\": \"join\"\n },\n {\n \"type\": \"append\"\n }\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/nodes-reload-secure-settings.asciidoc",
- "line": 57
- },
- "digest": "a28811aa25e10cfc38fe593c1615e1a1",
- "lang": "console",
- "found": [],
- "source": "POST _nodes/reload_secure_settings\n{\n \"secure_settings_password\":\"s3cr3t\"\n}\nPOST _nodes/nodeId1,nodeId2/reload_secure_settings\n{\n \"secure_settings_password\":\"s3cr3t\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_nodes/reload_secure_settings",
- "query": null,
- "body": {
- "secure_settings_password": "s3cr3t"
- },
- "params": null,
- "api": "nodes.reload_secure_settings"
- },
- {
- "method": "POST",
- "url": "/_nodes/nodeId1,nodeId2/reload_secure_settings",
- "query": null,
- "body": {
- "secure_settings_password": "s3cr3t"
- },
- "params": {
- "node_id": "nodeId1,nodeId2"
- },
- "api": "nodes.reload_secure_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-reload-secure-settings.asciidoc",
- "line": 76
- },
- "digest": "f141b94c4b48dc62c67cffc121320a8d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_nodes\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"cluster_name\": \"my_cluster\",\n \"nodes\": {\n \"pQHNt5rXTTWNvUgOrdynKg\": {\n \"name\": \"node-0\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 2152
- },
- "digest": "5457c94f0039c6b95c7f9f305d0c6b58",
- "lang": "console",
- "found": [],
- "source": "# return just indices\nGET /_nodes/stats/indices\n\n# return just os and process\nGET /_nodes/stats/os,process\n\n# return just process for node with IP address 10.0.0.1\nGET /_nodes/10.0.0.1/stats/process",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/indices",
- "query": null,
- "body": null,
- "params": {
- "metric": "indices"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/os,process",
- "query": null,
- "body": null,
- "params": {
- "metric": "os,process"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/10.0.0.1/stats/process",
- "query": null,
- "body": null,
- "params": {
- "node_id": "10.0.0.1",
- "metric": "process"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 2170
- },
- "digest": "150b5fee5678bf8cdf0932da73eada80",
- "lang": "console",
- "found": [],
- "source": "# Fielddata summarized by node\nGET /_nodes/stats/indices/fielddata?fields=field1,field2\n\n# Fielddata summarized by node and index\nGET /_nodes/stats/indices/fielddata?level=indices&fields=field1,field2\n\n# Fielddata summarized by node, index, and shard\nGET /_nodes/stats/indices/fielddata?level=shards&fields=field1,field2\n\n# You can use wildcards for field names\nGET /_nodes/stats/indices/fielddata?fields=field*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "fields": "field1,field2"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "level": "indices",
- "fields": "field1,field2"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "level": "shards",
- "fields": "field1,field2"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/fielddata",
- "query": {
- "fields": "field*"
- },
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "fielddata"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 2188
- },
- "digest": "bd68666ca2e0be12f7624016317a62bc",
- "lang": "console",
- "found": [],
- "source": "# All groups with all stats\nGET /_nodes/stats?groups=_all\n\n# Some groups from just the indices stats\nGET /_nodes/stats/indices?groups=foo,bar",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats",
- "query": {
- "groups": "_all"
- },
- "body": null,
- "params": null,
- "api": "nodes.stats"
- },
- {
- "method": "GET",
- "url": "/_nodes/stats/indices",
- "query": {
- "groups": "foo,bar"
- },
- "body": null,
- "params": {
- "metric": "indices"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 2204
- },
- "digest": "09769561f082b50558fb7d8707719963",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/stats/ingest?filter_path=nodes.*.ingest",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/ingest",
- "query": {
- "filter_path": "nodes.*.ingest"
- },
- "body": null,
- "params": {
- "metric": "ingest"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 2212
- },
- "digest": "ef9c29759459904fef162acd223462c4",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/stats?metric=ingest&filter_path=nodes.*.ingest",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats",
- "query": {
- "metric": "ingest",
- "filter_path": "nodes.*.ingest"
- },
- "body": null,
- "params": null,
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/nodes-stats.asciidoc",
- "line": 2220
- },
- "digest": "f160561efab38e40c2feebf5a2542ab5",
- "lang": "console",
- "found": [],
- "source": "GET /_nodes/stats?metric=ingest&filter_path=nodes.*.ingest.pipelines",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats",
- "query": {
- "metric": "ingest",
- "filter_path": "nodes.*.ingest.pipelines"
- },
- "body": null,
- "params": null,
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 64
- },
- "digest": "166bcfc6d5d39defec7ad6aa44d0914b",
- "lang": "console",
- "found": [],
- "source": "GET _tasks <1>\nGET _tasks?nodes=nodeId1,nodeId2 <2>\nGET _tasks?nodes=nodeId1,nodeId2&actions=cluster:* <3>",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": null,
- "body": null,
- "params": null,
- "api": "tasks.list"
- },
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "nodes": "nodeId1,nodeId2"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- },
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "nodes": "nodeId1,nodeId2",
- "actions": "cluster:*"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 78
- },
- "digest": "7c407f3a8d5cb690829b8fa58bb8fd42",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\" : {\n \"oTUltX4IQMOUUVeiohTt8A\" : {\n \"name\" : \"H5dfFeA\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"tasks\" : {\n \"oTUltX4IQMOUUVeiohTt8A:124\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 124,\n \"type\" : \"direct\",\n \"action\" : \"cluster:monitor/tasks/lists[n]\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 47402,\n \"cancellable\" : false,\n \"parent_task_id\" : \"oTUltX4IQMOUUVeiohTt8A:123\"\n },\n \"oTUltX4IQMOUUVeiohTt8A:123\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 123,\n \"type\" : \"transport\",\n \"action\" : \"cluster:monitor/tasks/lists\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 236042,\n \"cancellable\" : false\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 118
- },
- "digest": "33610800d9de3c3e6d6b3c611ace7330",
- "lang": "console",
- "found": [],
- "source": "GET _tasks/oTUltX4IQMOUUVeiohTt8A:124",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks/oTUltX4IQMOUUVeiohTt8A:124",
- "query": null,
- "body": null,
- "params": {
- "task_id": "oTUltX4IQMOUUVeiohTt8A:124"
- },
- "api": "tasks.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 128
- },
- "digest": "29824032d7d64512d17458fdd687b1f6",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?parent_task_id=oTUltX4IQMOUUVeiohTt8A:123",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "parent_task_id": "oTUltX4IQMOUUVeiohTt8A:123"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 143
- },
- "digest": "8f4a7f68f2ca3698abdf20026a2d8c5f",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?actions=*search&detailed",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "actions": "*search",
- "detailed": true
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 151
- },
- "digest": "0a733828e712d5dc3c1f9591ebbb843e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\" : {\n \"oTUltX4IQMOUUVeiohTt8A\" : {\n \"name\" : \"H5dfFeA\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"tasks\" : {\n \"oTUltX4IQMOUUVeiohTt8A:464\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 464,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/read/search\",\n \"description\" : \"indices[test], types[test], search_type[QUERY_THEN_FETCH], source[{\\\"query\\\":...}]\",\n \"start_time_in_millis\" : 1483478610008,\n \"running_time_in_nanos\" : 13991383,\n \"cancellable\" : true\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 206
- },
- "digest": "93fb59d3204f37af952198b331fb6bb7",
- "lang": "console",
- "found": [],
- "source": "GET _tasks/oTUltX4IQMOUUVeiohTt8A:12345?wait_for_completion=true&timeout=10s",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks/oTUltX4IQMOUUVeiohTt8A:12345",
- "query": {
- "wait_for_completion": "true",
- "timeout": "10s"
- },
- "body": null,
- "params": {
- "task_id": "oTUltX4IQMOUUVeiohTt8A:12345"
- },
- "api": "tasks.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 215
- },
- "digest": "77447e2966708e92f5e219d43ac3f00d",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?actions=*reindex&wait_for_completion=true&timeout=10s",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "actions": "*reindex",
- "wait_for_completion": "true",
- "timeout": "10s"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 226
- },
- "digest": "d89d36741d906a71eca6c144e8d83889",
- "lang": "console",
- "found": [],
- "source": "POST _tasks/oTUltX4IQMOUUVeiohTt8A:12345/_cancel",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_tasks/oTUltX4IQMOUUVeiohTt8A:12345/_cancel",
- "query": null,
- "body": null,
- "params": {
- "task_id": "oTUltX4IQMOUUVeiohTt8A:12345"
- },
- "api": "tasks.cancel"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 241
- },
- "digest": "612c2e975f833de9815651135735eae5",
- "lang": "console",
- "found": [],
- "source": "POST _tasks/_cancel?nodes=nodeId1,nodeId2&actions=*reindex",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_tasks/_cancel",
- "query": {
- "nodes": "nodeId1,nodeId2",
- "actions": "*reindex"
- },
- "body": null,
- "params": null,
- "api": "tasks.cancel"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 252
- },
- "digest": "bd3d710ec50a151453e141691163af72",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?group_by=parents",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "group_by": "parents"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/tasks.asciidoc",
- "line": 259
- },
- "digest": "a3ce0cfe2176f3d8a36959a5916995f0",
- "lang": "console",
- "found": [],
- "source": "GET _tasks?group_by=none",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "group_by": "none"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "cluster/voting-exclusions.asciidoc",
- "line": 81
- },
- "digest": "f6ead39c5505045543b9225deca7367d",
- "lang": "console",
- "found": [],
- "source": "POST /_cluster/voting_config_exclusions?node_names=nodeName1,nodeName2",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "cluster/voting-exclusions.asciidoc",
- "line": 88
- },
- "digest": "25cb9e1da00dfd971065ce182467434d",
- "lang": "console",
- "found": [],
- "source": "DELETE /_cluster/voting_config_exclusions",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/get-ccr-stats.asciidoc",
- "line": 37
- },
- "digest": "9b30a69fec54cf01f7af1b04a6e15239",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ccr/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "ccr.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/get-ccr-stats.asciidoc",
- "line": 96
- },
- "digest": "9b30a69fec54cf01f7af1b04a6e15239",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ccr/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "ccr.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/get-ccr-stats.asciidoc",
- "line": 103
- },
- "digest": "fb4b67c046594eb08c912e9fbc63753a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"auto_follow_stats\" : {\n \"number_of_failed_follow_indices\" : 0,\n \"number_of_failed_remote_cluster_state_requests\" : 0,\n \"number_of_successful_follow_indices\" : 1,\n \"recent_auto_follow_errors\" : [],\n \"auto_followed_clusters\" : []\n },\n \"follow_stats\" : {\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/put-follow.asciidoc",
- "line": 25
- },
- "digest": "73646c12ad33a813ab2280f1dc83500e",
- "lang": "console",
- "found": [],
- "source": "PUT //_ccr/follow?wait_for_active_shards=1\n{\n \"remote_cluster\" : \"\",\n \"leader_index\" : \"\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow-request-body.asciidoc",
- "line": 84
- },
- "digest": "bb5221ac311cc0e719ab75895be81959",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follower_indices\" : [\n {\n \"parameters\" : {\n \"max_read_request_operation_count\" : 5120,\n \"max_read_request_size\" : \"32mb\",\n \"max_outstanding_read_requests\" : 12,\n \"max_write_request_operation_count\" : 5120,\n \"max_write_request_size\" : \"9223372036854775807b\",\n \"max_outstanding_write_requests\" : 9,\n \"max_write_buffer_count\" : 2147483647,\n \"max_write_buffer_size\" : \"512mb\",\n \"max_retry_delay\" : \"500ms\",\n \"read_poll_timeout\" : \"1m\"\n }\n }\n ]\n}\n"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/put-follow.asciidoc",
- "line": 88
- },
- "digest": "1b3762712c14a19e8c2956b4f530d327",
- "lang": "console",
- "found": [],
- "source": "PUT /follower_index/_ccr/follow?wait_for_active_shards=1\n{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/follower_index/_ccr/follow",
- "query": {
- "wait_for_active_shards": "1"
- },
- "body": {
- "remote_cluster": "remote_cluster",
- "leader_index": "leader_index",
- "settings": {
- "index.number_of_replicas": 0
- },
- "max_read_request_operation_count": 1024,
- "max_outstanding_read_requests": 16,
- "max_read_request_size": "1024k",
- "max_write_request_operation_count": 32768,
- "max_write_request_size": "16k",
- "max_outstanding_write_requests": 8,
- "max_write_buffer_count": 512,
- "max_write_buffer_size": "512k",
- "max_retry_delay": "10s",
- "read_poll_timeout": "30s"
- },
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/put-follow.asciidoc",
- "line": 113
- },
- "digest": "cd06634b8187698efa6a7990d3713297",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follow_index_created\" : true,\n \"follow_index_shards_acked\" : true,\n \"index_following_started\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-pause-follow.asciidoc",
- "line": 30
- },
- "digest": "483d669ec0768bc4e275a568c6164704",
- "lang": "console",
- "found": [],
- "source": "POST //_ccr/pause_follow",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-pause-follow.asciidoc",
- "line": 63
- },
- "digest": "d3263afc69b6f969b9bbd8738cd07b97",
- "lang": "console",
- "found": [],
- "source": "POST /follower_index/_ccr/pause_follow",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/follower_index/_ccr/pause_follow",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.pause_follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-pause-follow.asciidoc",
- "line": 71
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-resume-follow.asciidoc",
- "line": 38
- },
- "digest": "109db8ff7b715aca98de8ef1ab7e44ab",
- "lang": "console",
- "found": [],
- "source": "POST //_ccr/resume_follow\n{\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow-request-body.asciidoc",
- "line": 84
- },
- "digest": "bb5221ac311cc0e719ab75895be81959",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follower_indices\" : [\n {\n \"parameters\" : {\n \"max_read_request_operation_count\" : 5120,\n \"max_read_request_size\" : \"32mb\",\n \"max_outstanding_read_requests\" : 12,\n \"max_write_request_operation_count\" : 5120,\n \"max_write_request_size\" : \"9223372036854775807b\",\n \"max_outstanding_write_requests\" : 9,\n \"max_write_buffer_count\" : 2147483647,\n \"max_write_buffer_size\" : \"512mb\",\n \"max_retry_delay\" : \"500ms\",\n \"read_poll_timeout\" : \"1m\"\n }\n }\n ]\n}\n"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-resume-follow.asciidoc",
- "line": 80
- },
- "digest": "824fded1f9db28906ae7e85ae8de9bd0",
- "lang": "console",
- "found": [],
- "source": "POST /follower_index/_ccr/resume_follow\n{\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/follower_index/_ccr/resume_follow",
- "query": null,
- "body": {
- "max_read_request_operation_count": 1024,
- "max_outstanding_read_requests": 16,
- "max_read_request_size": "1024k",
- "max_write_request_operation_count": 32768,
- "max_write_request_size": "16k",
- "max_outstanding_write_requests": 8,
- "max_write_buffer_count": 512,
- "max_write_buffer_size": "512k",
- "max_retry_delay": "10s",
- "read_poll_timeout": "30s"
- },
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.resume_follow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-resume-follow.asciidoc",
- "line": 99
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-unfollow.asciidoc",
- "line": 34
- },
- "digest": "f6d493650b4344f17297b568016fb445",
- "lang": "console",
- "found": [],
- "source": "POST //_ccr/unfollow",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-unfollow.asciidoc",
- "line": 70
- },
- "digest": "6a350a17701e8c8158407191f2718b66",
- "lang": "console",
- "found": [],
- "source": "POST /follower_index/_ccr/unfollow",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/follower_index/_ccr/unfollow",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.unfollow"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-unfollow.asciidoc",
- "line": 78
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-forget-follower.asciidoc",
- "line": 36
- },
- "digest": "f4fdfe52ecba65eec6beb30d8deb8bbf",
- "lang": "console",
- "found": [],
- "source": "POST //_ccr/forget_follower\n{\n \"follower_cluster\" : \"\",\n \"follower_index\" : \"\",\n \"follower_index_uuid\" : \"\",\n \"leader_remote_cluster\" : \"\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-forget-follower.asciidoc",
- "line": 53
- },
- "digest": "8e4318a6e2029efb28ad4cf97bbb5b95",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0,\n \"failures\" : [ ]\n }\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-forget-follower.asciidoc",
- "line": 128
- },
- "digest": "07c07f6d497b1a3012aa4320f830e09e",
- "lang": "console",
- "found": [],
- "source": "POST /leader_index/_ccr/forget_follower\n{\n \"follower_cluster\" : \"follower_cluster\",\n \"follower_index\" : \"follower_index\",\n \"follower_index_uuid\" : \"vYpnaWPRQB6mNspmoCeYyA\",\n \"leader_remote_cluster\" : \"leader_cluster\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/leader_index/_ccr/forget_follower",
- "query": null,
- "body": {
- "follower_cluster": "follower_cluster",
- "follower_index": "follower_index",
- "follower_index_uuid": "vYpnaWPRQB6mNspmoCeYyA",
- "leader_remote_cluster": "leader_cluster"
- },
- "params": {
- "index": "leader_index"
- },
- "api": "ccr.forget_follower"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/post-forget-follower.asciidoc",
- "line": 142
- },
- "digest": "8e4318a6e2029efb28ad4cf97bbb5b95",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0,\n \"failures\" : [ ]\n }\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-stats.asciidoc",
- "line": 36
- },
- "digest": "020c95db88ef356093f03be84893ddf9",
- "lang": "console",
- "found": [],
- "source": "GET //_ccr/stats",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-stats.asciidoc",
- "line": 211
- },
- "digest": "8e43bb5b7946143e69d397bb81d87df0",
- "lang": "console",
- "found": [],
- "source": "GET /follower_index/_ccr/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/follower_index/_ccr/stats",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.follow_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-stats.asciidoc",
- "line": 218
- },
- "digest": "929930456e2cdaafd5d24e98a6d2aab8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-info.asciidoc",
- "line": 29
- },
- "digest": "b2440b492149b705ef107137fdccb0c2",
- "lang": "console",
- "found": [],
- "source": "GET //_ccr/info",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-info.asciidoc",
- "line": 139
- },
- "digest": "a520168c1c8b454a8f102d6a13027c73",
- "lang": "console",
- "found": [],
- "source": "GET /follower_index/_ccr/info",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/follower_index/_ccr/info",
- "query": null,
- "body": null,
- "params": {
- "index": "follower_index"
- },
- "api": "ccr.follow_info"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-info.asciidoc",
- "line": 146
- },
- "digest": "2dd7951c1ced23534433c91f48d87fda",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follower_indices\" : [\n {\n \"follower_index\" : \"follower_index\",\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"status\" : \"active\",\n \"parameters\" : {\n \"max_read_request_operation_count\" : 5120,\n \"max_read_request_size\" : \"32mb\",\n \"max_outstanding_read_requests\" : 12,\n \"max_write_request_operation_count\" : 5120,\n \"max_write_request_size\" : \"9223372036854775807b\",\n \"max_outstanding_write_requests\" : 9,\n \"max_write_buffer_count\" : 2147483647,\n \"max_write_buffer_size\" : \"512mb\",\n \"max_retry_delay\" : \"500ms\",\n \"read_poll_timeout\" : \"1m\"\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/follow/get-follow-info.asciidoc",
- "line": 188
- },
- "digest": "3cc9c9a1c98d969dd231f80030359407",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follower_indices\" : [\n {\n \"follower_index\" : \"follower_index\",\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"status\" : \"paused\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc",
- "line": 15
- },
- "digest": "6323012afc5d0421840d67cb8a0c4cb9",
- "lang": "console",
- "found": [],
- "source": "PUT /_ccr/auto_follow/\n{\n \"remote_cluster\" : \"\",\n \"leader_index_patterns\" :\n [\n \"\"\n ],\n \"follow_index_pattern\" : \"\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/follow-request-body.asciidoc",
- "line": 84
- },
- "digest": "bb5221ac311cc0e719ab75895be81959",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"follower_indices\" : [\n {\n \"parameters\" : {\n \"max_read_request_operation_count\" : 5120,\n \"max_read_request_size\" : \"32mb\",\n \"max_outstanding_read_requests\" : 12,\n \"max_write_request_operation_count\" : 5120,\n \"max_write_request_size\" : \"9223372036854775807b\",\n \"max_outstanding_write_requests\" : 9,\n \"max_write_buffer_count\" : 2147483647,\n \"max_write_buffer_size\" : \"512mb\",\n \"max_retry_delay\" : \"500ms\",\n \"read_poll_timeout\" : \"1m\"\n }\n }\n ]\n}\n"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc",
- "line": 88
- },
- "digest": "90c087560ea6c0b7405f710971c86ef0",
- "lang": "console",
- "found": [],
- "source": "PUT /_ccr/auto_follow/my_auto_follow_pattern\n{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern",
- "query": null,
- "body": {
- "remote_cluster": "remote_cluster",
- "leader_index_patterns": [
- "leader_index*"
- ],
- "follow_index_pattern": "{{leader_index}}-follower",
- "settings": {
- "index.number_of_replicas": 0
- },
- "max_read_request_operation_count": 1024,
- "max_outstanding_read_requests": 16,
- "max_read_request_size": "1024k",
- "max_write_request_operation_count": 32768,
- "max_write_request_size": "16k",
- "max_outstanding_write_requests": 8,
- "max_write_buffer_count": 512,
- "max_write_buffer_size": "512k",
- "max_retry_delay": "10s",
- "read_poll_timeout": "30s"
- },
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.put_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc",
- "line": 117
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc",
- "line": 34
- },
- "digest": "2f2580ea420e1836d922fe48fa8ada97",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ccr/auto_follow/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc",
- "line": 66
- },
- "digest": "d4ef6ac034c4d42cb75d830ec69146e6",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ccr/auto_follow/my_auto_follow_pattern",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern",
- "query": null,
- "body": null,
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.delete_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc",
- "line": 74
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc",
- "line": 41
- },
- "digest": "5e124875d97c27362ae858160ae1c6d5",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/auto_follow/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ccr/auto_follow/",
- "query": null,
- "body": null,
- "params": null,
- "api": "ccr.get_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc",
- "line": 46
- },
- "digest": "d56a9d89282df56adbbc34b91390ac17",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/auto_follow/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc",
- "line": 79
- },
- "digest": "79f33e05b203eb46eef7958fbc95ef77",
- "lang": "console",
- "found": [],
- "source": "GET /_ccr/auto_follow/my_auto_follow_pattern",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern",
- "query": null,
- "body": null,
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.get_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc",
- "line": 87
- },
- "digest": "e1bbe4bf5745d01075cde98e03781daa",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"patterns\": [\n {\n \"name\": \"my_auto_follow_pattern\",\n \"pattern\": {\n \"active\": true,\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\"\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/pause-auto-follow-pattern.asciidoc",
- "line": 76
- },
- "digest": "b25256ed615cd837461b0bfa590526b7",
- "lang": "console",
- "found": [],
- "source": "POST /_ccr/auto_follow/my_auto_follow_pattern/pause",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern/pause",
- "query": null,
- "body": null,
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.pause_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/pause-auto-follow-pattern.asciidoc",
- "line": 84
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/resume-auto-follow-pattern.asciidoc",
- "line": 77
- },
- "digest": "f2e854b6c99659ccc1824e86c096e433",
- "lang": "console",
- "found": [],
- "source": "POST /_ccr/auto_follow/my_auto_follow_pattern/resume",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ccr/auto_follow/my_auto_follow_pattern/resume",
- "query": null,
- "body": null,
- "params": {
- "name": "my_auto_follow_pattern"
- },
- "api": "ccr.resume_auto_follow_pattern"
- }
- ]
- },
- {
- "source_location": {
- "file": "ccr/apis/auto-follow/resume-auto-follow-pattern.asciidoc",
- "line": 85
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "indices/create-data-stream.asciidoc",
- "line": 34
- },
- "digest": "e51a86b666f447cda5f634547a8e1a4a",
- "lang": "console",
- "found": [],
- "source": "PUT /_data_stream/my-data-stream",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_data_stream/my-data-stream",
- "query": null,
- "body": null,
- "params": {
- "name": "my-data-stream"
- },
- "api": "indices.create_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/delete-data-stream.asciidoc",
- "line": 35
- },
- "digest": "f823e4b87ed181b27f73ebc51351f0ee",
- "lang": "console",
- "found": [],
- "source": "DELETE /_data_stream/my-data-stream",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_data_stream/my-data-stream",
- "query": null,
- "body": null,
- "params": {
- "name": "my-data-stream"
- },
- "api": "indices.delete_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-data-stream.asciidoc",
- "line": 73
- },
- "digest": "3337c817ebd438254505a31e91c91724",
- "lang": "console",
- "found": [],
- "source": "GET /_data_stream/my-data-stream",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_data_stream/my-data-stream",
- "query": null,
- "body": null,
- "params": {
- "name": "my-data-stream"
- },
- "api": "indices.get_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-data-stream.asciidoc",
- "line": 192
- },
- "digest": "200f6d4cc7b9c300b8962a119e03873f",
- "lang": "console",
- "found": [],
- "source": "GET _data_stream/my-data-stream*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_data_stream/my-data-stream*",
- "query": null,
- "body": null,
- "params": {
- "name": "my-data-stream*"
- },
- "api": "indices.get_data_stream"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-data-stream.asciidoc",
- "line": 199
- },
- "digest": "ae908a0e47caa747b9bd7449cae05dae",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-my-data-stream-000001\",\n \"index_uuid\": \"xCEhwsp8Tey0-FLNFYVwSg\"\n },\n {\n \"index_name\": \".ds-my-data-stream-000002\",\n \"index_uuid\": \"PA_JquKGSiKcAKBA8DJ5gw\"\n }\n ],\n \"generation\": 2,\n \"status\": \"GREEN\",\n \"template\": \"my-index-template\",\n \"ilm_policy\": \"my-lifecycle-policy\"\n },\n {\n \"name\": \"my-data-stream_two\",\n \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n \"index_name\": \".ds-my-data-stream_two-000001\",\n \"index_uuid\": \"3liBu2SYS5axasRt6fUIpA\"\n }\n ],\n \"generation\": 1,\n \"status\": \"YELLOW\",\n \"template\": \"my-index-template\",\n \"ilm_policy\": \"my-lifecycle-policy\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 188
- },
- "digest": "804a97ff4d0613e6568e4efb19c52021",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT _cluster/settings\n{\n \"persistent\": {\n \"action.auto_create_index\": \"twitter,index10,-index1*,+ind*\" <1>\n }\n}\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"action.auto_create_index\": \"false\" <2>\n }\n}\n\nPUT _cluster/settings\n{\n \"persistent\": {\n \"action.auto_create_index\": \"true\" <3>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "action.auto_create_index": "twitter,index10,-index1*,+ind*"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "action.auto_create_index": "false"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- },
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "persistent": {
- "action.auto_create_index": "true"
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 237
- },
- "digest": "36818c6d9f434d387819c30bd9addb14",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_doc/\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_doc/",
- "query": null,
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 249
- },
- "digest": "cf4bd4b0685ba57d9d3bd992ae242729",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"failed\" : 0,\n \"successful\" : 2\n },\n \"_index\" : \"twitter\",\n \"_id\" : \"W0tpsmIBdwcYyG50zbta\",\n \"_version\" : 1,\n \"_seq_no\" : 0,\n \"_primary_term\" : 1,\n \"result\": \"created\"\n}"
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 286
- },
- "digest": "625dc94df1f9affb49a082fd99d41620",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_doc?routing=kimchy\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_doc",
- "query": {
- "routing": "kimchy"
- },
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 411
- },
- "digest": "b918d6b798da673a33e49b94f61dcdc0",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/1?timeout=5m\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": {
- "timeout": "5m"
- },
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 440
- },
- "digest": "1f336ecc62480c1d56351cc2f82d0d08",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/1?version=2&version_type=external\n{\n \"message\" : \"elasticsearch now has versioning support, double cool!\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": {
- "version": "2",
- "version_type": "external"
- },
- "body": {
- "message": "elasticsearch now has versioning support, double cool!"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 498
- },
- "digest": "bb143628fd04070683eeeadc9406d9cc",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/1\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": null,
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 510
- },
- "digest": "b4e59c6b501e37f61c4af444d93c4625",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"failed\" : 0,\n \"successful\" : 2\n },\n \"_index\" : \"twitter\",\n \"_id\" : \"1\",\n \"_version\" : 1,\n \"_seq_no\" : 0,\n \"_primary_term\" : 1,\n \"result\" : \"created\"\n}"
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 531
- },
- "digest": "048d8abd42d094bbdcf4452a58ccb35b",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_create/1\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_create/1",
- "query": null,
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "create"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/index_.asciidoc",
- "line": 544
- },
- "digest": "d718b63cf1b6591a1d59a0cf4fd995eb",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/1?op_type=create\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": {
- "op_type": "create"
- },
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 10
- },
- "digest": "fbcf5078a6a9e09790553804054c36b3",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_doc/0",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 53
- },
- "digest": "138ccd89f72aa7502dd9578403dcc589",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_doc/0?_source=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": {
- "_source": "false"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 65
- },
- "digest": "8fdf2344c4fb3de6902ad7c5735270df",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_doc/0?_source_includes=*.id&_source_excludes=entities",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": {
- "_source_includes": "*.id",
- "_source_excludes": "entities"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 73
- },
- "digest": "745f9b8cdb8e91073f6e520e1d9f8c05",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_doc/0?_source=*.id,retweeted",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": {
- "_source": "*.id,retweeted"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 86
- },
- "digest": "1d65cb6d055c46a1bde809687d835b71",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_doc/2?routing=user1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/2",
- "query": {
- "routing": "user1"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "2"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 224
- },
- "digest": "fbcf5078a6a9e09790553804054c36b3",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_doc/0",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/0",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 232
- },
- "digest": "5f6e080e8c400de205ea04bd19d215a3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"twitter\",\n \"_id\" : \"0\",\n \"_version\" : 1,\n \"_seq_no\" : 10,\n \"_primary_term\" : 1,\n \"found\": true,\n \"_source\" : {\n \"user\" : \"kimchy\",\n \"date\" : \"2009-11-15T14:12:12\",\n \"likes\": 0,\n \"message\" : \"trying out Elasticsearch\"\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 253
- },
- "digest": "98234499cfec70487cec5d013e976a84",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "HEAD twitter/_doc/0",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/twitter/_doc/0",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "exists"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 269
- },
- "digest": "89a8ac1509936acc272fc2d72907bc45",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_source/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_source/1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "get_source"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 278
- },
- "digest": "d222c6a6ec7a3beca6c97011b0874512",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_source/1/?_source_includes=*.id&_source_excludes=entities",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_source/1/",
- "query": {
- "_source_includes": "*.id",
- "_source_excludes": "entities"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "get_source"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 288
- },
- "digest": "2468ab381257d759d8a88af1141f6f9c",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "HEAD twitter/_source/1",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/twitter/_source/1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "exists_source"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 302
- },
- "digest": "913770050ebbf3b9b549a899bc11060a",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter\n{\n \"mappings\": {\n \"properties\": {\n \"counter\": {\n \"type\": \"integer\",\n \"store\": false\n },\n \"tags\": {\n \"type\": \"keyword\",\n \"store\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "counter": {
- "type": "integer",
- "store": false
- },
- "tags": {
- "type": "keyword",
- "store": true
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 323
- },
- "digest": "5eabcdbf61bfcb484dc694f25c2bba36",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/1\n{\n \"counter\" : 1,\n \"tags\" : [\"red\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": null,
- "body": {
- "counter": 1,
- "tags": [
- "red"
- ]
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 335
- },
- "digest": "710c7871f20f176d51209b1574b0d61b",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_doc/1?stored_fields=tags,counter",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/1",
- "query": {
- "stored_fields": "tags,counter"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 343
- },
- "digest": "a515ae4a8553041c4f686412038e5978",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"twitter\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"_seq_no\" : 22,\n \"_primary_term\" : 1,\n \"found\": true,\n \"fields\": {\n \"tags\": [\n \"red\"\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 366
- },
- "digest": "0ba0b2db24852abccb7c0fc1098d566e",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT twitter/_doc/2?routing=user1\n{\n \"counter\" : 1,\n \"tags\" : [\"white\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/2",
- "query": {
- "routing": "user1"
- },
- "body": {
- "counter": 1,
- "tags": [
- "white"
- ]
- },
- "params": {
- "index": "twitter",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 376
- },
- "digest": "69a7be47f85138b10437113ab2f0d72d",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET twitter/_doc/2?routing=user1&stored_fields=tags,counter",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_doc/2",
- "query": {
- "routing": "user1",
- "stored_fields": "tags,counter"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "2"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/get.asciidoc",
- "line": 384
- },
- "digest": "80e8af862b4eeb6eb3f0afd38f6bc60a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"twitter\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"_seq_no\" : 13,\n \"_primary_term\" : 1,\n \"_routing\": \"user1\",\n \"found\": true,\n \"fields\": {\n \"tags\": [\n \"white\"\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/delete.asciidoc",
- "line": 75
- },
- "digest": "47b5ff897f26e9c943cee5c06034181d",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "DELETE /twitter/_doc/1?routing=kimchy",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter/_doc/1",
- "query": {
- "routing": "kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete.asciidoc",
- "line": 131
- },
- "digest": "d90a84a24a407731dfc1929ac8327746",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "DELETE /twitter/_doc/1?timeout=5m",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter/_doc/1",
- "query": {
- "timeout": "5m"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete.asciidoc",
- "line": 172
- },
- "digest": "c5e5873783246c7b1c01d8464fed72c4",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "DELETE /twitter/_doc/1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete.asciidoc",
- "line": 180
- },
- "digest": "9f752f60ae8a1a4239e90abb2a268c83",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"failed\" : 0,\n \"successful\" : 2\n },\n \"_index\" : \"twitter\",\n \"_id\" : \"1\",\n \"_version\" : 2,\n \"_primary_term\": 1,\n \"_seq_no\": 5,\n \"result\": \"deleted\"\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 10
- },
- "digest": "ebb6b59fbc9325c17e45f524602d6be2",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /twitter/_delete_by_query\n{\n \"query\": {\n \"match\": {\n \"message\": \"some message\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "some message"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 269
- },
- "digest": "a24b5dac82c15039ba563caf3db32ce3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 147,\n \"timed_out\": false,\n \"total\": 119,\n \"deleted\": 119,\n \"batches\": 1,\n \"version_conflicts\": 0,\n \"noops\": 0,\n \"retries\": {\n \"bulk\": 0,\n \"search\": 0\n },\n \"throttled_millis\": 0,\n \"requests_per_second\": -1.0,\n \"throttled_until_millis\": 0,\n \"failures\" : [ ]\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 356
- },
- "digest": "e21e1c26dc8687e7bf7bd2bf019a6698",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_delete_by_query?conflicts=proceed\n{\n \"query\": {\n \"match_all\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": {
- "conflicts": "proceed"
- },
- "body": {
- "query": {
- "match_all": {}
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 369
- },
- "digest": "c22b72c4a52ee098331b3f252c22860d",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /twitter,blog/_delete_by_query\n{\n \"query\": {\n \"match_all\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter,blog/_delete_by_query",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- }
- },
- "params": {
- "index": "twitter,blog"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 383
- },
- "digest": "c32a3f8071d87f0a3f5a78e07fe7a669",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_delete_by_query?routing=1\n{\n \"query\": {\n \"range\" : {\n \"age\" : {\n \"gte\" : 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": {
- "routing": "1"
- },
- "body": {
- "query": {
- "range": {
- "age": {
- "gte": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 401
- },
- "digest": "dfb1fe96d806a644214d06f9b4b87878",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_delete_by_query?scroll_size=5000\n{\n \"query\": {\n \"term\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": {
- "scroll_size": "5000"
- },
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 421
- },
- "digest": "1e49eba5b9042c1900a608fe5105ba43",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_delete_by_query\n{\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}\nPOST twitter/_delete_by_query\n{\n \"slice\": {\n \"id\": 1,\n \"max\": 2\n },\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": null,
- "body": {
- "slice": {
- "id": 0,
- "max": 2
- },
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- },
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": null,
- "body": {
- "slice": {
- "id": 1,
- "max": 2
- },
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 456
- },
- "digest": "3e573bfabe00f8bfb8bb69aa5820768e",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _refresh\nPOST twitter/_search?size=0&filter_path=hits.total\n{\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_refresh",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0",
- "filter_path": "hits.total"
- },
- "body": {
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 474
- },
- "digest": "8521cf9682eb1df34207da8ab5de12ad",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 494
- },
- "digest": "a5a7050fb9dcb9574e081957ade28617",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_delete_by_query?refresh&slices=5\n{\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_delete_by_query",
- "query": {
- "refresh": true,
- "slices": "5"
- },
- "body": {
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "delete_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 511
- },
- "digest": "14701dcc0cca9665fce2aace0cb62af7",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_search?size=0&filter_path=hits.total\n{\n \"query\": {\n \"range\": {\n \"likes\": {\n \"lt\": 10\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0",
- "filter_path": "hits.total"
- },
- "body": {
- "query": {
- "range": {
- "likes": {
- "lt": 10
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 528
- },
- "digest": "8521cf9682eb1df34207da8ab5de12ad",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 579
- },
- "digest": "52c7e4172a446c394210a07c464c57d2",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle",
- "query": {
- "requests_per_second": "-1"
- },
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "delete_by_query_rethrottle"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 593
- },
- "digest": "216848930c2d344fe0bed0daa70c35b9",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _tasks?detailed=true&actions=*/delete/byquery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "detailed": "true",
- "actions": "*/delete/byquery"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 601
- },
- "digest": "5c29776e201b54f7442ddb0438479741",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\" : {\n \"r1A2WoRbTwKZ516z6NEs5A\" : {\n \"name\" : \"r1A2WoR\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"attributes\" : {\n \"testattr\" : \"test\",\n \"portsfile\" : \"true\"\n },\n \"tasks\" : {\n \"r1A2WoRbTwKZ516z6NEs5A:36619\" : {\n \"node\" : \"r1A2WoRbTwKZ516z6NEs5A\",\n \"id\" : 36619,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/write/delete/byquery\",\n \"status\" : { <1>\n \"total\" : 6154,\n \"updated\" : 0,\n \"created\" : 0,\n \"deleted\" : 3500,\n \"batches\" : 36,\n \"version_conflicts\" : 0,\n \"noops\" : 0,\n \"retries\": 0,\n \"throttled_millis\": 0\n },\n \"description\" : \"\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 647
- },
- "digest": "be3a6431d01846950dc1a39a7a6a1faa",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_tasks/r1A2WoRbTwKZ516z6NEs5A:36619",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks/r1A2WoRbTwKZ516z6NEs5A:36619",
- "query": null,
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "tasks.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/delete-by-query.asciidoc",
- "line": 667
- },
- "digest": "18ddb7e7a4bcafd449df956e828ed7a8",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel",
- "query": null,
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "tasks.cancel"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 84
- },
- "digest": "381fced1882ca8337143e6bb180a5715",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT test/_doc/1\n{\n \"counter\" : 1,\n \"tags\" : [\"red\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": null,
- "body": {
- "counter": 1,
- "tags": [
- "red"
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 96
- },
- "digest": "96de5703ba0bd43fd4ac239ec5408542",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\" : {\n \"count\" : 4\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "ctx._source.counter += params.count",
- "lang": "painless",
- "params": {
- "count": 4
- }
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 114
- },
- "digest": "4cd246e5c4c035a2cd4081ae9a3d54e5",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"ctx._source.tags.add(params.tag)\",\n \"lang\": \"painless\",\n \"params\" : {\n \"tag\" : \"blue\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "ctx._source.tags.add(params.tag)",
- "lang": "painless",
- "params": {
- "tag": "blue"
- }
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 135
- },
- "digest": "ac544eb247a29ca42aab13826ca88561",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\",\n \"lang\": \"painless\",\n \"params\" : {\n \"tag\" : \"blue\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }",
- "lang": "painless",
- "params": {
- "tag": "blue"
- }
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 153
- },
- "digest": "eb30ba547e4a7b8f54f33ab259aca523",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : \"ctx._source.new_field = 'value_of_new_field'\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": "ctx._source.new_field = 'value_of_new_field'"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 164
- },
- "digest": "58df61acbfb15b8ef0aaa18b81ae98a6",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : \"ctx._source.remove('new_field')\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": "ctx._source.remove('new_field')"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 177
- },
- "digest": "98aeb275f829b5f7b8eb2147701565ff",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'none' }\",\n \"lang\": \"painless\",\n \"params\" : {\n \"tag\" : \"green\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'none' }",
- "lang": "painless",
- "params": {
- "tag": "green"
- }
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 198
- },
- "digest": "38c1d0f6668e9563c0827f839f9fa505",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"doc\" : {\n \"name\" : \"new_name\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "doc": {
- "name": "new_name"
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 218
- },
- "digest": "38c1d0f6668e9563c0827f839f9fa505",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"doc\" : {\n \"name\" : \"new_name\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "doc": {
- "name": "new_name"
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 232
- },
- "digest": "eded401dacfb0f3954ac7e65edcde530",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": {\n \"total\": 0,\n \"successful\": 0,\n \"failed\": 0\n },\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 7,\n \"_primary_term\": 1,\n \"_seq_no\": 6,\n \"result\": \"noop\"\n}"
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 251
- },
- "digest": "015294a400986295039e52ebc62033be",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"doc\" : {\n \"name\" : \"new_name\"\n },\n \"detect_noop\": false\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "doc": {
- "name": "new_name"
- },
- "detect_noop": false
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 271
- },
- "digest": "0a958e486ede3f519d48431ab689eded",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"script\" : {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\" : {\n \"count\" : 4\n }\n },\n \"upsert\" : {\n \"counter\" : 1\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "script": {
- "source": "ctx._source.counter += params.count",
- "lang": "painless",
- "params": {
- "count": 4
- }
- },
- "upsert": {
- "counter": 1
- }
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 296
- },
- "digest": "f9636d7ef1a45be4f36418c875cf6bef",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST sessions/_update/dh3sgudg8gsrgl\n{\n \"scripted_upsert\":true,\n \"script\" : {\n \"id\": \"my_web_session_summariser\",\n \"params\" : {\n \"pageViewEvent\" : {\n \"url\":\"foo.com/bar\",\n \"response\":404,\n \"time\":\"2014-01-01 12:32\"\n }\n }\n },\n \"upsert\" : {}\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sessions/_update/dh3sgudg8gsrgl",
- "query": null,
- "body": {
- "scripted_upsert": true,
- "script": {
- "id": "my_web_session_summariser",
- "params": {
- "pageViewEvent": {
- "url": "foo.com/bar",
- "response": 404,
- "time": "2014-01-01 12:32"
- }
- }
- },
- "upsert": {}
- },
- "params": {
- "index": "sessions",
- "id": "dh3sgudg8gsrgl"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update.asciidoc",
- "line": 325
- },
- "digest": "7cac05cb589f1614fd5b8589153bef06",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update/1\n{\n \"doc\" : {\n \"name\" : \"new_name\"\n },\n \"doc_as_upsert\" : true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update/1",
- "query": null,
- "body": {
- "doc": {
- "name": "new_name"
- },
- "doc_as_upsert": true
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "update"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 12
- },
- "digest": "a4a396cd07657b3977713fb3a742c41b",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_update_by_query?conflicts=proceed",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "conflicts": "proceed"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 307
- },
- "digest": "52a87b81e4e0b6b11e23e85db1602a63",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_update_by_query?conflicts=proceed\n{\n \"query\": { <1>\n \"term\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "conflicts": "proceed"
- },
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 326
- },
- "digest": "cde4dddae5c06e7f1d38c9d933dbc7ac",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter,blog/_update_by_query",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter,blog/_update_by_query",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter,blog"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 334
- },
- "digest": "d8b115341da772a628a024e7d1644e73",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_update_by_query?routing=1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "routing": "1"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 343
- },
- "digest": "54a770f053f3225ea0d1e34334232411",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_update_by_query?scroll_size=100",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "scroll_size": "100"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 355
- },
- "digest": "2fd69fb0538e4f36ac69a8b8f8bf5ae8",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_update_by_query\n{\n \"script\": {\n \"source\": \"ctx._source.likes++\",\n \"lang\": \"painless\"\n },\n \"query\": {\n \"term\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": null,
- "body": {
- "script": {
- "source": "ctx._source.likes++",
- "lang": "painless"
- },
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 396
- },
- "digest": "c4b278ba293abd0d02a0b5ad1a99f84a",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT _ingest/pipeline/set-foo\n{\n \"description\" : \"sets foo\",\n \"processors\" : [ {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"bar\"\n }\n } ]\n}\nPOST twitter/_update_by_query?pipeline=set-foo",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/set-foo",
- "query": null,
- "body": {
- "description": "sets foo",
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "bar"
- }
- }
- ]
- },
- "params": {
- "id": "set-foo"
- },
- "api": "ingest.put_pipeline"
- },
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "pipeline": "set-foo"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 420
- },
- "digest": "7df191cc7f814e410a4ac7261065e6ef",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _tasks?detailed=true&actions=*byquery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks",
- "query": {
- "detailed": "true",
- "actions": "*byquery"
- },
- "body": null,
- "params": null,
- "api": "tasks.list"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 428
- },
- "digest": "f1296279330128c256ce88082d1de1e0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\" : {\n \"r1A2WoRbTwKZ516z6NEs5A\" : {\n \"name\" : \"r1A2WoR\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"attributes\" : {\n \"testattr\" : \"test\",\n \"portsfile\" : \"true\"\n },\n \"tasks\" : {\n \"r1A2WoRbTwKZ516z6NEs5A:36619\" : {\n \"node\" : \"r1A2WoRbTwKZ516z6NEs5A\",\n \"id\" : 36619,\n \"type\" : \"transport\",\n \"action\" : \"indices:data/write/update/byquery\",\n \"status\" : { <1>\n \"total\" : 6154,\n \"updated\" : 3500,\n \"created\" : 0,\n \"deleted\" : 0,\n \"batches\" : 4,\n \"version_conflicts\" : 0,\n \"noops\" : 0,\n \"retries\": {\n \"bulk\": 0,\n \"search\": 0\n },\n \"throttled_millis\": 0\n },\n \"description\" : \"\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 478
- },
- "digest": "be3a6431d01846950dc1a39a7a6a1faa",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_tasks/r1A2WoRbTwKZ516z6NEs5A:36619",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_tasks/r1A2WoRbTwKZ516z6NEs5A:36619",
- "query": null,
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "tasks.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 498
- },
- "digest": "18ddb7e7a4bcafd449df956e828ed7a8",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel",
- "query": null,
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "tasks.cancel"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 517
- },
- "digest": "bdb30dd52d32f50994008f4f9c0da5f0",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _update_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_update_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle",
- "query": {
- "requests_per_second": "-1"
- },
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "update_by_query_rethrottle"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 537
- },
- "digest": "0d664883151008b1051ef2c9ab2d0373",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_update_by_query\n{\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}\nPOST twitter/_update_by_query\n{\n \"slice\": {\n \"id\": 1,\n \"max\": 2\n },\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": null,
- "body": {
- "slice": {
- "id": 0,
- "max": 2
- },
- "script": {
- "source": "ctx._source['extra'] = 'test'"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- },
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": null,
- "body": {
- "slice": {
- "id": 1,
- "max": 2
- },
- "script": {
- "source": "ctx._source['extra'] = 'test'"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 564
- },
- "digest": "4acf902c2598b2558f34f20c1744c433",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _refresh\nPOST twitter/_search?size=0&q=extra:test&filter_path=hits.total",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_refresh",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0",
- "q": "extra:test",
- "filter_path": "hits.total"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 573
- },
- "digest": "7792734b746340ee3771a7931f0ef7bd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\": {\n \"value\": 120,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 593
- },
- "digest": "ea02de2dbe05091fcb0dac72c8ba5f83",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_update_by_query?refresh&slices=5\n{\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_update_by_query",
- "query": {
- "refresh": true,
- "slices": "5"
- },
- "body": {
- "script": {
- "source": "ctx._source['extra'] = 'test'"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "update_by_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 606
- },
- "digest": "025b54db0edc50c24ea48a2bd94366ad",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_search?size=0&q=extra:test&filter_path=hits.total",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "size": "0",
- "q": "extra:test",
- "filter_path": "hits.total"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 614
- },
- "digest": "7792734b746340ee3771a7931f0ef7bd",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\": {\n \"value\": 120,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 662
- },
- "digest": "2fe28d9a91b3081a9ec4601af8fb7b1c",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT test\n{\n \"mappings\": {\n \"dynamic\": false, <1>\n \"properties\": {\n \"text\": {\"type\": \"text\"}\n }\n }\n}\n\nPOST test/_doc?refresh\n{\n \"text\": \"words words\",\n \"flag\": \"bar\"\n}\nPOST test/_doc?refresh\n{\n \"text\": \"words words\",\n \"flag\": \"foo\"\n}\nPUT test/_mapping <2>\n{\n \"properties\": {\n \"text\": {\"type\": \"text\"},\n \"flag\": {\"type\": \"text\", \"analyzer\": \"keyword\"}\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "dynamic": false,
- "properties": {
- "text": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/test/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "words words",
- "flag": "bar"
- },
- "params": {
- "index": "test"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_doc",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "words words",
- "flag": "foo"
- },
- "params": {
- "index": "test"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_mapping",
- "query": null,
- "body": {
- "properties": {
- "text": {
- "type": "text"
- },
- "flag": {
- "type": "text",
- "analyzer": "keyword"
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 700
- },
- "digest": "abd4fc3ce7784413a56fe2dcfe2809b5",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_search?filter_path=hits.total\n{\n \"query\": {\n \"match\": {\n \"flag\": \"foo\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": {
- "filter_path": "hits.total"
- },
- "body": {
- "query": {
- "match": {
- "flag": "foo"
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 713
- },
- "digest": "9c462a848a35c5bc6f82c3b55a80d56f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\" : {\n \"total\": {\n \"value\": 0,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 727
- },
- "digest": "97babc8d19ef0866774576716eb6d19e",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_update_by_query?refresh&conflicts=proceed\nPOST test/_search?filter_path=hits.total\n{\n \"query\": {\n \"match\": {\n \"flag\": \"foo\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_update_by_query",
- "query": {
- "refresh": true,
- "conflicts": "proceed"
- },
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "update_by_query"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": {
- "filter_path": "hits.total"
- },
- "body": {
- "query": {
- "match": {
- "flag": "foo"
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/update-by-query.asciidoc",
- "line": 741
- },
- "digest": "fd2e9d72fadf8ef650d0ab51ede61525",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\" : {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 10
- },
- "digest": "ccfaeef928ba7dd4b5de0c518151fd7c",
- "lang": "console",
- "found": [],
- "source": "GET /_mget\n{\n \"docs\" : [\n {\n \"_index\" : \"twitter\",\n \"_id\" : \"1\"\n },\n {\n \"_index\" : \"twitter\",\n \"_id\" : \"2\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_mget",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "twitter",
- "_id": "1"
- },
- {
- "_index": "twitter",
- "_id": "2"
- }
- ]
- },
- "params": null,
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 130
- },
- "digest": "53cf7d3731f50620b3277b80e2fbfd56",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_mget\n{\n \"docs\" : [\n {\n \"_id\" : \"1\"\n },\n {\n \"_id\" : \"2\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_mget",
- "query": null,
- "body": {
- "docs": [
- {
- "_id": "1"
- },
- {
- "_id": "2"
- }
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 148
- },
- "digest": "81095ba46e4d8c5da3623f5ea8c54a34",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_mget\n{\n \"ids\" : [\"1\", \"2\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_mget",
- "query": null,
- "body": {
- "ids": [
- "1",
- "2"
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 170
- },
- "digest": "6b1ab3f273c6e425067cd5889b0c258f",
- "lang": "console",
- "found": [],
- "source": "GET /_mget\n{\n \"docs\" : [\n {\n \"_index\" : \"test\",\n \"_id\" : \"1\",\n \"_source\" : false\n },\n {\n \"_index\" : \"test\",\n \"_id\" : \"2\",\n \"_source\" : [\"field3\", \"field4\"]\n },\n {\n \"_index\" : \"test\",\n \"_id\" : \"3\",\n \"_source\" : {\n \"include\": [\"user\"],\n \"exclude\": [\"user.location\"]\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_mget",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "test",
- "_id": "1",
- "_source": false
- },
- {
- "_index": "test",
- "_id": "2",
- "_source": [
- "field3",
- "field4"
- ]
- },
- {
- "_index": "test",
- "_id": "3",
- "_source": {
- "include": [
- "user"
- ],
- "exclude": [
- "user.location"
- ]
- }
- }
- ]
- },
- "params": null,
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 208
- },
- "digest": "c4272ba35b81125a805fb1a7292f3d25",
- "lang": "console",
- "found": [],
- "source": "GET /_mget\n{\n \"docs\" : [\n {\n \"_index\" : \"test\",\n \"_id\" : \"1\",\n \"stored_fields\" : [\"field1\", \"field2\"]\n },\n {\n \"_index\" : \"test\",\n \"_id\" : \"2\",\n \"stored_fields\" : [\"field3\", \"field4\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_mget",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "test",
- "_id": "1",
- "stored_fields": [
- "field1",
- "field2"
- ]
- },
- {
- "_index": "test",
- "_id": "2",
- "stored_fields": [
- "field3",
- "field4"
- ]
- }
- ]
- },
- "params": null,
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 231
- },
- "digest": "27fac828d28ab065524dd1ce148840c0",
- "lang": "console",
- "found": [],
- "source": "GET /test/_mget?stored_fields=field1,field2\n{\n \"docs\" : [\n {\n \"_id\" : \"1\"\n },\n {\n \"_id\" : \"2\",\n \"stored_fields\" : [\"field3\", \"field4\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_mget",
- "query": {
- "stored_fields": "field1,field2"
- },
- "body": {
- "docs": [
- {
- "_id": "1"
- },
- {
- "_id": "2",
- "stored_fields": [
- "field3",
- "field4"
- ]
- }
- ]
- },
- "params": {
- "index": "test"
- },
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-get.asciidoc",
- "line": 254
- },
- "digest": "1b37488d0a79d3c950029851b7cd623e",
- "lang": "console",
- "found": [],
- "source": "GET /_mget?routing=key1\n{\n \"docs\" : [\n {\n \"_index\" : \"test\",\n \"_id\" : \"1\",\n \"routing\" : \"key2\"\n },\n {\n \"_index\" : \"test\",\n \"_id\" : \"2\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_mget",
- "query": {
- "routing": "key1"
- },
- "body": {
- "docs": [
- {
- "_index": "test",
- "_id": "1",
- "routing": "key2"
- },
- {
- "_index": "test",
- "_id": "2"
- }
- ]
- },
- "params": null,
- "api": "mget"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 11
- },
- "digest": "ae9ccfaa146731ab9176df90670db1c2",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _bulk\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_bulk",
- "query": null,
- "body": [
- {
- "index": {
- "_index": "test",
- "_id": "1"
- }
- },
- {
- "field1": "value1"
- },
- {
- "delete": {
- "_index": "test",
- "_id": "2"
- }
- },
- {
- "create": {
- "_index": "test",
- "_id": "3"
- }
- },
- {
- "field1": "value3"
- },
- {
- "update": {
- "_id": "1",
- "_index": "test"
- }
- },
- {
- "doc": {
- "field2": "value2"
- }
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 434
- },
- "digest": "ae9ccfaa146731ab9176df90670db1c2",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _bulk\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n{ \"delete\" : { \"_index\" : \"test\", \"_id\" : \"2\" } }\n{ \"create\" : { \"_index\" : \"test\", \"_id\" : \"3\" } }\n{ \"field1\" : \"value3\" }\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"test\"} }\n{ \"doc\" : {\"field2\" : \"value2\"} }",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_bulk",
- "query": null,
- "body": [
- {
- "index": {
- "_index": "test",
- "_id": "1"
- }
- },
- {
- "field1": "value1"
- },
- {
- "delete": {
- "_index": "test",
- "_id": "2"
- }
- },
- {
- "create": {
- "_index": "test",
- "_id": "3"
- }
- },
- {
- "field1": "value3"
- },
- {
- "update": {
- "_id": "1",
- "_index": "test"
- }
- },
- {
- "doc": {
- "field2": "value2"
- }
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 448
- },
- "digest": "6e8127305ead40f2b6dd2ef3b99a9eca",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 30,\n \"errors\": false,\n \"items\": [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 0,\n \"_primary_term\": 1\n }\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_version\": 1,\n \"result\": \"not_found\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 404,\n \"_seq_no\" : 1,\n \"_primary_term\" : 2\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 201,\n \"_seq_no\" : 2,\n \"_primary_term\" : 3\n }\n },\n {\n \"update\": {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_version\": 2,\n \"result\": \"updated\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"status\": 200,\n \"_seq_no\" : 3,\n \"_primary_term\" : 4\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 545
- },
- "digest": "8cd00a3aba7c3c158277bc032aac2830",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _bulk\n{ \"update\" : {\"_id\" : \"1\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : { \"_id\" : \"0\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"script\" : { \"source\": \"ctx._source.counter += params.param1\", \"lang\" : \"painless\", \"params\" : {\"param1\" : 1}}, \"upsert\" : {\"counter\" : 1}}\n{ \"update\" : {\"_id\" : \"2\", \"_index\" : \"index1\", \"retry_on_conflict\" : 3} }\n{ \"doc\" : {\"field\" : \"value\"}, \"doc_as_upsert\" : true }\n{ \"update\" : {\"_id\" : \"3\", \"_index\" : \"index1\", \"_source\" : true} }\n{ \"doc\" : {\"field\" : \"value\"} }\n{ \"update\" : {\"_id\" : \"4\", \"_index\" : \"index1\"} }\n{ \"doc\" : {\"field\" : \"value\"}, \"_source\": true}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_bulk",
- "query": null,
- "body": [
- {
- "update": {
- "_id": "1",
- "_index": "index1",
- "retry_on_conflict": 3
- }
- },
- {
- "doc": {
- "field": "value"
- }
- },
- {
- "update": {
- "_id": "0",
- "_index": "index1",
- "retry_on_conflict": 3
- }
- },
- {
- "script": {
- "source": "ctx._source.counter += params.param1",
- "lang": "painless",
- "params": {
- "param1": 1
- }
- },
- "upsert": {
- "counter": 1
- }
- },
- {
- "update": {
- "_id": "2",
- "_index": "index1",
- "retry_on_conflict": 3
- }
- },
- {
- "doc": {
- "field": "value"
- },
- "doc_as_upsert": true
- },
- {
- "update": {
- "_id": "3",
- "_index": "index1",
- "_source": true
- }
- },
- {
- "doc": {
- "field": "value"
- }
- },
- {
- "update": {
- "_id": "4",
- "_index": "index1"
- }
- },
- {
- "doc": {
- "field": "value"
- },
- "_source": true
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 567
- },
- "digest": "1aa91d3d48140d6367b6cabca8737b8f",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_bulk\n{ \"update\": {\"_id\": \"5\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"update\": {\"_id\": \"6\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"foo\"} }\n{ \"create\": {\"_id\": \"7\", \"_index\": \"index1\"} }\n{ \"my_field\": \"foo\" }",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_bulk",
- "query": null,
- "body": [
- {
- "update": {
- "_id": "5",
- "_index": "index1"
- }
- },
- {
- "doc": {
- "my_field": "foo"
- }
- },
- {
- "update": {
- "_id": "6",
- "_index": "index1"
- }
- },
- {
- "doc": {
- "my_field": "foo"
- }
- },
- {
- "create": {
- "_id": "7",
- "_index": "index1"
- }
- },
- {
- "my_field": "foo"
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 585
- },
- "digest": "36721b1f67f58f58902ca937e79cc5d2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 486,\n \"errors\": true,\n \"items\": [\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"5\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"_index\": \"index1\",\n \"_id\": \"6\",\n \"status\": 404,\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"create\": {\n \"_index\": \"index1\",\n \"_id\": \"7\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 2,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"status\": 201\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 646
- },
- "digest": "bfdad8a928ea30d7cf60d0a0a6bc6e2e",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_bulk?filter_path=items.*.error\n{ \"update\": {\"_id\": \"5\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"baz\"} }\n{ \"update\": {\"_id\": \"6\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"baz\"} }\n{ \"update\": {\"_id\": \"7\", \"_index\": \"index1\"} }\n{ \"doc\": {\"my_field\": \"baz\"} }",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_bulk",
- "query": {
- "filter_path": "items.*.error"
- },
- "body": [
- {
- "update": {
- "_id": "5",
- "_index": "index1"
- }
- },
- {
- "doc": {
- "my_field": "baz"
- }
- },
- {
- "update": {
- "_id": "6",
- "_index": "index1"
- }
- },
- {
- "doc": {
- "my_field": "baz"
- }
- },
- {
- "update": {
- "_id": "7",
- "_index": "index1"
- }
- },
- {
- "doc": {
- "my_field": "baz"
- }
- }
- ],
- "params": null,
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/bulk.asciidoc",
- "line": 660
- },
- "digest": "ba07b72377ab9f5da75bdc76109f66d6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"items\": [\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[5]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n },\n {\n \"update\": {\n \"error\": {\n \"type\": \"document_missing_exception\",\n \"reason\": \"[6]: document missing\",\n \"index_uuid\": \"aAsFqTI0Tc2W0LCWgPNrOA\",\n \"shard\": \"0\",\n \"index\": \"index1\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 25
- },
- "digest": "0cc991e3f7f8511a34730e154b3c5edc",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\"\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter"
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 174
- },
- "digest": "68738b4fd0dda177022be45be95b4c84",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle",
- "query": {
- "requests_per_second": "-1"
- },
- "body": null,
- "params": {
- "task_id": "r1A2WoRbTwKZ516z6NEs5A:36619"
- },
- "api": "reindex_rethrottle"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 204
- },
- "digest": "1b8655e6ba99fe39933c6eafe78728b7",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}\nPOST _reindex\n{\n \"source\": {\n \"index\": \"twitter\",\n \"slice\": {\n \"id\": 1,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter",
- "slice": {
- "id": 0,
- "max": 2
- }
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- },
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter",
- "slice": {
- "id": 1,
- "max": 2
- }
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 237
- },
- "digest": "3ae03ba3b56e5e287953094050766738",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET _refresh\nPOST new_twitter/_search?size=0&filter_path=hits.total",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_refresh",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/new_twitter/_search",
- "query": {
- "size": "0",
- "filter_path": "hits.total"
- },
- "body": null,
- "params": {
- "index": "new_twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 246
- },
- "digest": "7e3ab9b4b60726e0dbe92612d2c4cd9d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\" : {\n \"value\": 120,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 264
- },
- "digest": "cb01106bf524df5e0501d4c655c1aa7b",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex?slices=5&refresh\n{\n \"source\": {\n \"index\": \"twitter\"\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": {
- "slices": "5",
- "refresh": true
- },
- "body": {
- "source": {
- "index": "twitter"
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 280
- },
- "digest": "e567e6dbf86300142573c73789c8fce4",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST new_twitter/_search?size=0&filter_path=hits.total",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/new_twitter/_search",
- "query": {
- "size": "0",
- "filter_path": "hits.total"
- },
- "body": null,
- "params": {
- "index": "new_twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 288
- },
- "digest": "7e3ab9b4b60726e0dbe92612d2c4cd9d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"hits\": {\n \"total\" : {\n \"value\": 120,\n \"relation\": \"eq\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 373
- },
- "digest": "78c96113ae4ed0054e581b17542528a7",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "source",
- "query": {
- "match": {
- "company": "cat"
- }
- }
- },
- "dest": {
- "index": "dest",
- "routing": "=cat"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 398
- },
- "digest": "400e89eb46ead8e9c9e40f123fd5e590",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"source\",\n \"size\": 100\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "source",
- "size": 100
- },
- "dest": {
- "index": "dest",
- "routing": "=cat"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 417
- },
- "digest": "b1efa1c51a34dd5ab5511b71a399f5b1",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"source\"\n },\n \"dest\": {\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "source"
- },
- "dest": {
- "index": "dest",
- "pipeline": "some_ingest_pipeline"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 609
- },
- "digest": "764f9884b370cbdc82a1c5c42ed40ff3",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\",\n \"query\": {\n \"term\": {\n \"user\": \"kimchy\"\n }\n }\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter",
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 635
- },
- "digest": "52b2bfbdd78f8283b6f4891c48013237",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"max_docs\": 1,\n \"source\": {\n \"index\": \"twitter\"\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "max_docs": 1,
- "source": {
- "index": "twitter"
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 657
- },
- "digest": "6f097c298a7abf4c032c4314920c49c8",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": [\"twitter\", \"blog\"]\n },\n \"dest\": {\n \"index\": \"all_together\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": [
- "twitter",
- "blog"
- ]
- },
- "dest": {
- "index": "all_together"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 683
- },
- "digest": "e9c2e15b36372d5281c879d336322b6c",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\",\n \"_source\": [\"user\", \"_doc\"]\n },\n \"dest\": {\n \"index\": \"new_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter",
- "_source": [
- "user",
- "_doc"
- ]
- },
- "dest": {
- "index": "new_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 704
- },
- "digest": "1577e6e806b3283c9e99f1596d310754",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST test/_doc/1?refresh\n{\n \"text\": \"words words\",\n \"flag\": \"foo\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "text": "words words",
- "flag": "foo"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 716
- },
- "digest": "1216f8f7367df3aa823012cef310c08a",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"test\"\n },\n \"dest\": {\n \"index\": \"test2\"\n },\n \"script\": {\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "test"
- },
- "dest": {
- "index": "test2"
- },
- "script": {
- "source": "ctx._source.tag = ctx._source.remove(\"flag\")"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 735
- },
- "digest": "cfc37446bd892d1ac42a3c8e8b204e6c",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET test2/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test2/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "test2",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 743
- },
- "digest": "e0871039b4f1625c6af6df7a88a2a7c9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"1\",\n \"_index\": \"test2\",\n \"_version\": 1,\n \"_seq_no\": 44,\n \"_primary_term\": 1,\n \"_source\": {\n \"text\": \"words words\",\n \"tag\": \"foo\"\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 768
- },
- "digest": "9a4d5e41c52c20635d1fd9c6e13f6c7a",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT metricbeat-2016.05.30/_doc/1?refresh\n{\"system.cpu.idle.pct\": 0.908}\nPUT metricbeat-2016.05.31/_doc/1?refresh\n{\"system.cpu.idle.pct\": 0.105}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/metricbeat-2016.05.30/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "system.cpu.idle.pct": 0.908
- },
- "params": {
- "index": "metricbeat-2016.05.30",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/metricbeat-2016.05.31/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "system.cpu.idle.pct": 0.105
- },
- "params": {
- "index": "metricbeat-2016.05.31",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 784
- },
- "digest": "973a3ff47fc4ce036ecd9bd363fef9f7",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"metricbeat-*\"\n },\n \"dest\": {\n \"index\": \"metricbeat\"\n },\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "metricbeat-*"
- },
- "dest": {
- "index": "metricbeat"
- },
- "script": {
- "lang": "painless",
- "source": "ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 804
- },
- "digest": "3b04cc894e6a47d57983484010feac0c",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET metricbeat-2016.05.30-1/_doc/1\nGET metricbeat-2016.05.31-1/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/metricbeat-2016.05.30-1/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "metricbeat-2016.05.30-1",
- "id": "1"
- },
- "api": "get"
- },
- {
- "method": "GET",
- "url": "/metricbeat-2016.05.31-1/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "metricbeat-2016.05.31-1",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 819
- },
- "digest": "1bc731a4df952228af6dfa6b48627332",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"max_docs\": 10,\n \"source\": {\n \"index\": \"twitter\",\n \"query\": {\n \"function_score\" : {\n \"random_score\" : {},\n \"min_score\" : 0.9 <1>\n }\n }\n },\n \"dest\": {\n \"index\": \"random_twitter\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "max_docs": 10,
- "source": {
- "index": "twitter",
- "query": {
- "function_score": {
- "random_score": {},
- "min_score": 0.9
- }
- }
- },
- "dest": {
- "index": "random_twitter"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 850
- },
- "digest": "8871b8fcb6de4f0c7dff22798fb10fb7",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"index\": \"twitter\"\n },\n \"dest\": {\n \"index\": \"new_twitter\",\n \"version_type\": \"external\"\n },\n \"script\": {\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "twitter"
- },
- "dest": {
- "index": "new_twitter",
- "version_type": "external"
- },
- "script": {
- "source": "if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}",
- "lang": "painless"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 905
- },
- "digest": "36b2778f23d0955255f52c075c4d213d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "remote": {
- "host": "http://otherhost:9200",
- "username": "user",
- "password": "pass"
- },
- "index": "source",
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "dest": {
- "index": "dest"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 971
- },
- "digest": "64b9baa6d7556b960b29698f3383aa31",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\"\n },\n \"index\": \"source\",\n \"size\": 10,\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "remote": {
- "host": "http://otherhost:9200"
- },
- "index": "source",
- "size": 10,
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "dest": {
- "index": "dest"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/reindex.asciidoc",
- "line": 1002
- },
- "digest": "7f697eb436dfa3c30dfe610d8c32d132",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _reindex\n{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"socket_timeout\": \"1m\",\n \"connect_timeout\": \"10s\"\n },\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "remote": {
- "host": "http://otherhost:9200",
- "socket_timeout": "1m",
- "connect_timeout": "10s"
- },
- "index": "source",
- "query": {
- "match": {
- "test": "data"
- }
- }
- },
- "dest": {
- "index": "dest"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 10
- },
- "digest": "4c9b1db368186091c1a660bcd52890b8",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors/1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 30
- },
- "digest": "a15ca7faa8ba282679396de3c7b90485",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors/1?fields=message",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors/1",
- "query": {
- "fields": "message"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 171
- },
- "digest": "587dd0c1aebbc1d93190bf117959cb73",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter\n{ \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"term_vector\": \"with_positions_offsets_payloads\",\n \"store\" : true,\n \"analyzer\" : \"fulltext_analyzer\"\n },\n \"fullname\": {\n \"type\": \"text\",\n \"term_vector\": \"with_positions_offsets_payloads\",\n \"analyzer\" : \"fulltext_analyzer\"\n }\n }\n },\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : 1,\n \"number_of_replicas\" : 0\n },\n \"analysis\": {\n \"analyzer\": {\n \"fulltext_analyzer\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n \"type_as_payload\"\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "term_vector": "with_positions_offsets_payloads",
- "store": true,
- "analyzer": "fulltext_analyzer"
- },
- "fullname": {
- "type": "text",
- "term_vector": "with_positions_offsets_payloads",
- "analyzer": "fulltext_analyzer"
- }
- }
- },
- "settings": {
- "index": {
- "number_of_shards": 1,
- "number_of_replicas": 0
- },
- "analysis": {
- "analyzer": {
- "fulltext_analyzer": {
- "type": "custom",
- "tokenizer": "whitespace",
- "filter": [
- "lowercase",
- "type_as_payload"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 212
- },
- "digest": "c75bd2b34c51aecf55ece4137612d4c7",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_doc/1\n{\n \"fullname\" : \"John Doe\",\n \"text\" : \"twitter test test test \"\n}\n\nPUT /twitter/_doc/2?refresh=wait_for\n{\n \"fullname\" : \"Jane Doe\",\n \"text\" : \"Another twitter test ...\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": null,
- "body": {
- "fullname": "John Doe",
- "text": "twitter test test test "
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/twitter/_doc/2",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "fullname": "Jane Doe",
- "text": "Another twitter test ..."
- },
- "params": {
- "index": "twitter",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 231
- },
- "digest": "8dfecbb38a81fb5b42f63d6fe9bf9278",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors/1\n{\n \"fields\" : [\"text\"],\n \"offsets\" : true,\n \"payloads\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors/1",
- "query": null,
- "body": {
- "fields": [
- "text"
- ],
- "offsets": true,
- "payloads": true,
- "positions": true,
- "term_statistics": true,
- "field_statistics": true
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 247
- },
- "digest": "3639075426ee76c307487d67d22a08dc",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_id\": \"1\",\n \"_index\": \"twitter\",\n \"_version\": 1,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"text\": {\n \"field_statistics\": {\n \"doc_count\": 2,\n \"sum_doc_freq\": 6,\n \"sum_ttf\": 8\n },\n \"terms\": {\n \"test\": {\n \"doc_freq\": 2,\n \"term_freq\": 3,\n \"tokens\": [\n {\n \"end_offset\": 12,\n \"payload\": \"d29yZA==\",\n \"position\": 1,\n \"start_offset\": 8\n },\n {\n \"end_offset\": 17,\n \"payload\": \"d29yZA==\",\n \"position\": 2,\n \"start_offset\": 13\n },\n {\n \"end_offset\": 22,\n \"payload\": \"d29yZA==\",\n \"position\": 3,\n \"start_offset\": 18\n }\n ],\n \"ttf\": 4\n },\n \"twitter\": {\n \"doc_freq\": 2,\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"end_offset\": 7,\n \"payload\": \"d29yZA==\",\n \"position\": 0,\n \"start_offset\": 0\n }\n ],\n \"ttf\": 2\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 317
- },
- "digest": "487d12bb3e3036c4493dcbe43191b6f0",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors/1\n{\n \"fields\" : [\"text\", \"some_field_without_term_vectors\"],\n \"offsets\" : true,\n \"positions\" : true,\n \"term_statistics\" : true,\n \"field_statistics\" : true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors/1",
- "query": null,
- "body": {
- "fields": [
- "text",
- "some_field_without_term_vectors"
- ],
- "offsets": true,
- "positions": true,
- "term_statistics": true,
- "field_statistics": true
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 340
- },
- "digest": "1f580df38ae517800d0c62d9648ebcb9",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors\n{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"twitter test test test\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors",
- "query": null,
- "body": {
- "doc": {
- "fullname": "John Doe",
- "text": "twitter test test test"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 361
- },
- "digest": "8304a9c1ae8d0329b66ba57fb8263485",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_termvectors\n{\n \"doc\" : {\n \"fullname\" : \"John Doe\",\n \"text\" : \"twitter test test test\"\n },\n \"fields\": [\"fullname\"],\n \"per_field_analyzer\" : {\n \"fullname\": \"keyword\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_termvectors",
- "query": null,
- "body": {
- "doc": {
- "fullname": "John Doe",
- "text": "twitter test test test"
- },
- "fields": [
- "fullname"
- ],
- "per_field_analyzer": {
- "fullname": "keyword"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 379
- },
- "digest": "2079609f3e3ed939f7c717eccb061037",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"twitter\",\n \"_version\": 0,\n \"found\": true,\n \"took\": 6,\n \"term_vectors\": {\n \"fullname\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 2,\n \"doc_count\": 4,\n \"sum_ttf\": 4\n },\n \"terms\": {\n \"John Doe\": {\n \"term_freq\": 1,\n \"tokens\": [\n {\n \"position\": 0,\n \"start_offset\": 0,\n \"end_offset\": 8\n }\n ]\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 425
- },
- "digest": "ef3b210782fe58df252d0e805b8ef644",
- "lang": "console",
- "found": [],
- "source": "GET /imdb/_termvectors\n{\n \"doc\": {\n \"plot\": \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"\n },\n \"term_statistics\" : true,\n \"field_statistics\" : true,\n \"positions\": false,\n \"offsets\": false,\n \"filter\" : {\n \"max_num_terms\" : 3,\n \"min_term_freq\" : 1,\n \"min_doc_freq\" : 1\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/imdb/_termvectors",
- "query": null,
- "body": {
- "doc": {
- "plot": "When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil."
- },
- "term_statistics": true,
- "field_statistics": true,
- "positions": false,
- "offsets": false,
- "filter": {
- "max_num_terms": 3,
- "min_term_freq": 1,
- "min_doc_freq": 1
- }
- },
- "params": {
- "index": "imdb"
- },
- "api": "termvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/termvectors.asciidoc",
- "line": 447
- },
- "digest": "9582cab412650ffe53fd17791199cbf8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\": \"imdb\",\n \"_version\": 0,\n \"found\": true,\n \"term_vectors\": {\n \"plot\": {\n \"field_statistics\": {\n \"sum_doc_freq\": 3384269,\n \"doc_count\": 176214,\n \"sum_ttf\": 3753460\n },\n \"terms\": {\n \"armored\": {\n \"doc_freq\": 27,\n \"ttf\": 27,\n \"term_freq\": 1,\n \"score\": 9.74725\n },\n \"industrialist\": {\n \"doc_freq\": 88,\n \"ttf\": 88,\n \"term_freq\": 1,\n \"score\": 8.590818\n },\n \"stark\": {\n \"doc_freq\": 44,\n \"ttf\": 47,\n \"term_freq\": 1,\n \"score\": 9.272792\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/multi-termvectors.asciidoc",
- "line": 10
- },
- "digest": "c6d18f08822463356b297f238c6650d9",
- "lang": "console",
- "found": [],
- "source": "POST /_mtermvectors\n{\n \"docs\": [\n {\n \"_index\": \"twitter\",\n \"_id\": \"2\",\n \"term_statistics\": true\n },\n {\n \"_index\": \"twitter\",\n \"_id\": \"1\",\n \"fields\": [\n \"message\"\n ]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_mtermvectors",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "twitter",
- "_id": "2",
- "term_statistics": true
- },
- {
- "_index": "twitter",
- "_id": "1",
- "fields": [
- "message"
- ]
- }
- ]
- },
- "params": null,
- "api": "mtermvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-termvectors.asciidoc",
- "line": 91
- },
- "digest": "2c8638acc208bd0a47403c1f054fde21",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_mtermvectors\n{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_mtermvectors",
- "query": null,
- "body": {
- "docs": [
- {
- "_id": "2",
- "fields": [
- "message"
- ],
- "term_statistics": true
- },
- {
- "_id": "1"
- }
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "mtermvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-termvectors.asciidoc",
- "line": 114
- },
- "digest": "f31eea58baf0dbd39823ff9100c9ce28",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_mtermvectors\n{\n \"ids\" : [\"1\", \"2\"],\n \"parameters\": {\n \t\"fields\": [\n \t\"message\"\n \t],\n \t\"term_statistics\": true\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_mtermvectors",
- "query": null,
- "body": {
- "ids": [
- "1",
- "2"
- ],
- "parameters": {
- "fields": [
- "message"
- ],
- "term_statistics": true
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "mtermvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/multi-termvectors.asciidoc",
- "line": 135
- },
- "digest": "29840a67fdc13cd329ca2c69a2303e83",
- "lang": "console",
- "found": [],
- "source": "POST /_mtermvectors\n{\n \"docs\": [\n {\n \"_index\": \"twitter\",\n \"doc\" : {\n \"user\" : \"John Doe\",\n \"message\" : \"twitter test test test\"\n }\n },\n {\n \"_index\": \"twitter\",\n \"doc\" : {\n \"user\" : \"Jane Doe\",\n \"message\" : \"Another twitter test ...\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_mtermvectors",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "twitter",
- "doc": {
- "user": "John Doe",
- "message": "twitter test test test"
- }
- },
- {
- "_index": "twitter",
- "doc": {
- "user": "Jane Doe",
- "message": "Another twitter test ..."
- }
- }
- ]
- },
- "params": null,
- "api": "mtermvectors"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/refresh.asciidoc",
- "line": 87
- },
- "digest": "92d343eb755971c44a939d0660bf5ac2",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/1?refresh\n{\"test\": \"test\"}\nPUT /test/_doc/2?refresh=true\n{\"test\": \"test\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/2",
- "query": {
- "refresh": "true"
- },
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/refresh.asciidoc",
- "line": 98
- },
- "digest": "1070e59ba144cdf309fd9b2591612b95",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/3\n{\"test\": \"test\"}\nPUT /test/_doc/4?refresh=false\n{\"test\": \"test\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/3",
- "query": null,
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "3"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/4",
- "query": {
- "refresh": "false"
- },
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "4"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/refresh.asciidoc",
- "line": 108
- },
- "digest": "e4b2b5e0aaedf3cbbcde3d61eb1f13fc",
- "lang": "console",
- "found": [],
- "source": "PUT /test/_doc/4?refresh=wait_for\n{\"test\": \"test\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test/_doc/4",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "test": "test"
- },
- "params": {
- "index": "test",
- "id": "4"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 24
- },
- "digest": "cffc8b207f354beb6d76c8d334cab677",
- "lang": "console",
- "found": [],
- "source": "PUT products/_doc/1567\n{\n \"product\" : \"r2d2\",\n \"details\" : \"A resourceful astromech droid\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/products/_doc/1567",
- "query": null,
- "body": {
- "product": "r2d2",
- "details": "A resourceful astromech droid"
- },
- "params": {
- "index": "products",
- "id": "1567"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 36
- },
- "digest": "e5e8f96d80239e4f815bbaef781fe621",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"failed\" : 0,\n \"successful\" : 1\n },\n \"_index\" : \"products\",\n \"_id\" : \"1567\",\n \"_version\" : 1,\n \"_seq_no\" : 362,\n \"_primary_term\" : 2,\n \"result\" : \"created\"\n}"
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 60
- },
- "digest": "278d5bfa1a01f91d5c84679ef1bca390",
- "lang": "console",
- "found": [],
- "source": "GET products/_doc/1567",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/products/_doc/1567",
- "query": null,
- "body": null,
- "params": {
- "index": "products",
- "id": "1567"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 68
- },
- "digest": "79dc2fd91caf6b96f0441a8b40a81304",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"products\",\n \"_id\" : \"1567\",\n \"_version\" : 1,\n \"_seq_no\" : 362,\n \"_primary_term\" : 2,\n \"found\": true,\n \"_source\" : {\n \"product\" : \"r2d2\",\n \"details\" : \"A resourceful astromech droid\"\n }\n}"
- },
- {
- "source_location": {
- "file": "docs/concurrency-control.asciidoc",
- "line": 100
- },
- "digest": "ac24941027452bdafe82b4bd7edf9000",
- "lang": "console",
- "found": [],
- "source": "PUT products/_doc/1567?if_seq_no=362&if_primary_term=2\n{\n \"product\" : \"r2d2\",\n \"details\" : \"A resourceful astromech droid\",\n \"tags\": [\"droid\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/products/_doc/1567",
- "query": {
- "if_seq_no": "362",
- "if_primary_term": "2"
- },
- "body": {
- "product": "r2d2",
- "details": "A resourceful astromech droid",
- "tags": [
- "droid"
- ]
- },
- "params": {
- "index": "products",
- "id": "1567"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/put-enrich-policy.asciidoc",
- "line": 26
- },
- "digest": "e15a5bb869d24668207b9b4629744be4",
- "lang": "console",
- "found": [],
- "source": "PUT /_enrich/policy/my-policy\n{\n \"match\": {\n \"indices\": \"users\",\n \"match_field\": \"email\",\n \"enrich_fields\": [\"first_name\", \"last_name\", \"city\", \"zip\", \"state\"]\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_enrich/policy/my-policy",
- "query": null,
- "body": {
- "match": {
- "indices": "users",
- "match_field": "email",
- "enrich_fields": [
- "first_name",
- "last_name",
- "city",
- "zip",
- "state"
- ]
- }
- },
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.put_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/delete-enrich-policy.asciidoc",
- "line": 37
- },
- "digest": "cdd29b01e730b3996de68a2788050021",
- "lang": "console",
- "found": [],
- "source": "DELETE /_enrich/policy/my-policy",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_enrich/policy/my-policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.delete_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 44
- },
- "digest": "af18f5c5fb2364ae23c6a14431820aba",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/policy/my-policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/policy/my-policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.get_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 89
- },
- "digest": "af18f5c5fb2364ae23c6a14431820aba",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/policy/my-policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/policy/my-policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.get_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 97
- },
- "digest": "b11d9c9bd14d764f81cd15b547fe6d58",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"policies\": [\n {\n \"config\": {\n \"match\": {\n \"name\" : \"my-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 125
- },
- "digest": "8684589e31d96ab229e8c4feb4d704bb",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/policy/my-policy,other-policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/policy/my-policy,other-policy",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy,other-policy"
- },
- "api": "enrich.get_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 133
- },
- "digest": "8f4565d05f90952c8cfb69f30347c73d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"policies\": [\n {\n \"config\": {\n \"match\": {\n \"name\" : \"my-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n },\n {\n \"config\": {\n \"match\": {\n \"name\" : \"other-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 177
- },
- "digest": "c97fd95ebdcf56cc973582e37f732ed2",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/policy",
- "query": null,
- "body": null,
- "params": null,
- "api": "enrich.get_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/get-enrich-policy.asciidoc",
- "line": 185
- },
- "digest": "8f4565d05f90952c8cfb69f30347c73d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"policies\": [\n {\n \"config\": {\n \"match\": {\n \"name\" : \"my-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n },\n {\n \"config\": {\n \"match\": {\n \"name\" : \"other-policy\",\n \"indices\" : [\"users\"],\n \"match_field\" : \"email\",\n \"enrich_fields\" : [\n \"first_name\",\n \"last_name\",\n \"city\",\n \"zip\",\n \"state\"\n ]\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/execute-enrich-policy.asciidoc",
- "line": 40
- },
- "digest": "66c64bffe3a15cf260baa0c0118aa4ea",
- "lang": "console",
- "found": [],
- "source": "PUT /_enrich/policy/my-policy/_execute",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_enrich/policy/my-policy/_execute",
- "query": null,
- "body": null,
- "params": {
- "name": "my-policy"
- },
- "api": "enrich.execute_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/enrich-stats.asciidoc",
- "line": 14
- },
- "digest": "84e2cf7417c9e0c9e6f3c23031001440",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/_stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "enrich.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/enrich-stats.asciidoc",
- "line": 94
- },
- "digest": "84e2cf7417c9e0c9e6f3c23031001440",
- "lang": "console",
- "found": [],
- "source": "GET /_enrich/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_enrich/_stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "enrich.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/enrich/enrich-stats.asciidoc",
- "line": 102
- },
- "digest": "112d678d90cb37dc475f53ebac76d1b7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"executing_policies\": [\n {\n \"name\": \"my-policy\",\n \"task\": {\n \"id\" : 124,\n \"type\" : \"direct\",\n \"action\" : \"cluster:admin/xpack/enrich/execute\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 47402,\n \"cancellable\" : false,\n \"parent_task_id\" : \"oTUltX4IQMOUUVeiohTt8A:123\",\n \"headers\" : {\n \"X-Opaque-Id\" : \"123456\"\n }\n }\n }\n ],\n \"coordinator_stats\": [\n {\n \"node_id\": \"1sFM8cmSROZYhPxVsiWew\",\n \"queue_size\": 0,\n \"remote_requests_current\": 0,\n \"remote_requests_total\": 0,\n \"executed_searches_total\": 0\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "graph/explore.asciidoc",
- "line": 204
- },
- "digest": "8bf5ac11eb42e652023a685af4a45ae2",
- "lang": "console",
- "found": [],
- "source": "POST clicklogs/_graph/explore\n{\n \"query\": { <1>\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [ <2>\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": { <3>\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/clicklogs/_graph/explore",
- "query": null,
- "body": {
- "query": {
- "match": {
- "query.raw": "midi"
- }
- },
- "vertices": [
- {
- "field": "product"
- }
- ],
- "connections": {
- "vertices": [
- {
- "field": "query.raw"
- }
- ]
- }
- },
- "params": {
- "index": "clicklogs"
- },
- "api": "graph.explore"
- }
- ]
- },
- {
- "source_location": {
- "file": "graph/explore.asciidoc",
- "line": 309
- },
- "digest": "6a1a238984d74771420d150dec47fd91",
- "lang": "console",
- "found": [],
- "source": "POST clicklogs/_graph/explore\n{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"controls\": {\n \"use_significance\": false,<1>\n \"sample_size\": 2000,<2>\n \"timeout\": 2000,<3>\n \"sample_diversity\": {<4>\n \"field\": \"category.raw\",\n \"max_docs_per_value\": 500\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\",\n \"size\": 5,<5>\n \"min_doc_count\": 10,<6>\n \"shard_min_doc_count\": 3<7>\n }\n ],\n \"connections\": {\n \"query\": {<8>\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"query_time\": {\n \"gte\": \"2015-10-01 00:00:00\"\n }\n }\n }\n ]\n }\n },\n \"vertices\": [\n {\n \"field\": \"query.raw\",\n \"size\": 5,\n \"min_doc_count\": 10,\n \"shard_min_doc_count\": 3\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/clicklogs/_graph/explore",
- "query": null,
- "body": {
- "query": {
- "match": {
- "query.raw": "midi"
- }
- },
- "controls": {
- "use_significance": false,
- "sample_size": 2000,
- "timeout": 2000,
- "sample_diversity": {
- "field": "category.raw",
- "max_docs_per_value": 500
- }
- },
- "vertices": [
- {
- "field": "product",
- "size": 5,
- "min_doc_count": 10,
- "shard_min_doc_count": 3
- }
- ],
- "connections": {
- "query": {
- "bool": {
- "filter": [
- {
- "range": {
- "query_time": {
- "gte": "2015-10-01 00:00:00"
- }
- }
- }
- ]
- }
- },
- "vertices": [
- {
- "field": "query.raw",
- "size": 5,
- "min_doc_count": 10,
- "shard_min_doc_count": 3
- }
- ]
- }
- },
- "params": {
- "index": "clicklogs"
- },
- "api": "graph.explore"
- }
- ]
- },
- {
- "source_location": {
- "file": "graph/explore.asciidoc",
- "line": 396
- },
- "digest": "fa82d86a046d67366cfe9ce65535e433",
- "lang": "console",
- "found": [],
- "source": "POST clicklogs/_graph/explore\n{\n \"vertices\": [\n {\n \"field\": \"product\",\n \"include\": [ \"1854873\" ] <1>\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\",\n \"exclude\": [ <2>\n \"midi keyboard\",\n \"midi\",\n \"synth\"\n ]\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/clicklogs/_graph/explore",
- "query": null,
- "body": {
- "vertices": [
- {
- "field": "product",
- "include": [
- "1854873"
- ]
- }
- ],
- "connections": {
- "vertices": [
- {
- "field": "query.raw",
- "exclude": [
- "midi keyboard",
- "midi",
- "synth"
- ]
- }
- ]
- }
- },
- "params": {
- "index": "clicklogs"
- },
- "api": "graph.explore"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 12
- },
- "digest": "394aabe7029e4d0741ae6965c6fae5ac",
- "lang": "console",
- "found": [],
- "source": "PUT /twitter/_alias/alias1",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_alias/alias1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "name": "alias1"
- },
- "api": "indices.put_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 73
- },
- "digest": "7fe8339ce3911382a7c473f6f0c03f89",
- "lang": "console",
- "found": [],
- "source": "PUT /logs_20302801/_alias/2030",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs_20302801/_alias/2030",
- "query": null,
- "body": null,
- "params": {
- "index": "logs_20302801",
- "name": "2030"
- },
- "api": "indices.put_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 85
- },
- "digest": "890f659cfc10ff8171420809bdcf7c67",
- "lang": "console",
- "found": [],
- "source": "PUT /users\n{\n \"mappings\" : {\n \"properties\" : {\n \"user_id\" : {\"type\" : \"integer\"}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "integer"
- }
- }
- }
- },
- "params": {
- "index": "users"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 99
- },
- "digest": "83b2785e63357ab3ade51d8ec0c11917",
- "lang": "console",
- "found": [],
- "source": "PUT /users/_alias/user_12\n{\n \"routing\" : \"12\",\n \"filter\" : {\n \"term\" : {\n \"user_id\" : 12\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users/_alias/user_12",
- "query": null,
- "body": {
- "routing": "12",
- "filter": {
- "term": {
- "user_id": 12
- }
- }
- },
- "params": {
- "index": "users",
- "name": "user_12"
- },
- "api": "indices.put_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/add-alias.asciidoc",
- "line": 119
- },
- "digest": "3e1e00a08a6fbfdc3d55d69880373cd6",
- "lang": "console",
- "found": [],
- "source": "PUT /logs_20302801\n{\n \"mappings\" : {\n \"properties\" : {\n \"year\" : {\"type\" : \"integer\"}\n }\n },\n \"aliases\" : {\n \"current_day\" : {},\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\"year\" : 2030 }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs_20302801",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "year": {
- "type": "integer"
- }
- }
- },
- "aliases": {
- "2030": {
- "filter": {
- "term": {
- "year": 2030
- }
- }
- },
- "current_day": {}
- }
- },
- "params": {
- "index": "logs_20302801"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 11
- },
- "digest": "fa42ae3bf6a300420cd0f77ba006458a",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"analyzer\" : \"standard\",\n \"text\" : \"Quick Brown Foxes!\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "standard",
- "text": "Quick Brown Foxes!"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 138
- },
- "digest": "76dbdd0b2bd48c3c6b1a8d81e23bafd6",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"analyzer\" : \"standard\",\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "standard",
- "text": "this is a test"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 152
- },
- "digest": "fd9b668eeb1f117950bd4991c7c03fb1",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"analyzer\" : \"standard\",\n \"text\" : [\"this is a test\", \"the second text\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "analyzer": "standard",
- "text": [
- "this is a test",
- "the second text"
- ]
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 168
- },
- "digest": "ef33b3b373f7040b874146599db5d557",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"keyword\",\n \"filter\" : [\"lowercase\"],\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "filter": [
- "lowercase"
- ],
- "text": "this is a test"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 178
- },
- "digest": "dc8c94c9bef1f879282caea5c406f36e",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"keyword\",\n \"filter\" : [\"lowercase\"],\n \"char_filter\" : [\"html_strip\"],\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "keyword",
- "filter": [
- "lowercase"
- ],
- "char_filter": [
- "html_strip"
- ],
- "text": "this is a test"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 191
- },
- "digest": "22dde5fe7ac5d85d52115641a68b3c55",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"lowercase\", {\"type\": \"stop\", \"stopwords\": [\"a\", \"is\", \"this\"]}],\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "whitespace",
- "filter": [
- "lowercase",
- {
- "type": "stop",
- "stopwords": [
- "a",
- "is",
- "this"
- ]
- }
- ],
- "text": "this is a test"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 206
- },
- "digest": "3951d7fcd7f849fa278daf342872125a",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "text": "this is a test"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 219
- },
- "digest": "71fa652ddea811eb3c8bf8c5db21e549",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"analyzer\" : \"whitespace\",\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "analyzer": "whitespace",
- "text": "this is a test"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 234
- },
- "digest": "de2f59887737de3a27716177b60393a2",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"field\" : \"obj1.field1\",\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "field": "obj1.field1",
- "text": "this is a test"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 252
- },
- "digest": "49d87c2eb7314ed34221c5fb4f21dfcc",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"normalizer\" : \"my_normalizer\",\n \"text\" : \"BaR\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "normalizer": "my_normalizer",
- "text": "BaR"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 264
- },
- "digest": "15a34bfe0ef8ef6333c8c7b55c011e5d",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"filter\" : [\"lowercase\"],\n \"text\" : \"BaR\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "filter": [
- "lowercase"
- ],
- "text": "BaR"
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 281
- },
- "digest": "89f8eac24f3ec6a7668d580aaf0eeefa",
- "lang": "console",
- "found": [],
- "source": "GET /_analyze\n{\n \"tokenizer\" : \"standard\",\n \"filter\" : [\"snowball\"],\n \"text\" : \"detailed output\",\n \"explain\" : true,\n \"attributes\" : [\"keyword\"] <1>\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_analyze",
- "query": null,
- "body": {
- "tokenizer": "standard",
- "filter": [
- "snowball"
- ],
- "text": "detailed output",
- "explain": true,
- "attributes": [
- "keyword"
- ]
- },
- "params": null,
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 297
- },
- "digest": "cf3af9502f758de0682176adb30e7128",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"detail\" : {\n \"custom_analyzer\" : true,\n \"charfilters\" : [ ],\n \"tokenizer\" : {\n \"name\" : \"standard\",\n \"tokens\" : [ {\n \"token\" : \"detailed\",\n \"start_offset\" : 0,\n \"end_offset\" : 8,\n \"type\" : \"\",\n \"position\" : 0\n }, {\n \"token\" : \"output\",\n \"start_offset\" : 9,\n \"end_offset\" : 15,\n \"type\" : \"\",\n \"position\" : 1\n } ]\n },\n \"tokenfilters\" : [ {\n \"name\" : \"snowball\",\n \"tokens\" : [ {\n \"token\" : \"detail\",\n \"start_offset\" : 0,\n \"end_offset\" : 8,\n \"type\" : \"\",\n \"position\" : 0,\n \"keyword\" : false <1>\n }, {\n \"token\" : \"output\",\n \"start_offset\" : 9,\n \"end_offset\" : 15,\n \"type\" : \"\",\n \"position\" : 1,\n \"keyword\" : false <1>\n } ]\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 356
- },
- "digest": "0957bbd535f58c97b12ffba90813d64c",
- "lang": "console",
- "found": [],
- "source": "PUT /analyze_sample\n{\n \"settings\" : {\n \"index.analyze.max_token_count\" : 20000\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/analyze_sample",
- "query": null,
- "body": {
- "settings": {
- "index.analyze.max_token_count": 20000
- }
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/analyze.asciidoc",
- "line": 367
- },
- "digest": "3951d7fcd7f849fa278daf342872125a",
- "lang": "console",
- "found": [],
- "source": "GET /analyze_sample/_analyze\n{\n \"text\" : \"this is a test\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/analyze_sample/_analyze",
- "query": null,
- "body": {
- "text": "this is a test"
- },
- "params": {
- "index": "analyze_sample"
- },
- "api": "indices.analyze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 11
- },
- "digest": "486eee2c8e75520f825fec08c1fbd67e",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_cache/clear",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 108
- },
- "digest": "e97b14be2c4030bfc92e5d09a27e9fc9",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_cache/clear?fielddata=true <1>\nPOST /twitter/_cache/clear?query=true <2>\nPOST /twitter/_cache/clear?request=true <3>",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": {
- "fielddata": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- },
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": {
- "query": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- },
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": {
- "request": "true"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 128
- },
- "digest": "62069c4118d79daf9612b29659b16627",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_cache/clear?fields=foo,bar <1>",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_cache/clear",
- "query": {
- "fields": "foo,bar"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 140
- },
- "digest": "2f43c5e976713a5c5cd8eb4b08cfffca",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_cache/clear",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_cache/clear",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clearcache.asciidoc",
- "line": 150
- },
- "digest": "c4a1d03dcfb82913d0724a42b0a89f20",
- "lang": "console",
- "found": [],
- "source": "POST /_cache/clear",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_cache/clear",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clone-index.asciidoc",
- "line": 10
- },
- "digest": "085df89b76dd980934d1dc2e59f5db1f",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_clone/cloned-twitter-index",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_clone/cloned-twitter-index",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "target": "cloned-twitter-index"
- },
- "api": "indices.clone"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clone-index.asciidoc",
- "line": 37
- },
- "digest": "1c5a5a8c0bdc3c577f560157bd4e2313",
- "lang": "console",
- "found": [],
- "source": "PUT /my_source_index/_settings\n{\n \"settings\": {\n \"index.blocks.write\": true\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_source_index/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.blocks.write": true
- }
- },
- "params": {
- "index": "my_source_index"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clone-index.asciidoc",
- "line": 82
- },
- "digest": "190a21e32db2125ddaea0f634e126a84",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_clone/my_target_index",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_clone/my_target_index",
- "query": null,
- "body": null,
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.clone"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/clone-index.asciidoc",
- "line": 108
- },
- "digest": "81612c2537386e031b7eb604f6756a71",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_clone/my_target_index\n{\n \"settings\": {\n \"index.number_of_shards\": 5 <1>\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_clone/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 5
- },
- "aliases": {
- "my_search_indices": {}
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.clone"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/close.asciidoc",
- "line": 10
- },
- "digest": "34107944bca50a003cda9fca934b2011",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_close",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.close"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/close.asciidoc",
- "line": 66
- },
- "digest": "3a6b9143f3de6258d44ff7e0eb38d953",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_close",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.close"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/close.asciidoc",
- "line": 74
- },
- "digest": "2de507b2683e9f92921201724c13b764",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true,\n \"indices\" : {\n \"my_index\" : {\n \"closed\" : true\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 10
- },
- "digest": "1c23507edd7a3c18538b68223378e4ab",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 81
- },
- "digest": "e5d2172b524332196cac0f031c043659",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter\n{\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : 3, <1>\n \"number_of_replicas\" : 2 <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "number_of_shards": 3,
- "number_of_replicas": 2
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 99
- },
- "digest": "b9c5d7ca6ca9c6f747201f45337a4abf",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter\n{\n \"settings\" : {\n \"number_of_shards\" : 3,\n \"number_of_replicas\" : 2\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 3,
- "number_of_replicas": 2
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 123
- },
- "digest": "dfef545b1e2c247bafd1347e8e807ac1",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /test\n{\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"mappings\" : {\n \"properties\" : {\n \"field1\" : { \"type\" : \"text\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "properties": {
- "field1": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 143
- },
- "digest": "4d56b179242fed59e3d6476f817b6055",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /test\n{\n \"aliases\" : {\n \"alias_1\" : {},\n \"alias_2\" : {\n \"filter\" : {\n \"term\" : {\"user\" : \"kimchy\" }\n },\n \"routing\" : \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "aliases": {
- "alias_1": {},
- "alias_2": {
- "filter": {
- "term": {
- "user": "kimchy"
- }
- },
- "routing": "kimchy"
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 166
- },
- "digest": "fd86e01af45ae8c293888eebfa064e25",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"index\": \"test\"\n}"
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 190
- },
- "digest": "4d46dbb96125b27f46299547de9d8709",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /test\n{\n \"settings\": {\n \"index.write.wait_for_active_shards\": \"2\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "index.write.wait_for_active_shards": "2"
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/create-index.asciidoc",
- "line": 203
- },
- "digest": "fabe14480624a99e8ee42c7338672058",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /test?wait_for_active_shards=2",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": {
- "wait_for_active_shards": "2"
- },
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/delete-index.asciidoc",
- "line": 10
- },
- "digest": "98f14fddddea54a7d6149ab7b92e099d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "DELETE /twitter",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/delete-alias.asciidoc",
- "line": 12
- },
- "digest": "bdeee37db5fbf55e5026746c37df3c31",
- "lang": "console",
- "found": [],
- "source": "DELETE /twitter/_alias/alias1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/twitter/_alias/alias1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "name": "alias1"
- },
- "api": "indices.delete_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/delete-index-template.asciidoc",
- "line": 24
- },
- "digest": "0f0fba0061d26602cd5f401ca4a19be3",
- "lang": "console",
- "found": [],
- "source": "DELETE /_template/template_1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_template/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.delete_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/flush.asciidoc",
- "line": 10
- },
- "digest": "bf7b04e79b861d76d1922a588d57f817",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_flush",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/flush.asciidoc",
- "line": 119
- },
- "digest": "cefde3553fdbd516813e73a603c72c24",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy/_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy/_flush",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy"
- },
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/flush.asciidoc",
- "line": 129
- },
- "digest": "66db9f5108a3936115f1fb64c844934a",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_flush",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/flush.asciidoc",
- "line": 139
- },
- "digest": "f27c28ddbf4c266b5f42d14da837b8de",
- "lang": "console",
- "found": [],
- "source": "POST /_flush",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_flush",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.flush"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 12
- },
- "digest": "ca16c1f060ca653ea8fbca445359f78f",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_forcemerge",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_forcemerge",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 141
- },
- "digest": "ca16c1f060ca653ea8fbca445359f78f",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_forcemerge",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_forcemerge",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 151
- },
- "digest": "6733f91e27b6d5907d7c58546bc45ca1",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_forcemerge",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_forcemerge",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 161
- },
- "digest": "480e531db799c4c909afd8e2a73a8d0b",
- "lang": "console",
- "found": [],
- "source": "POST /_forcemerge",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_forcemerge",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/forcemerge.asciidoc",
- "line": 178
- },
- "digest": "25ec4495a2f7bcbffb9cbdc6fb7eb07a",
- "lang": "console",
- "found": [],
- "source": "POST /.ds-logs-000001/_forcemerge?max_num_segments=1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/.ds-logs-000001/_forcemerge",
- "query": {
- "max_num_segments": "1"
- },
- "body": null,
- "params": {
- "index": ".ds-logs-000001"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/freeze.asciidoc",
- "line": 49
- },
- "digest": "ffea06f77c9df5720412aa06be964118",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_freeze\nPOST /my_index/_unfreeze",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_freeze",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.freeze"
- },
- {
- "method": "POST",
- "url": "/my_index/_unfreeze",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.unfreeze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 14
- },
- "digest": "02c9cadc657f6afd4ca854c577188d31",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_mapping/field/user",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_mapping/field/user",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "fields": "user"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 70
- },
- "digest": "f0f0f778e19134fbe3e4be98fc47bd34",
- "lang": "console",
- "found": [],
- "source": "PUT /publications\n{\n \"mappings\": {\n \"properties\": {\n \"id\": { \"type\": \"text\" },\n \"title\": { \"type\": \"text\"},\n \"abstract\": { \"type\": \"text\"},\n \"author\": {\n \"properties\": {\n \"id\": { \"type\": \"text\" },\n \"name\": { \"type\": \"text\" }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/publications",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "id": {
- "type": "text"
- },
- "title": {
- "type": "text"
- },
- "abstract": {
- "type": "text"
- },
- "author": {
- "properties": {
- "id": {
- "type": "text"
- },
- "name": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "publications"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 92
- },
- "digest": "299900fb08da80fe455cf3f1bb7d62ee",
- "lang": "console",
- "found": [],
- "source": "GET publications/_mapping/field/title",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/publications/_mapping/field/title",
- "query": null,
- "body": null,
- "params": {
- "index": "publications",
- "fields": "title"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 100
- },
- "digest": "22f71640207a2e3d4dd49aac36040ec8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"publications\": {\n \"mappings\": {\n \"title\": {\n \"full_name\": \"title\",\n \"mapping\": {\n \"title\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 125
- },
- "digest": "ed3bdf4d6799b43526851e92b6a60c55",
- "lang": "console",
- "found": [],
- "source": "GET publications/_mapping/field/author.id,abstract,name",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/publications/_mapping/field/author.id,abstract,name",
- "query": null,
- "body": null,
- "params": {
- "index": "publications",
- "fields": "author.id,abstract,name"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 133
- },
- "digest": "e7f96a786722ae6daca6f8bcc6cd90d1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"publications\": {\n \"mappings\": {\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 161
- },
- "digest": "b61afb7ca29a11243232ffcc8b5a43cf",
- "lang": "console",
- "found": [],
- "source": "GET publications/_mapping/field/a*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/publications/_mapping/field/a*",
- "query": null,
- "body": null,
- "params": {
- "index": "publications",
- "fields": "a*"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 169
- },
- "digest": "75311399baa651a6df82f8bf60aaec3a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"publications\": {\n \"mappings\": {\n \"author.name\": {\n \"full_name\": \"author.name\",\n \"mapping\": {\n \"name\": {\n \"type\": \"text\"\n }\n }\n },\n \"abstract\": {\n \"full_name\": \"abstract\",\n \"mapping\": {\n \"abstract\": {\n \"type\": \"text\"\n }\n }\n },\n \"author.id\": {\n \"full_name\": \"author.id\",\n \"mapping\": {\n \"id\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 222
- },
- "digest": "01b506b7f6e02d0f78280fd554b4a4db",
- "lang": "console",
- "found": [],
- "source": "GET /twitter,kimchy/_mapping/field/message",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter,kimchy/_mapping/field/message",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter,kimchy",
- "fields": "message"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 232
- },
- "digest": "646d71869f1a18c5bede7759559bfc47",
- "lang": "console",
- "found": [],
- "source": "GET /_all/_mapping/field/message",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_all/_mapping/field/message",
- "query": null,
- "body": null,
- "params": {
- "index": "_all",
- "fields": "message"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-field-mapping.asciidoc",
- "line": 241
- },
- "digest": "dbdd58cdeac9ef20b42ff73e4864e697",
- "lang": "console",
- "found": [],
- "source": "GET /_all/_mapping/field/*.id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_all/_mapping/field/*.id",
- "query": null,
- "body": null,
- "params": {
- "index": "_all",
- "fields": "*.id"
- },
- "api": "indices.get_field_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index.asciidoc",
- "line": 11
- },
- "digest": "be8f28f31207b173de61be032fcf239c",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /twitter",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 12
- },
- "digest": "265ba62e416d27b3408fb8a2f698627d",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_alias/alias1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_alias/alias1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "name": "alias1"
- },
- "api": "indices.get_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 76
- },
- "digest": "8118bad980d7afd31677b5060361ecd2",
- "lang": "console",
- "found": [],
- "source": "PUT /logs_20302801\n{\n \"aliases\" : {\n \"current_day\" : {},\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\"year\" : 2030 }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs_20302801",
- "query": null,
- "body": {
- "aliases": {
- "2030": {
- "filter": {
- "term": {
- "year": 2030
- }
- }
- },
- "current_day": {}
- }
- },
- "params": {
- "index": "logs_20302801"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 94
- },
- "digest": "e85f2b38878f745a16edc575e78d7cde",
- "lang": "console",
- "found": [],
- "source": "GET /logs_20302801/_alias/*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logs_20302801/_alias/*",
- "query": null,
- "body": null,
- "params": {
- "index": "logs_20302801",
- "name": "*"
- },
- "api": "indices.get_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 102
- },
- "digest": "1ece6831c3863087f258493460d49d63",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"logs_20302801\" : {\n \"aliases\" : {\n \"current_day\" : {\n },\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\n \"year\" : 2030\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 127
- },
- "digest": "a71c929ed2e322f91092d5dc625b6440",
- "lang": "console",
- "found": [],
- "source": "GET /_alias/2030",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_alias/2030",
- "query": null,
- "body": null,
- "params": {
- "name": "2030"
- },
- "api": "indices.get_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 135
- },
- "digest": "26b770c1281d844f7344f17413d26208",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"logs_20302801\" : {\n \"aliases\" : {\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\n \"year\" : 2030\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 158
- },
- "digest": "56aa1bff647d1db49dabf175c1e56919",
- "lang": "console",
- "found": [],
- "source": "GET /_alias/20*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_alias/20*",
- "query": null,
- "body": null,
- "params": {
- "name": "20*"
- },
- "api": "indices.get_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-alias.asciidoc",
- "line": 166
- },
- "digest": "26b770c1281d844f7344f17413d26208",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"logs_20302801\" : {\n \"aliases\" : {\n \"2030\" : {\n \"filter\" : {\n \"term\" : {\n \"year\" : 2030\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/get-settings.asciidoc",
- "line": 11
- },
- "digest": "20bdfd960e8d76c4329269e237792eb7",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_settings",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_settings",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-settings.asciidoc",
- "line": 73
- },
- "digest": "c538fc182f433e7141aee9d75c3e42d2",
- "lang": "console",
- "found": [],
- "source": "GET /twitter,kimchy/_settings\n\nGET /_all/_settings\n\nGET /log_2013_*/_settings",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter,kimchy/_settings",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter,kimchy"
- },
- "api": "indices.get_settings"
- },
- {
- "method": "GET",
- "url": "/_all/_settings",
- "query": null,
- "body": null,
- "params": {
- "index": "_all"
- },
- "api": "indices.get_settings"
- },
- {
- "method": "GET",
- "url": "/log_2013_*/_settings",
- "query": null,
- "body": null,
- "params": {
- "index": "log_2013_*"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-settings.asciidoc",
- "line": 89
- },
- "digest": "9748682dcfb24b7d4893f534f7040370",
- "lang": "console",
- "found": [],
- "source": "GET /log_2013_-*/_settings/index.number_*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/log_2013_-*/_settings/index.number_*",
- "query": null,
- "body": null,
- "params": {
- "index": "log_2013_-*",
- "name": "index.number_*"
- },
- "api": "indices.get_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index-template.asciidoc",
- "line": 31
- },
- "digest": "02f65c6bab8f40bf3ce18160623d1870",
- "lang": "console",
- "found": [],
- "source": "GET /_template/template_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index-template.asciidoc",
- "line": 69
- },
- "digest": "24aee6033bf77a68ced74e3fd9d34283",
- "lang": "console",
- "found": [],
- "source": "GET /_template/template_1,template_2",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/template_1,template_2",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1,template_2"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index-template.asciidoc",
- "line": 78
- },
- "digest": "ba6040de55afb2c8fb9e5b24bb038820",
- "lang": "console",
- "found": [],
- "source": "GET /_template/temp*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/temp*",
- "query": null,
- "body": null,
- "params": {
- "name": "temp*"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-index-template.asciidoc",
- "line": 87
- },
- "digest": "fd2d289e6b725fcc3cbe8fe7ffe02ea0",
- "lang": "console",
- "found": [],
- "source": "GET /_template",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-mapping.asciidoc",
- "line": 11
- },
- "digest": "a8fba09a46b2c3524428aa3259b7124f",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /twitter/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-mapping.asciidoc",
- "line": 68
- },
- "digest": "cf02e3d8b371bd59f0224967c36330da",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /twitter,kimchy/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter,kimchy/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter,kimchy"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/get-mapping.asciidoc",
- "line": 78
- },
- "digest": "5b7d6f1db88ca6f42c48fa3dbb4341e8",
- "lang": "console",
- "found": [],
- "source": "GET /*/_mapping\n\nGET /_all/_mapping\n\nGET /_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/*/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "*"
- },
- "api": "indices.get_mapping"
- },
- {
- "method": "GET",
- "url": "/_all/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "_all"
- },
- "api": "indices.get_mapping"
- },
- {
- "method": "GET",
- "url": "/_mapping",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/alias-exists.asciidoc",
- "line": 12
- },
- "digest": "83e388644f60178c8de0d0e4247ee4c6",
- "lang": "console",
- "found": [],
- "source": "HEAD /_alias/alias1",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/_alias/alias1",
- "query": null,
- "body": null,
- "params": {
- "name": "alias1"
- },
- "api": "indices.exists_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/alias-exists.asciidoc",
- "line": 62
- },
- "digest": "666785827827be4b5252ec859c354d30",
- "lang": "console",
- "found": [],
- "source": "HEAD /_alias/2030\nHEAD /_alias/20*\nHEAD /logs_20302801/_alias/*",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/_alias/2030",
- "query": null,
- "body": null,
- "params": {
- "name": "2030"
- },
- "api": "indices.exists_alias"
- },
- {
- "method": "HEAD",
- "url": "/_alias/20*",
- "query": null,
- "body": null,
- "params": {
- "name": "20*"
- },
- "api": "indices.exists_alias"
- },
- {
- "method": "HEAD",
- "url": "/logs_20302801/_alias/*",
- "query": null,
- "body": null,
- "params": {
- "index": "logs_20302801",
- "name": "*"
- },
- "api": "indices.exists_alias"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/indices-exists.asciidoc",
- "line": 12
- },
- "digest": "22b6176a55b7884c247e30fb0899be5d",
- "lang": "console",
- "found": [],
- "source": "HEAD /twitter",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/twitter",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.exists"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 13
- },
- "digest": "499e9bdf7848fd4de33b6f2bd8a6b1f2",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_recovery",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_recovery",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 177
- },
- "digest": "13ebcb01ebf1b5d2b5c52739db47e30c",
- "lang": "console",
- "found": [],
- "source": "GET index1,index2/_recovery?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index1,index2/_recovery",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "index": "index1,index2"
- },
- "api": "indices.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 232
- },
- "digest": "5dfb23f6e36ef484f1d3271bae76a8d1",
- "lang": "console",
- "found": [],
- "source": "GET /_recovery?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_recovery",
- "query": {
- "human": true
- },
- "body": null,
- "params": null,
- "api": "indices.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 240
- },
- "digest": "dd4b03536a1d0fba1aafc9ad48b24f23",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"SNAPSHOT\",\n \"stage\" : \"INDEX\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:15:59.716\",\n \"start_time_in_millis\": 1393244159716,\n \"stop_time\" : \"0s\",\n \"stop_time_in_millis\" : 0,\n \"total_time\" : \"2.9m\",\n \"total_time_in_millis\" : 175576,\n \"source\" : {\n \"repository\" : \"my_repository\",\n \"snapshot\" : \"my_snapshot\",\n \"index\" : \"index1\",\n \"version\" : \"{version}\",\n \"restoreUUID\": \"PDh1ZAOaRbiGIVtCvZOMww\"\n },\n \"target\" : {\n \"id\" : \"ryqJ5lO5S4-lSFbGntkEkg\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"75.4mb\",\n \"total_in_bytes\" : 79063092,\n \"reused\" : \"0b\",\n \"reused_in_bytes\" : 0,\n \"recovered\" : \"65.7mb\",\n \"recovered_in_bytes\" : 68891939,\n \"percent\" : \"87.1%\"\n },\n \"files\" : {\n \"total\" : 73,\n \"reused\" : 0,\n \"recovered\" : 69,\n \"percent\" : \"94.5%\"\n },\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 0,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0,\n },\n \"verify_index\" : {\n \"check_index_time\" : \"0s\",\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0\n }\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 332
- },
- "digest": "5619103306878d58a058bce87c5bd82b",
- "lang": "console",
- "found": [],
- "source": "GET _recovery?human&detailed=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_recovery",
- "query": {
- "human": true,
- "detailed": "true"
- },
- "body": null,
- "params": null,
- "api": "indices.recovery"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/recovery.asciidoc",
- "line": 340
- },
- "digest": "2eadd303fba0f73acbf689c6ae69bfe8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\" : \"STORE\",\n \"stage\" : \"DONE\",\n \"primary\" : true,\n \"start_time\" : \"2014-02-24T12:38:06.349\",\n \"start_time_in_millis\" : \"1393245486349\",\n \"stop_time\" : \"2014-02-24T12:38:08.464\",\n \"stop_time_in_millis\" : \"1393245488464\",\n \"total_time\" : \"2.1s\",\n \"total_time_in_millis\" : 2115,\n \"source\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"target\" : {\n \"id\" : \"RGMdRc-yQWWKIBM4DGvwqQ\",\n \"host\" : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" : \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" : {\n \"size\" : {\n \"total\" : \"24.7mb\",\n \"total_in_bytes\" : 26001617,\n \"reused\" : \"24.7mb\",\n \"reused_in_bytes\" : 26001617,\n \"recovered\" : \"0b\",\n \"recovered_in_bytes\" : 0,\n \"percent\" : \"100.0%\"\n },\n \"files\" : {\n \"total\" : 26,\n \"reused\" : 26,\n \"recovered\" : 0,\n \"percent\" : \"100.0%\",\n \"details\" : [ {\n \"name\" : \"segments.gen\",\n \"length\" : 20,\n \"recovered\" : 20\n }, {\n \"name\" : \"_0.cfs\",\n \"length\" : 135306,\n \"recovered\" : 135306\n }, {\n \"name\" : \"segments_2\",\n \"length\" : 251,\n \"recovered\" : 251\n }\n ]\n },\n \"total_time\" : \"2ms\",\n \"total_time_in_millis\" : 2,\n \"source_throttle_time\" : \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\" : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"translog\" : {\n \"recovered\" : 71,\n \"total\" : 0,\n \"percent\" : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"2.0s\",\n \"total_time_in_millis\" : 2025\n },\n \"verify_index\" : {\n \"check_index_time\" : 0,\n \"check_index_time_in_millis\" : 0,\n \"total_time\" : \"88ms\",\n \"total_time_in_millis\" : 88\n }\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 12
- },
- "digest": "3f176d802b3e2964686ecd91748fab89",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_segments",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_segments",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 115
- },
- "digest": "940e8c2c7ff92d71f489bdb7183c1ce6",
- "lang": "console",
- "found": [],
- "source": "GET /test/_segments",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_segments",
- "query": null,
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 124
- },
- "digest": "975b4b92464d52068516aa2f0f955cc1",
- "lang": "console",
- "found": [],
- "source": "GET /test1,test2/_segments",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test1,test2/_segments",
- "query": null,
- "body": null,
- "params": {
- "index": "test1,test2"
- },
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 133
- },
- "digest": "6414b9276ba1c63898c3ff5cbe03c54e",
- "lang": "console",
- "found": [],
- "source": "GET /_segments",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_segments",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/segments.asciidoc",
- "line": 193
- },
- "digest": "1b21d886f6e9619c73079d14581ccbe4",
- "lang": "console",
- "found": [],
- "source": "GET /test/_segments?verbose=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_segments",
- "query": {
- "verbose": "true"
- },
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.segments"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 13
- },
- "digest": "45a023986499436a9153eef87788ab82",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_shard_stores",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_shard_stores",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 102
- },
- "digest": "cd93919e13f656ad2e6629f45c579b93",
- "lang": "console",
- "found": [],
- "source": "GET /test/_shard_stores",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_shard_stores",
- "query": null,
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 112
- },
- "digest": "af970eb8b93cdea52209e1256eba9d8c",
- "lang": "console",
- "found": [],
- "source": "GET /test1,test2/_shard_stores",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test1,test2/_shard_stores",
- "query": null,
- "body": null,
- "params": {
- "index": "test1,test2"
- },
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 122
- },
- "digest": "00b3b6d76a368ae71277ea24af318693",
- "lang": "console",
- "found": [],
- "source": "GET /_shard_stores",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_shard_stores",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 138
- },
- "digest": "3545261682af72f4bee57f2bac0a9590",
- "lang": "console",
- "found": [],
- "source": "GET /_shard_stores?status=green",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_shard_stores",
- "query": {
- "status": "green"
- },
- "body": null,
- "params": null,
- "api": "indices.shard_stores"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shard-stores.asciidoc",
- "line": 147
- },
- "digest": "28fae40eedf82058ab062d52776c62dc",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"my-index\": {\n \"shards\": {\n \"0\": { <1>\n \"stores\": [ <2>\n {\n \"sPa3OgxLSYGvQ4oPs-Tajw\": { <3>\n \"name\": \"node_t0\",\n \"ephemeral_id\" : \"9NlXRFGCT1m8tkvYCMK-8A\",\n \"transport_address\": \"local[1]\",\n \"attributes\": {}\n },\n \"allocation_id\": \"2iNySv_OQVePRX-yaRH_lQ\", <4>\n \"allocation\" : \"primary|replica|unused\" <5>\n \"store_exception\": ... <6>\n }\n ]\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 11
- },
- "digest": "fce5d68a9ac1b34b59d5308b65688e59",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_stats",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 102
- },
- "digest": "e0b2f56c34e33ff52f8f9658be2f7ca1",
- "lang": "console",
- "found": [],
- "source": "GET /index1,index2/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/index1,index2/_stats",
- "query": null,
- "body": null,
- "params": {
- "index": "index1,index2"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 112
- },
- "digest": "78c4035e4fbf6851140660f6ed2a1fa5",
- "lang": "console",
- "found": [],
- "source": "GET /_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 126
- },
- "digest": "a861a89f52008610e813b9f073951c58",
- "lang": "console",
- "found": [],
- "source": "GET /_stats/merge,refresh",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats/merge,refresh",
- "query": null,
- "body": null,
- "params": {
- "metric": "merge,refresh"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/stats.asciidoc",
- "line": 140
- },
- "digest": "7a8de5606f283f4ef171b015eef6befa",
- "lang": "console",
- "found": [],
- "source": "GET /_stats/search?groups=group1,group2",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_stats/search",
- "query": {
- "groups": "group1,group2"
- },
- "body": null,
- "params": {
- "metric": "search"
- },
- "api": "indices.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/template-exists.asciidoc",
- "line": 12
- },
- "digest": "a6be6c1cb4a556866fdccb0dee2f1dea",
- "lang": "console",
- "found": [],
- "source": "HEAD /_template/template_1",
- "parsed_source": [
- {
- "method": "HEAD",
- "url": "/_template/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.exists_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/open-close.asciidoc",
- "line": 11
- },
- "digest": "7f36828a03e8cb5a028d9a6efb056b88",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_open",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_open",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.open"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/open-close.asciidoc",
- "line": 122
- },
- "digest": "37e6177bf8803971d30a4252498c07a4",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_open",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_open",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.open"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/open-close.asciidoc",
- "line": 130
- },
- "digest": "6f13fc8af8ddb33c5f00d22ab4cf79ea",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 34
- },
- "digest": "45266650464f16bc156b9057b733a522",
- "lang": "console",
- "found": [],
- "source": "PUT _component_template/component_template1\n{\n \"template\": {\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n }\n}\n\nPUT _component_template/other_component_template\n{\n \"template\": {\n \"mappings\": {\n \"properties\": {\n \"ip_address\": {\n \"type\": \"ip\"\n }\n }\n }\n }\n}\n\nPUT _index_template/template_1\n{\n \"index_patterns\": [\"te*\", \"bar*\"],\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n },\n \"aliases\": {\n \"mydata\": { }\n }\n },\n \"priority\": 10,\n \"composed_of\": [\"component_template1\", \"other_component_template\"],\n \"version\": 3,\n \"_meta\": {\n \"description\": \"my custom\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_component_template/component_template1",
- "query": null,
- "body": {
- "template": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- }
- }
- },
- "params": {
- "name": "component_template1"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_component_template/other_component_template",
- "query": null,
- "body": {
- "template": {
- "mappings": {
- "properties": {
- "ip_address": {
- "type": "ip"
- }
- }
- }
- }
- },
- "params": {
- "name": "other_component_template"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_index_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "te*",
- "bar*"
- ],
- "template": {
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "_source": {
- "enabled": false
- },
- "properties": {
- "host_name": {
- "type": "keyword"
- },
- "created_at": {
- "type": "date",
- "format": "EEE MMM dd HH:mm:ss Z yyyy"
- }
- }
- },
- "aliases": {
- "mydata": {}
- }
- },
- "priority": 10,
- "composed_of": [
- "component_template1",
- "other_component_template"
- ],
- "version": 3,
- "_meta": {
- "description": "my custom"
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 117
- },
- "digest": "0ac2b0c0cbc8e7799c031b019378bfa9",
- "lang": "console",
- "found": [],
- "source": "POST /_index_template/_simulate_index/myindex",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_index_template/_simulate_index/myindex",
- "query": null,
- "body": null,
- "params": {
- "name": "myindex"
- },
- "api": "indices.simulate_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 124
- },
- "digest": "58581b5088a9cf842241b6c6a561b5cf",
- "lang": "console",
- "found": [],
- "source": "POST /_index_template/_simulate/template_1\n\nPOST /_index_template/_simulate\n{\n \"index_patterns\": [\"foo\"],\n \"template\": {\n \"settings\": {\n \"number_of_replicas\": 0\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_index_template/_simulate/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.simulate_template"
- },
- {
- "method": "POST",
- "url": "/_index_template/_simulate",
- "query": null,
- "body": {
- "index_patterns": [
- "foo"
- ],
- "template": {
- "settings": {
- "number_of_replicas": 0
- }
- }
- },
- "params": null,
- "api": "indices.simulate_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 142
- },
- "digest": "7d12d490a817493a06146081adee1a18",
- "lang": "console",
- "found": [],
- "source": "PUT /_component_template/ct1 <1>\n{\n \"template\": {\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n }\n}\n\nPUT /_component_template/ct2 <2>\n{\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n }\n}\n\nPUT /_index_template/final-template <3>\n{\n \"index_patterns\": [\"logdata-*\"],\n \"composed_of\": [\"ct1\", \"ct2\"],\n \"priority\": 5\n}\n\nPOST /_index_template/_simulate_index/logdata-2019-02-01 <4>\n\nPOST /_index_template/_simulate/final-template <5>\n\nPOST /_index_template/_simulate <6>\n{\n \"index_patterns\": [\"logdata-*\"],\n \"composed_of\": [\"ct2\"],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_component_template/ct1",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "index.number_of_shards": 2
- }
- }
- },
- "params": {
- "name": "ct1"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_component_template/ct2",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "index.number_of_replicas": 0
- },
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- }
- }
- },
- "params": {
- "name": "ct2"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_index_template/final-template",
- "query": null,
- "body": {
- "index_patterns": [
- "logdata-*"
- ],
- "composed_of": [
- "ct1",
- "ct2"
- ],
- "priority": 5
- },
- "params": {
- "name": "final-template"
- },
- "api": "indices.put_index_template"
- },
- {
- "method": "POST",
- "url": "/_index_template/_simulate_index/logdata-2019-02-01",
- "query": null,
- "body": null,
- "params": {
- "name": "logdata-2019-02-01"
- },
- "api": "indices.simulate_index_template"
- },
- {
- "method": "POST",
- "url": "/_index_template/_simulate/final-template",
- "query": null,
- "body": null,
- "params": {
- "name": "final-template"
- },
- "api": "indices.simulate_template"
- },
- {
- "method": "POST",
- "url": "/_index_template/_simulate",
- "query": null,
- "body": {
- "index_patterns": [
- "logdata-*"
- ],
- "composed_of": [
- "ct2"
- ],
- "priority": 10,
- "template": {
- "settings": {
- "index.number_of_replicas": 1
- }
- }
- },
- "params": null,
- "api": "indices.simulate_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 201
- },
- "digest": "60ebb123271feaf1c20e442dea687d80",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_replicas\" : \"1\" <1>\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : { <2>\n \"type\" : \"date\"\n }\n }\n },\n \"aliases\" : { }\n },\n \"overlapping\" : [ <3>\n {\n \"name\" : \"final-template\",\n \"index_patterns\" : [\n \"logdata-*\"\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 244
- },
- "digest": "73ecdaeca5885a88f9a4273a462196d0",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/template_1\n{\n \"index_patterns\" : [\"te*\"],\n \"priority\" : 1,\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "te*"
- ],
- "priority": 1,
- "template": {
- "settings": {
- "number_of_shards": 2
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 348
- },
- "digest": "ed8ad81604137f4cc8757bb74636b8b4",
- "lang": "console",
- "found": [],
- "source": "PUT _index_template/template_1\n{\n \"index_patterns\" : [\"te*\"],\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"aliases\" : {\n \"alias1\" : {},\n \"alias2\" : {\n \"filter\" : {\n \"term\" : {\"user\" : \"kimchy\" }\n },\n \"routing\" : \"kimchy\"\n },\n \"{index}-alias\" : {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "te*"
- ],
- "template": {
- "settings": {
- "number_of_shards": 1
- },
- "aliases": {
- "alias1": {},
- "alias2": {
- "filter": {
- "term": {
- "user": "kimchy"
- }
- },
- "routing": "kimchy"
- },
- "{index}-alias": {}
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 380
- },
- "digest": "62083da06c2cd4b4b62290eda1ec93e0",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/template_1\n{\n \"index_patterns\" : [\"t*\"],\n \"priority\" : 0,\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 1,\n \"number_of_replicas\": 0\n },\n \"mappings\" : {\n \"_source\" : { \"enabled\" : false }\n }\n }\n}\n\nPUT /_index_template/template_2\n{\n \"index_patterns\" : [\"te*\"],\n \"priority\" : 1,\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 2\n },\n \"mappings\" : {\n \"_source\" : { \"enabled\" : true }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "t*"
- ],
- "priority": 0,
- "template": {
- "settings": {
- "number_of_shards": 1,
- "number_of_replicas": 0
- },
- "mappings": {
- "_source": {
- "enabled": false
- }
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_index_template"
- },
- {
- "method": "PUT",
- "url": "/_index_template/template_2",
- "query": null,
- "body": {
- "index_patterns": [
- "te*"
- ],
- "priority": 1,
- "template": {
- "settings": {
- "number_of_shards": 2
- },
- "mappings": {
- "_source": {
- "enabled": true
- }
- }
- }
- },
- "params": {
- "name": "template_2"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 430
- },
- "digest": "9138550002cb26ab64918cce427963b8",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/template_1\n{\n \"index_patterns\" : [\"foo\", \"bar\"],\n \"priority\" : 0,\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 1\n }\n },\n \"version\": 123\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "foo",
- "bar"
- ],
- "priority": 0,
- "template": {
- "settings": {
- "number_of_shards": 1
- }
- },
- "version": 123
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 458
- },
- "digest": "0d8063b484a18f8672fb5ed8712c5c97",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/template_1\n{\n \"index_patterns\": [\"foo\", \"bar\"],\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 3\n }\n },\n \"_meta\": {\n \"description\": \"set number of shards to three\",\n \"serialization\": {\n \"class\": \"MyIndexTemplate\",\n \"id\": 17\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "foo",
- "bar"
- ],
- "template": {
- "settings": {
- "number_of_shards": 3
- }
- },
- "_meta": {
- "description": "set number of shards to three",
- "serialization": {
- "class": "MyIndexTemplate",
- "id": 17
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 486
- },
- "digest": "fb76efee915e99faf507f69e1f5d3d8f",
- "lang": "console",
- "found": [],
- "source": "PUT /_index_template/template_1\n{\n \"index_patterns\": [\"logs-*\"],\n \"template\": {\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n },\n \"data_stream\": {}\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "logs-*"
- ],
- "template": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- }
- },
- "data_stream": {}
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 513
- },
- "digest": "cd38c601ab293a6ec0e2df71d0c96b58",
- "lang": "console",
- "found": [],
- "source": "PUT /_component_template/template_with_2_shards\n{\n \"template\": {\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n }\n}\n\nPUT /_component_template/template_with_3_shards\n{\n \"template\": {\n \"settings\": {\n \"index.number_of_shards\": 3\n }\n }\n}\n\nPUT /_index_template/template_1\n{\n \"index_patterns\": [\"t*\"],\n \"composed_of\": [\"template_with_2_shards\", \"template_with_3_shards\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_component_template/template_with_2_shards",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "index.number_of_shards": 2
- }
- }
- },
- "params": {
- "name": "template_with_2_shards"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_component_template/template_with_3_shards",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "index.number_of_shards": 3
- }
- }
- },
- "params": {
- "name": "template_with_3_shards"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_index_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "t*"
- ],
- "composed_of": [
- "template_with_2_shards",
- "template_with_3_shards"
- ]
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 551
- },
- "digest": "3759ca688c4bd3c838780a9aad63258b",
- "lang": "console",
- "found": [],
- "source": "GET /_index_template/template_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_index_template/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.get_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 587
- },
- "digest": "275ec358d5d1e4b9ff06cb4ae7e47650",
- "lang": "console",
- "found": [],
- "source": "GET /_index_template/temp*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_index_template/temp*",
- "query": null,
- "body": null,
- "params": {
- "name": "temp*"
- },
- "api": "indices.get_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/index-templates.asciidoc",
- "line": 596
- },
- "digest": "3b40db1c5c6b36f087d7a09a4ce285c6",
- "lang": "console",
- "found": [],
- "source": "GET /_index_template",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_index_template",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.get_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/component-templates.asciidoc",
- "line": 12
- },
- "digest": "e784fc00894635470adfd78a0c46b427",
- "lang": "console",
- "found": [],
- "source": "PUT _component_template/template_1\n{\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_component_template/template_1",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "_source": {
- "enabled": false
- },
- "properties": {
- "host_name": {
- "type": "keyword"
- },
- "created_at": {
- "type": "date",
- "format": "EEE MMM dd HH:mm:ss Z yyyy"
- }
- }
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "cluster.put_component_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/component-templates.asciidoc",
- "line": 127
- },
- "digest": "07694ab6343fcb4fea2859d17ae5ae7e",
- "lang": "console",
- "found": [],
- "source": "PUT _component_template/template_1\n{\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"aliases\" : {\n \"alias1\" : {},\n \"alias2\" : {\n \"filter\" : {\n \"term\" : {\"user\" : \"kimchy\" }\n },\n \"routing\" : \"kimchy\"\n },\n \"{index}-alias\" : {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_component_template/template_1",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "number_of_shards": 1
- },
- "aliases": {
- "alias1": {},
- "alias2": {
- "filter": {
- "term": {
- "user": "kimchy"
- }
- },
- "routing": "kimchy"
- },
- "{index}-alias": {}
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "cluster.put_component_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/component-templates.asciidoc",
- "line": 168
- },
- "digest": "c6339d09f85000a6432304b0ec63b8f6",
- "lang": "console",
- "found": [],
- "source": "PUT /_component_template/template_1\n{\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 1\n }\n },\n \"version\": 123\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_component_template/template_1",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "number_of_shards": 1
- }
- },
- "version": 123
- },
- "params": {
- "name": "template_1"
- },
- "api": "cluster.put_component_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/component-templates.asciidoc",
- "line": 194
- },
- "digest": "5b2a13366bd4e1ab4b25d04d360570dc",
- "lang": "console",
- "found": [],
- "source": "PUT /_component_template/template_1\n{\n \"template\": {\n \"settings\" : {\n \"number_of_shards\" : 1\n }\n },\n \"_meta\": {\n \"description\": \"set number of shards to one\",\n \"serialization\": {\n \"class\": \"MyComponentTemplate\",\n \"id\": 10\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_component_template/template_1",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "number_of_shards": 1
- }
- },
- "_meta": {
- "description": "set number of shards to one",
- "serialization": {
- "class": "MyComponentTemplate",
- "id": 10
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "cluster.put_component_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/component-templates.asciidoc",
- "line": 223
- },
- "digest": "827b7e9308ea288f18aea00a5accc38e",
- "lang": "console",
- "found": [],
- "source": "GET /_component_template/template_1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_component_template/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "cluster.get_component_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/component-templates.asciidoc",
- "line": 259
- },
- "digest": "6c72460570307f23478100db04a84c8e",
- "lang": "console",
- "found": [],
- "source": "GET /_component_template/temp*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_component_template/temp*",
- "query": null,
- "body": null,
- "params": {
- "name": "temp*"
- },
- "api": "cluster.get_component_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/component-templates.asciidoc",
- "line": 268
- },
- "digest": "dd4f051ab62f0507e3b6e3d6f333e85f",
- "lang": "console",
- "found": [],
- "source": "GET /_component_template",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_component_template",
- "query": null,
- "body": null,
- "params": null,
- "api": "cluster.get_component_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 20
- },
- "digest": "e5f50b31f165462d883ecbff45f74985",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT _template/template_1\n{\n \"index_patterns\": [\"te*\", \"bar*\"],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "te*",
- "bar*"
- ],
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "_source": {
- "enabled": false
- },
- "properties": {
- "host_name": {
- "type": "keyword"
- },
- "created_at": {
- "type": "date",
- "format": "EEE MMM dd HH:mm:ss Z yyyy"
- }
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 146
- },
- "digest": "1b8caf0a6741126c6d0ad83b56fce290",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT _template/template_1\n{\n \"index_patterns\" : [\"te*\"],\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"aliases\" : {\n \"alias1\" : {},\n \"alias2\" : {\n \"filter\" : {\n \"term\" : {\"user\" : \"kimchy\" }\n },\n \"routing\" : \"kimchy\"\n },\n \"{index}-alias\" : {} <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "te*"
- ],
- "settings": {
- "number_of_shards": 1
- },
- "aliases": {
- "alias1": {},
- "alias2": {
- "filter": {
- "term": {
- "user": "kimchy"
- }
- },
- "routing": "kimchy"
- },
- "{index}-alias": {}
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 180
- },
- "digest": "9efac5b23bf23de8d81a7455905e2979",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT /_template/template_1\n{\n \"index_patterns\" : [\"te*\"],\n \"order\" : 0,\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"mappings\" : {\n \"_source\" : { \"enabled\" : false }\n }\n}\n\nPUT /_template/template_2\n{\n \"index_patterns\" : [\"tes*\"],\n \"order\" : 1,\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"mappings\" : {\n \"_source\" : { \"enabled\" : true }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "te*"
- ],
- "order": 0,
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "_source": {
- "enabled": false
- }
- }
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_template"
- },
- {
- "method": "PUT",
- "url": "/_template/template_2",
- "query": null,
- "body": {
- "index_patterns": [
- "tes*"
- ],
- "order": 1,
- "settings": {
- "number_of_shards": 1
- },
- "mappings": {
- "_source": {
- "enabled": true
- }
- }
- },
- "params": {
- "name": "template_2"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 231
- },
- "digest": "8dcc74dc01f26e853e3b3dfa458b1ad7",
- "lang": "console",
- "found": [
- "ruby"
- ],
- "source": "PUT /_template/template_1\n{\n \"index_patterns\" : [\"myindex-*\"],\n \"order\" : 0,\n \"settings\" : {\n \"number_of_shards\" : 1\n },\n \"version\": 123\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_template/template_1",
- "query": null,
- "body": {
- "index_patterns": [
- "myindex-*"
- ],
- "order": 0,
- "settings": {
- "number_of_shards": 1
- },
- "version": 123
- },
- "params": {
- "name": "template_1"
- },
- "api": "indices.put_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 249
- },
- "digest": "46658f00edc4865dfe472a392374cd0f",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_template/template_1?filter_path=*.version",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_template/template_1",
- "query": {
- "filter_path": "*.version"
- },
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.get_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/templates.asciidoc",
- "line": 257
- },
- "digest": "a2e618c0a7ef9368e0b39e7ece15e27e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template_1\" : {\n \"version\" : 123\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 13
- },
- "digest": "5be23858b35043fcb7b50fe36b873e6e",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter/_mapping\n{\n \"properties\": {\n \"email\": {\n \"type\": \"keyword\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_mapping",
- "query": null,
- "body": {
- "properties": {
- "email": {
- "type": "keyword"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 89
- },
- "digest": "12433d2b637d002e8d5c9a1adce69d3b",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /publications",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/publications",
- "query": null,
- "body": null,
- "params": {
- "index": "publications"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 97
- },
- "digest": "e4be53736bcc02b03068fd72fdbfe271",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /publications/_mapping\n{\n \"properties\": {\n \"title\": { \"type\": \"text\"}\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/publications/_mapping",
- "query": null,
- "body": {
- "properties": {
- "title": {
- "type": "text"
- }
- }
- },
- "params": {
- "index": "publications"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 114
- },
- "digest": "1da77e114459e0b77d78a3dcc8fae429",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "# Create the two indices\nPUT /twitter-1\nPUT /twitter-2\n\n# Update both mappings\nPUT /twitter-1,twitter-2/_mapping <1>\n{\n \"properties\": {\n \"user_name\": {\n \"type\": \"text\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter-1",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter-1"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/twitter-2",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter-2"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/twitter-1,twitter-2/_mapping",
- "query": null,
- "body": {
- "properties": {
- "user_name": {
- "type": "text"
- }
- }
- },
- "params": {
- "index": "twitter-1,twitter-2"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 149
- },
- "digest": "d9474f66970c6955e24b17c7447e7b5f",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"name\": {\n \"properties\": {\n \"first\": {\n \"type\": \"text\"\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "name": {
- "properties": {
- "first": {
- "type": "text"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 171
- },
- "digest": "0bbd30b9be3e54ff3028b9f4459634d2",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index/_mapping\n{\n \"properties\": {\n \"name\": {\n \"properties\": {\n \"last\": {\n \"type\": \"text\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "name": {
- "properties": {
- "last": {
- "type": "text"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 191
- },
- "digest": "210cf5c76bff517f48e80fa1c2d63907",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /my_index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 199
- },
- "digest": "d83da92e13032bf4a494dd5a7464e74f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"name\" : {\n \"properties\" : {\n \"first\" : {\n \"type\" : \"text\"\n },\n \"last\" : {\n \"type\" : \"text\"\n }\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 239
- },
- "digest": "c849c6c8f8659dbb93e1c14356f74e37",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"city\": {\n \"type\": \"text\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "city": {
- "type": "text"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 262
- },
- "digest": "5f3a3eefeefe6fa85ec49d499212d245",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index/_mapping\n{\n \"properties\": {\n \"city\": {\n \"type\": \"text\",\n \"fields\": {\n \"raw\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "city": {
- "type": "text",
- "fields": {
- "raw": {
- "type": "keyword"
- }
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 283
- },
- "digest": "210cf5c76bff517f48e80fa1c2d63907",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /my_index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 291
- },
- "digest": "68663da99beea30da47298a1762b5793",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"city\" : {\n \"type\" : \"text\",\n \"fields\" : {\n \"raw\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 332
- },
- "digest": "1f6fe6833686e38c3711c6f2aa00a078",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"user_id\": {\n \"type\": \"keyword\",\n \"ignore_above\": 20\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "keyword",
- "ignore_above": 20
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 351
- },
- "digest": "17de0020b228df961ad3c6b06233c948",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index/_mapping\n{\n \"properties\": {\n \"user_id\": {\n \"type\": \"keyword\",\n \"ignore_above\": 100\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "user_id": {
- "type": "keyword",
- "ignore_above": 100
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 368
- },
- "digest": "210cf5c76bff517f48e80fa1c2d63907",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /my_index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 376
- },
- "digest": "1d15d98aff2f885e3a59831d50184fb0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"user_id\" : {\n \"type\" : \"keyword\",\n \"ignore_above\" : 100\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 417
- },
- "digest": "bd5918ab903c0889bb1f09c8c2466e43",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /users\n{\n \"mappings\" : {\n \"properties\": {\n \"user_id\": {\n \"type\": \"long\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/users",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "users"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 435
- },
- "digest": "0989cc65d8924f666ce3eb0820d2d244",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /users/_doc?refresh=wait_for\n{\n \"user_id\" : 12345\n}\n\nPOST /users/_doc?refresh=wait_for\n{\n \"user_id\" : 12346\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/users/_doc",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "user_id": 12345
- },
- "params": {
- "index": "users"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/users/_doc",
- "query": {
- "refresh": "wait_for"
- },
- "body": {
- "user_id": 12346
- },
- "params": {
- "index": "users"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 454
- },
- "digest": "734c2e2a1e45b84f1e4e65b51356fcd7",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /new_users\n{\n \"mappings\" : {\n \"properties\": {\n \"user_id\": {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/new_users",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_id": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "new_users"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 473
- },
- "digest": "53d938c754f36a912fcbe6473abb463f",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_reindex\n{\n \"source\": {\n \"index\": \"users\"\n },\n \"dest\": {\n \"index\": \"new_users\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_reindex",
- "query": null,
- "body": {
- "source": {
- "index": "users"
- },
- "dest": {
- "index": "new_users"
- }
- },
- "params": null,
- "api": "reindex"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 489
- },
- "digest": "fbcbfd34d560a2b4b46ce04d8716510d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 147,\n \"timed_out\": false,\n \"total\": 2,\n \"updated\": 0,\n \"created\": 2,\n \"deleted\": 0,\n \"batches\": 1,\n \"version_conflicts\": 0,\n \"noops\": 0,\n \"retries\": {\n \"bulk\": 0,\n \"search\": 0\n },\n \"throttled_millis\": 0,\n \"requests_per_second\": -1.0,\n \"throttled_until_millis\": 0,\n \"failures\" : [ ]\n}"
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 527
- },
- "digest": "6bf63f2ec6ba55fcaf1092f48212bf25",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"user_identifier\": {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user_identifier": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 544
- },
- "digest": "afc29b61c532cf683f749baf013e7bfe",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index/_mapping\n{\n \"properties\": {\n \"user_id\": {\n \"type\": \"alias\",\n \"path\": \"user_identifier\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_mapping",
- "query": null,
- "body": {
- "properties": {
- "user_id": {
- "type": "alias",
- "path": "user_identifier"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.put_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 561
- },
- "digest": "210cf5c76bff517f48e80fa1c2d63907",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /my_index/_mapping",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_mapping",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.get_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/put-mapping.asciidoc",
- "line": 569
- },
- "digest": "aa7abe4ddca0ab400ac20a0d3bc2d6fa",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_index\" : {\n \"mappings\" : {\n \"properties\" : {\n \"user_id\" : {\n \"type\" : \"alias\",\n \"path\" : \"user_identifier\"\n },\n \"user_identifier\" : {\n \"type\" : \"keyword\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/refresh.asciidoc",
- "line": 11
- },
- "digest": "c2ac42934e4b76197032b2fc429e317d",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_refresh",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/refresh.asciidoc",
- "line": 95
- },
- "digest": "0e98949e80e665795bc6cfc997165241",
- "lang": "console",
- "found": [],
- "source": "POST /kimchy,elasticsearch/_refresh",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/kimchy,elasticsearch/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/refresh.asciidoc",
- "line": 105
- },
- "digest": "d7898526d239d2aea83727fb982f8f77",
- "lang": "console",
- "found": [],
- "source": "POST /_refresh",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_refresh",
- "query": null,
- "body": null,
- "params": null,
- "api": "indices.refresh"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 15
- },
- "digest": "84e8a4cf3453ed2fd4aeecdbdb02b813",
- "lang": "console",
- "found": [],
- "source": "POST /alias1/_rollover/twitter\n{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/alias1/_rollover/twitter",
- "query": null,
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- }
- },
- "params": {
- "alias": "alias1",
- "new_index": "twitter"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 175
- },
- "digest": "593c11e8a9f88ec2629f2eb33cded9b7",
- "lang": "console",
- "found": [],
- "source": "PUT /logs-000001 <1>\n{\n \"aliases\": {\n \"logs_write\": {}\n }\n}\n\n# Add > 1000 documents to logs-000001\n\nPOST /logs_write/_rollover <2>\n{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs-000001",
- "query": null,
- "body": {
- "aliases": {
- "logs_write": {}
- }
- },
- "params": {
- "index": "logs-000001"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/logs_write/_rollover",
- "query": null,
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- }
- },
- "params": {
- "alias": "logs_write"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 204
- },
- "digest": "68a4f959b3d34ade7ae7c32c06ad9b72",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"old_index\": \"logs-000001\",\n \"new_index\": \"logs-000002\",\n \"rolled_over\": true, <1>\n \"dry_run\": false, <2>\n \"conditions\": { <3>\n \"[max_age: 7d]\": false,\n \"[max_docs: 1000]\": true,\n \"[max_size: 5gb]\": false,\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 229
- },
- "digest": "893ff81174cbe1db9cc9df5970de4e20",
- "lang": "console",
- "found": [],
- "source": "PUT _index_template/template\n{\n \"index_patterns\": [\"my-data-stream*\"],\n \"template\": {\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n },\n \"data_stream\": {}\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_index_template/template",
- "query": null,
- "body": {
- "index_patterns": [
- "my-data-stream*"
- ],
- "template": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- }
- },
- "data_stream": {}
- },
- "params": {
- "name": "template"
- },
- "api": "indices.put_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 248
- },
- "digest": "87cb62fe881c8d50bcb229e8e1ab2c08",
- "lang": "console",
- "found": [],
- "source": "PUT /_data_stream/my-data-stream <1>\n\n# Add > 1000 documents to my-data-stream\n\nPOST /my-data-stream/_rollover <2>\n{\n \"conditions\" : {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_data_stream/my-data-stream",
- "query": null,
- "body": null,
- "params": {
- "name": "my-data-stream"
- },
- "api": "indices.create_data_stream"
- },
- {
- "method": "POST",
- "url": "/my-data-stream/_rollover",
- "query": null,
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- }
- },
- "params": {
- "alias": "my-data-stream"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 280
- },
- "digest": "00603a28c497000f3b42d21a7e28d840",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"old_index\": \".ds-my-data-stream-000001\", <1>\n \"new_index\": \".ds-my-data-stream-000002\", <2>\n \"rolled_over\": true, <3>\n \"dry_run\": false, <4>\n \"conditions\": { <5>\n \"[max_age: 7d]\": false,\n \"[max_docs: 1000]\": true,\n \"[max_size: 5gb]\": false,\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 322
- },
- "digest": "75f887596c4972bc679929ca996698f2",
- "lang": "console",
- "found": [],
- "source": "PUT /logs-000001\n{\n \"aliases\": {\n \"logs_write\": {}\n }\n}\n\nPOST /logs_write/_rollover\n{\n \"conditions\" : {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n },\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/logs-000001",
- "query": null,
- "body": {
- "aliases": {
- "logs_write": {}
- }
- },
- "params": {
- "index": "logs-000001"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/logs_write/_rollover",
- "query": null,
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- },
- "settings": {
- "index.number_of_shards": 2
- }
- },
- "params": {
- "alias": "logs_write"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 359
- },
- "digest": "659247d91f61ceb17cbcc60801fd3456",
- "lang": "console",
- "found": [],
- "source": "POST /my_alias/_rollover/my_new_index_name\n{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_alias/_rollover/my_new_index_name",
- "query": null,
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- }
- },
- "params": {
- "alias": "my_alias",
- "new_index": "my_new_index_name"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 382
- },
- "digest": "8f6ef669c09e0c8bfc2731f422471770",
- "lang": "console",
- "found": [],
- "source": "# PUT / with URI encoding:\nPUT /%3Clogs-%7Bnow%2Fd%7D-1%3E <1>\n{\n \"aliases\": {\n \"logs_write\": {}\n }\n}\n\nPUT logs_write/_doc/1\n{\n \"message\": \"a dummy log\"\n}\n\nPOST logs_write/_refresh\n\n# Wait for a day to pass\n\nPOST /logs_write/_rollover <2>\n{\n \"conditions\": {\n \"max_docs\": \"1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/%3Clogs-%7Bnow%2Fd%7D-1%3E",
- "query": null,
- "body": {
- "aliases": {
- "logs_write": {}
- }
- },
- "params": {
- "index": "%3Clogs-%7Bnow%2Fd%7D-1%3E"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/logs_write/_doc/1",
- "query": null,
- "body": {
- "message": "a dummy log"
- },
- "params": {
- "index": "logs_write",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/logs_write/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "logs_write"
- },
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/logs_write/_rollover",
- "query": null,
- "body": {
- "conditions": {
- "max_docs": "1"
- }
- },
- "params": {
- "alias": "logs_write"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 441
- },
- "digest": "03584e88046614ec7727db506d866f48",
- "lang": "console",
- "found": [],
- "source": "# GET /,,/_search\nGET /%3Clogs-%7Bnow%2Fd%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-1d%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-2d%7D-*%3E/_search",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/%3Clogs-%7Bnow%2Fd%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-1d%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-2d%7D-*%3E/_search",
- "query": null,
- "body": null,
- "params": {
- "index": "%3Clogs-%7Bnow%2Fd%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-1d%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-2d%7D-*%3E"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 456
- },
- "digest": "896eb7487a512fc43a2af7e16717f40d",
- "lang": "console",
- "found": [],
- "source": "POST /logs_write/_rollover?dry_run\n{\n \"conditions\" : {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_size\": \"5gb\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/logs_write/_rollover",
- "query": {
- "dry_run": true
- },
- "body": {
- "conditions": {
- "max_age": "7d",
- "max_docs": 1000,
- "max_size": "5gb"
- }
- },
- "params": {
- "alias": "logs_write"
- },
- "api": "indices.rollover"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 484
- },
- "digest": "9e9a3ad495e6305563a88dd4c74a5fda",
- "lang": "console",
- "found": [],
- "source": "PUT my_logs_index-000001\n{\n \"aliases\": {\n \"logs\": { \"is_write_index\": true } <1>\n }\n}\n\nPUT logs/_doc/1\n{\n \"message\": \"a dummy log\"\n}\n\nPOST logs/_refresh\n\nPOST /logs/_rollover\n{\n \"conditions\": {\n \"max_docs\": \"1\"\n }\n}\n\nPUT logs/_doc/2 <2>\n{\n \"message\": \"a newer log\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_logs_index-000001",
- "query": null,
- "body": {
- "aliases": {
- "logs": {
- "is_write_index": true
- }
- }
- },
- "params": {
- "index": "my_logs_index-000001"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/logs/_doc/1",
- "query": null,
- "body": {
- "message": "a dummy log"
- },
- "params": {
- "index": "logs",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/logs/_refresh",
- "query": null,
- "body": null,
- "params": {
- "index": "logs"
- },
- "api": "indices.refresh"
- },
- {
- "method": "POST",
- "url": "/logs/_rollover",
- "query": null,
- "body": {
- "conditions": {
- "max_docs": "1"
- }
- },
- "params": {
- "alias": "logs"
- },
- "api": "indices.rollover"
- },
- {
- "method": "PUT",
- "url": "/logs/_doc/2",
- "query": null,
- "body": {
- "message": "a newer log"
- },
- "params": {
- "index": "logs",
- "id": "2"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 516
- },
- "digest": "30525ea49f09da5979d6046e69fc1993",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\" : \"my_logs_index-000002\",\n \"_id\" : \"2\",\n \"_version\" : 1,\n \"result\" : \"created\",\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 1,\n \"failed\" : 0\n },\n \"_seq_no\" : 0,\n \"_primary_term\" : 1\n}"
- },
- {
- "source_location": {
- "file": "indices/rollover-index.asciidoc",
- "line": 544
- },
- "digest": "ef28fa43104f069fab5db566a796731f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_logs_index-000002\": {\n \"aliases\": {\n \"logs\": { \"is_write_index\": true }\n }\n },\n \"my_logs_index-000001\": {\n \"aliases\": {\n \"logs\": { \"is_write_index\" : false }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "indices/shrink-index.asciidoc",
- "line": 11
- },
- "digest": "36897f18b6b4631a03ba37f3baa00907",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_shrink/shrunk-twitter-index",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_shrink/shrunk-twitter-index",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter",
- "target": "shrunk-twitter-index"
- },
- "api": "indices.shrink"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shrink-index.asciidoc",
- "line": 37
- },
- "digest": "5e93f806cfd459149222b443b7992a51",
- "lang": "console",
- "found": [],
- "source": "PUT /my_source_index/_settings\n{\n \"settings\": {\n \"index.routing.allocation.require._name\": \"shrink_node_name\", <1>\n \"index.blocks.write\": true <2>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_source_index/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.routing.allocation.require._name": "shrink_node_name",
- "index.blocks.write": true
- }
- },
- "params": {
- "index": "my_source_index"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shrink-index.asciidoc",
- "line": 103
- },
- "digest": "f3594de7ef39ab09b0bb12c1e76bfe6b",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_shrink/my_target_index\n{\n \"settings\": {\n \"index.routing.allocation.require._name\": null, <1>\n \"index.blocks.write\": null <2>\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_shrink/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.routing.allocation.require._name": null,
- "index.blocks.write": null
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.shrink"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/shrink-index.asciidoc",
- "line": 146
- },
- "digest": "76c167d8ab305cb43b594f140c902dfe",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_shrink/my_target_index\n{\n \"settings\": {\n \"index.number_of_replicas\": 1,\n \"index.number_of_shards\": 1, <1>\n \"index.codec\": \"best_compression\" <2>\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_shrink/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_replicas": 1,
- "index.number_of_shards": 1,
- "index.codec": "best_compression"
- },
- "aliases": {
- "my_search_indices": {}
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.shrink"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/simulate-index.asciidoc",
- "line": 35
- },
- "digest": "2345ccc35fa4c2df72410fe7c464ba9b",
- "lang": "console",
- "found": [],
- "source": "POST /_index_template/_simulate_index/myindex-1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_index_template/_simulate_index/myindex-1",
- "query": null,
- "body": null,
- "params": {
- "name": "myindex-1"
- },
- "api": "indices.simulate_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/simulate-index.asciidoc",
- "line": 106
- },
- "digest": "eebb3260fd311f2e88ed568c477e986f",
- "lang": "console",
- "found": [],
- "source": "PUT /_component_template/ct1 <1>\n{\n \"template\": {\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n }\n}\n\nPUT /_component_template/ct2 <2>\n{\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n }\n}\n\nPUT /_index_template/final-template <3>\n{\n \"index_patterns\": [\"myindex*\"],\n \"composed_of\": [\"ct1\", \"ct2\"],\n \"priority\": 5\n}\n\nPOST /_index_template/_simulate_index/myindex-1 <4>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_component_template/ct1",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "index.number_of_shards": 2
- }
- }
- },
- "params": {
- "name": "ct1"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_component_template/ct2",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "index.number_of_replicas": 0
- },
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- }
- }
- },
- "params": {
- "name": "ct2"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_index_template/final-template",
- "query": null,
- "body": {
- "index_patterns": [
- "myindex*"
- ],
- "composed_of": [
- "ct1",
- "ct2"
- ],
- "priority": 5
- },
- "params": {
- "name": "final-template"
- },
- "api": "indices.put_index_template"
- },
- {
- "method": "POST",
- "url": "/_index_template/_simulate_index/myindex-1",
- "query": null,
- "body": null,
- "params": {
- "name": "myindex-1"
- },
- "api": "indices.simulate_index_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/simulate-index.asciidoc",
- "line": 149
- },
- "digest": "8fc807ecf95fac3f50285351d1aac39c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"2\",\n \"number_of_replicas\" : \"0\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n }\n }\n },\n \"aliases\" : { }\n },\n \"overlapping\" : [\n {\n \"name\" : \"template_1\",\n \"index_patterns\" : [\n \"myindex*\"\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "indices/simulate-template.asciidoc",
- "line": 58
- },
- "digest": "0f7aa40ad26d59a9268630b980a3d594",
- "lang": "console",
- "found": [],
- "source": "POST /_index_template/_simulate/template_1",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_index_template/_simulate/template_1",
- "query": null,
- "body": null,
- "params": {
- "name": "template_1"
- },
- "api": "indices.simulate_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/simulate-template.asciidoc",
- "line": 179
- },
- "digest": "b38a702277d7aaabf31971c0ade265ae",
- "lang": "console",
- "found": [],
- "source": "PUT /_component_template/ct1 <1>\n{\n \"template\": {\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n }\n}\n\nPUT /_component_template/ct2 <2>\n{\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"mappings\": {\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n }\n}\n\nPUT /_index_template/final-template <3>\n{\n \"index_patterns\": [\"myindex*\"],\n \"composed_of\": [\"ct1\", \"ct2\"],\n \"priority\": 5\n}\n\nPOST /_index_template/_simulate/final-template <4>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_component_template/ct1",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "index.number_of_shards": 2
- }
- }
- },
- "params": {
- "name": "ct1"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_component_template/ct2",
- "query": null,
- "body": {
- "template": {
- "settings": {
- "index.number_of_replicas": 0
- },
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- }
- }
- },
- "params": {
- "name": "ct2"
- },
- "api": "cluster.put_component_template"
- },
- {
- "method": "PUT",
- "url": "/_index_template/final-template",
- "query": null,
- "body": {
- "index_patterns": [
- "myindex*"
- ],
- "composed_of": [
- "ct1",
- "ct2"
- ],
- "priority": 5
- },
- "params": {
- "name": "final-template"
- },
- "api": "indices.put_index_template"
- },
- {
- "method": "POST",
- "url": "/_index_template/_simulate/final-template",
- "query": null,
- "body": null,
- "params": {
- "name": "final-template"
- },
- "api": "indices.simulate_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/simulate-template.asciidoc",
- "line": 222
- },
- "digest": "f4e7ad70a5db9ca91482d4c47a8d72eb",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"2\", <1>\n \"number_of_replicas\" : \"0\" <2>\n }\n },\n \"mappings\" : { <3>\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n }\n }\n },\n \"aliases\" : { }\n },\n \"overlapping\" : [ ]\n}"
- },
- {
- "source_location": {
- "file": "indices/simulate-template.asciidoc",
- "line": 256
- },
- "digest": "3628c268a9e764edb99b89616f58686f",
- "lang": "console",
- "found": [],
- "source": "POST /_index_template/_simulate\n{\n \"index_patterns\": [\"myindex*\"],\n \"composed_of\": [\"ct2\"],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_index_template/_simulate",
- "query": null,
- "body": {
- "index_patterns": [
- "myindex*"
- ],
- "composed_of": [
- "ct2"
- ],
- "priority": 10,
- "template": {
- "settings": {
- "index.number_of_replicas": 1
- }
- }
- },
- "params": null,
- "api": "indices.simulate_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/simulate-template.asciidoc",
- "line": 274
- },
- "digest": "2174551d4adbfde7576cb990e950f6f0",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n }\n }\n },\n \"aliases\" : { }\n },\n \"overlapping\" : [\n {\n \"name\" : \"final-template\",\n \"index_patterns\" : [\n \"myindex*\"\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "indices/split-index.asciidoc",
- "line": 10
- },
- "digest": "1a19b7db5485cd814e1f76f7cd7d2923",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_split/split-twitter-index\n{\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_split/split-twitter-index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 2
- }
- },
- "params": {
- "index": "twitter",
- "target": "split-twitter-index"
- },
- "api": "indices.split"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/split-index.asciidoc",
- "line": 42
- },
- "digest": "01c0e302f4fd5118faf5e34f4a010ebf",
- "lang": "console",
- "found": [],
- "source": "PUT /my_source_index/_settings\n{\n \"settings\": {\n \"index.blocks.write\": true <1>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_source_index/_settings",
- "query": null,
- "body": {
- "settings": {
- "index.blocks.write": true
- }
- },
- "params": {
- "index": "my_source_index"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/split-index.asciidoc",
- "line": 151
- },
- "digest": "2e796e5ca59768d4426abbf9a049db3e",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_split/my_target_index\n{\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_split/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 2
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.split"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/split-index.asciidoc",
- "line": 185
- },
- "digest": "f2f1cae094855a45fd8f73478bec8e70",
- "lang": "console",
- "found": [],
- "source": "POST /my_source_index/_split/my_target_index\n{\n \"settings\": {\n \"index.number_of_shards\": 5 <1>\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_source_index/_split/my_target_index",
- "query": null,
- "body": {
- "settings": {
- "index.number_of_shards": 5
- },
- "aliases": {
- "my_search_indices": {}
- }
- },
- "params": {
- "index": "my_source_index",
- "target": "my_target_index"
- },
- "api": "indices.split"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/unfreeze.asciidoc",
- "line": 42
- },
- "digest": "ffea06f77c9df5720412aa06be964118",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_freeze\nPOST /my_index/_unfreeze",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_freeze",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.freeze"
- },
- {
- "method": "POST",
- "url": "/my_index/_unfreeze",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.unfreeze"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 12
- },
- "digest": "d3016e4e8025362ad9a05ee86bb2061f",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"twitter\", \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "twitter",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 170
- },
- "digest": "b4392116f2cc57ce8064ccbad30318d5",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"test1\", \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test1",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 186
- },
- "digest": "3653567181f43a5f64c74f934aa821c2",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"remove\" : { \"index\" : \"test1\", \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "remove": {
- "index": "test1",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 204
- },
- "digest": "af3fb9fa5691a7b37a6dc2a69ff66e64",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"remove\" : { \"index\" : \"test1\", \"alias\" : \"alias1\" } },\n { \"add\" : { \"index\" : \"test1\", \"alias\" : \"alias2\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "remove": {
- "index": "test1",
- "alias": "alias1"
- }
- },
- {
- "add": {
- "index": "test1",
- "alias": "alias2"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 222
- },
- "digest": "f0e21e03a07c8fa0209b0aafdb3791e6",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"test1\", \"alias\" : \"alias1\" } },\n { \"add\" : { \"index\" : \"test2\", \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test1",
- "alias": "alias1"
- }
- },
- {
- "add": {
- "index": "test2",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 236
- },
- "digest": "5f210f74725ea0c9265190346edfa246",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"indices\" : [\"test1\", \"test2\"], \"alias\" : \"alias1\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "indices": [
- "test1",
- "test2"
- ],
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 253
- },
- "digest": "6799d132c1c7ca3970763acde2337ef9",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n { \"add\" : { \"index\" : \"test*\", \"alias\" : \"all_test_indices\" } }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test*",
- "alias": "all_test_indices"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 276
- },
- "digest": "de176bc4788ea286fff9e92418a43ea8",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT test <1>\nPUT test_2 <2>\nPOST /_aliases\n{\n \"actions\" : [\n { \"add\": { \"index\": \"test_2\", \"alias\": \"test\" } },\n { \"remove_index\": { \"index\": \"test\" } } <3>\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": null,
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test_2",
- "query": null,
- "body": null,
- "params": {
- "index": "test_2"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test_2",
- "alias": "test"
- }
- },
- {
- "remove_index": {
- "index": "test"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 304
- },
- "digest": "23ab0f1023b1b2cd5cdf2a8f9ccfd57b",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /test1\n{\n \"mappings\": {\n \"properties\": {\n \"user\" : {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test1",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "user": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "test1"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 320
- },
- "digest": "7cf71671859be7c1ecf673396db377cd",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test1\",\n \"alias\" : \"alias2\",\n \"filter\" : { \"term\" : { \"user\" : \"kimchy\" } }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test1",
- "alias": "alias2",
- "filter": {
- "term": {
- "user": "kimchy"
- }
- }
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 348
- },
- "digest": "bc1ad5cc6d3eab98e3ce01f209ba7094",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test\",\n \"alias\" : \"alias1\",\n \"routing\" : \"1\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test",
- "alias": "alias1",
- "routing": "1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 368
- },
- "digest": "fa0f4485cd48f986b7ae8cbb24e331c4",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test\",\n \"alias\" : \"alias2\",\n \"search_routing\" : \"1,2\",\n \"index_routing\" : \"2\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test",
- "alias": "alias2",
- "search_routing": "1,2",
- "index_routing": "2"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 394
- },
- "digest": "427f6b5c5376cbf0f71f242a60ca3d9e",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /alias2/_search?q=user:kimchy&routing=2,3",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/alias2/_search",
- "query": {
- "q": "user:kimchy",
- "routing": "2,3"
- },
- "body": null,
- "params": {
- "index": "alias2"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 415
- },
- "digest": "f6d6889667f56b8f49d2858070571a6b",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test\",\n \"alias\" : \"alias1\",\n \"is_write_index\" : true\n }\n },\n {\n \"add\" : {\n \"index\" : \"test2\",\n \"alias\" : \"alias1\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test",
- "alias": "alias1",
- "is_write_index": true
- }
- },
- {
- "add": {
- "index": "test2",
- "alias": "alias1"
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 441
- },
- "digest": "b0ec418bf416c62bed602b0a32a6d5f5",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /alias1/_doc/1\n{\n \"foo\": \"bar\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/alias1/_doc/1",
- "query": null,
- "body": {
- "foo": "bar"
- },
- "params": {
- "index": "alias1",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 453
- },
- "digest": "67bba546d835bca8f31df13e3587c348",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /test/_doc/1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/test/_doc/1",
- "query": null,
- "body": null,
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "get"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/aliases.asciidoc",
- "line": 462
- },
- "digest": "ad79228630684d950fe9792a768d24c5",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_aliases\n{\n \"actions\" : [\n {\n \"add\" : {\n \"index\" : \"test\",\n \"alias\" : \"alias1\",\n \"is_write_index\" : false\n }\n }, {\n \"add\" : {\n \"index\" : \"test2\",\n \"alias\" : \"alias1\",\n \"is_write_index\" : true\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_aliases",
- "query": null,
- "body": {
- "actions": [
- {
- "add": {
- "index": "test",
- "alias": "alias1",
- "is_write_index": false
- }
- },
- {
- "add": {
- "index": "test2",
- "alias": "alias1",
- "is_write_index": true
- }
- }
- ]
- },
- "params": null,
- "api": "indices.update_aliases"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 13
- },
- "digest": "8653e76676de5d327201b77512afa3a0",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter/_settings\n{\n \"index\" : {\n \"number_of_replicas\" : 2\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index": {
- "number_of_replicas": 2
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 79
- },
- "digest": "42744a175125df5be0ef77413bf8f608",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter/_settings\n{\n \"index\" : {\n \"refresh_interval\" : null\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index": {
- "refresh_interval": null
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 103
- },
- "digest": "dfac8d098b50aa0181161bcd17b38ef4",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter/_settings\n{\n \"index\" : {\n \"refresh_interval\" : \"-1\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index": {
- "refresh_interval": "-1"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 120
- },
- "digest": "0be2c28ee65384774b1e479b47dc3d92",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter/_settings\n{\n \"index\" : {\n \"refresh_interval\" : \"1s\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "index": {
- "refresh_interval": "1s"
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 133
- },
- "digest": "fe5763d32955e8b65eb3048e97b1580c",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /twitter/_forcemerge?max_num_segments=5",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_forcemerge",
- "query": {
- "max_num_segments": "5"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.forcemerge"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/update-settings.asciidoc",
- "line": 169
- },
- "digest": "ba0b4081c98f3387f76b77847c52ee9a",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /twitter/_close\n\nPUT /twitter/_settings\n{\n \"analysis\" : {\n \"analyzer\":{\n \"content\":{\n \"type\":\"custom\",\n \"tokenizer\":\"whitespace\"\n }\n }\n }\n}\n\nPOST /twitter/_open",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_close",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.close"
- },
- {
- "method": "PUT",
- "url": "/twitter/_settings",
- "query": null,
- "body": {
- "analysis": {
- "analyzer": {
- "content": {
- "type": "custom",
- "tokenizer": "whitespace"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.put_settings"
- },
- {
- "method": "POST",
- "url": "/twitter/_open",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.open"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/resolve.asciidoc",
- "line": 59
- },
- "digest": "b73ffaecb5532f9ab0136137e899c205",
- "lang": "console",
- "found": [],
- "source": "GET /_resolve/index/twitter*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_resolve/index/twitter*",
- "query": null,
- "body": null,
- "params": {
- "name": "twitter*"
- },
- "api": "indices.resolve_index"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/resolve.asciidoc",
- "line": 92
- },
- "digest": "bd57976bc93ca64b2d3e001df9f06c82",
- "lang": "console",
- "found": [],
- "source": "GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_resolve/index/f*,remoteCluster1:bar*",
- "query": {
- "expand_wildcards": "all"
- },
- "body": null,
- "params": {
- "name": "f*,remoteCluster1:bar*"
- },
- "api": "indices.resolve_index"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/resolve.asciidoc",
- "line": 101
- },
- "digest": "24f82826d99ef70a0ca64df8dcd934de",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": [ <1>\n {\n \"name\": \"foo_closed\",\n \"attributes\": [\n \"closed\"\n ]\n },\n {\n \"name\": \"freeze-index\",\n \"aliases\": [\n \"f-alias\"\n ],\n \"attributes\": [\n \"frozen\",\n \"open\"\n ]\n },\n {\n \"name\": \"remoteCluster1:bar-01\",\n \"attributes\": [\n \"open\"\n ]\n }\n ],\n \"aliases\": [ <2>\n {\n \"name\": \"f-alias\",\n \"indices\": [\n \"freeze-index\",\n \"my-index\"\n ]\n }\n ],\n \"data_streams\": [ <3>\n {\n \"name\": \"foo\",\n \"backing_indices\": [\n \".ds-foo-000001\"\n ],\n \"timestamp_field\": \"@timestamp\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "indices/dangling-indices-list.asciidoc",
- "line": 13
- },
- "digest": "21c1e6ee886140ce0cd67184dd19b981",
- "lang": "console",
- "found": [],
- "source": "GET /_dangling",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_dangling",
- "query": null,
- "body": null,
- "params": null,
- "api": "dangling_indices.list_dangling_indices"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/dangling-indices-list.asciidoc",
- "line": 38
- },
- "digest": "b6798a16c3c82bc2e4380297371448ca",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"dangling_indices\": [\n \"index_name\": \"twitter\",\n \"index_uuid\": \"zmM4e0JtBkeUjiHD-MihPQ\",\n \"creation_date_millis\": 1589414451372,\n \"node_ids\": [\n \"pL47UN3dAb2d5RCWP6lQ3e\"\n ]\n ]\n}"
- },
- {
- "source_location": {
- "file": "indices/dangling-index-import.asciidoc",
- "line": 13
- },
- "digest": "a3d943ac9d45b4eff4aa0c679b4eceb3",
- "lang": "console",
- "found": [],
- "source": "POST /_dangling/?accept_data_loss=true",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "indices/dangling-index-import.asciidoc",
- "line": 53
- },
- "digest": "ca98afbd6a90f63e02f62239d225313b",
- "lang": "console",
- "found": [],
- "source": "POST /_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_dangling/zmM4e0JtBkeUjiHD-MihPQ",
- "query": {
- "accept_data_loss": "true"
- },
- "body": null,
- "params": {
- "index_uuid": "zmM4e0JtBkeUjiHD-MihPQ"
- },
- "api": "dangling_indices.import_dangling_index"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/dangling-index-import.asciidoc",
- "line": 61
- },
- "digest": "bc200c9255d5260b46b899f910c2b328",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "indices/dangling-index-delete.asciidoc",
- "line": 13
- },
- "digest": "31f4400716500149cccbc19aa06bff66",
- "lang": "console",
- "found": [],
- "source": "DELETE /_dangling/?accept_data_loss=true",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "ilm/apis/put-lifecycle.asciidoc",
- "line": 52
- },
- "digest": "daa2d4811bec05ac4546b66bd5a615c7",
- "lang": "console",
- "found": [],
- "source": "PUT _ilm/policy/my_policy\n{\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": {
- "policy": {
- "phases": {
- "warm": {
- "min_age": "10d",
- "actions": {
- "forcemerge": {
- "max_num_segments": 1
- }
- }
- },
- "delete": {
- "min_age": "30d",
- "actions": {
- "delete": {}
- }
- }
- }
- }
- },
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/put-lifecycle.asciidoc",
- "line": 79
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/get-lifecycle.asciidoc",
- "line": 76
- },
- "digest": "2e7f4b9be999422a12abb680572b13c8",
- "lang": "console",
- "found": [],
- "source": "GET _ilm/policy/my_policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": null,
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.get_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/get-lifecycle.asciidoc",
- "line": 85
- },
- "digest": "0fc780bbbe4df1a7fc05f7abf11d4f78",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_policy\": {\n \"version\": 1, <1>\n \"modified_date\": 82392349, <2>\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {\n \"delete_searchable_snapshot\": true\n }\n }\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/delete-lifecycle.asciidoc",
- "line": 77
- },
- "digest": "af517b6936fa41d124d68b107b2efdc3",
- "lang": "console",
- "found": [],
- "source": "DELETE _ilm/policy/my_policy",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ilm/policy/my_policy",
- "query": null,
- "body": null,
- "params": {
- "policy": "my_policy"
- },
- "api": "ilm.delete_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/delete-lifecycle.asciidoc",
- "line": 85
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/move-to-step.asciidoc",
- "line": 145
- },
- "digest": "e3c5f93b3c85e8519f801defc20b0ce0",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/move/my_index\n{\n \"current_step\": { <1>\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": { <2>\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/move/my_index",
- "query": null,
- "body": {
- "current_step": {
- "phase": "new",
- "action": "complete",
- "name": "complete"
- },
- "next_step": {
- "phase": "warm",
- "action": "forcemerge",
- "name": "forcemerge"
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "ilm.move_to_step"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/move-to-step.asciidoc",
- "line": 167
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/remove-policy-from-index.asciidoc",
- "line": 90
- },
- "digest": "8bec5a437f4aea6f3f897c9df2ce2442",
- "lang": "console",
- "found": [],
- "source": "POST my_index/_ilm/remove",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_ilm/remove",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "ilm.remove_policy"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/remove-policy-from-index.asciidoc",
- "line": 98
- },
- "digest": "7464040de4facd0800a50d9488d41808",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"has_failures\" : false,\n \"failed_indexes\" : []\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/get-status.asciidoc",
- "line": 45
- },
- "digest": "182df084f028479ecbe8d7648ddad892",
- "lang": "console",
- "found": [],
- "source": "GET _ilm/status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ilm/status",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.get_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/get-status.asciidoc",
- "line": 52
- },
- "digest": "99e0bec31e49636bc0053ac66bc29352",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"RUNNING\"\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 103
- },
- "digest": "0f6fa3a706a7c17858d3dbe329839ea6",
- "lang": "console",
- "found": [],
- "source": "GET my_index/_ilm/explain",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_ilm/explain",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "ilm.explain_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 112
- },
- "digest": "bc42b1c517ff1fc6ad4371bae23d1c57",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"my_index\": {\n \"index\": \"my_index\",\n \"managed\": true, <1>\n \"policy\": \"my_policy\", <2>\n \"lifecycle_date_millis\": 1538475653281, <3>\n \"age\": \"15s\", <4>\n \"phase\": \"new\",\n \"phase_time_millis\": 1538475653317, <5>\n \"action\": \"complete\",\n \"action_time_millis\": 1538475653317, <6>\n \"step\": \"complete\",\n \"step_time_millis\": 1538475653317 <7>\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 148
- },
- "digest": "9cf677738535149f0cdb1796ddafbc8a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"test-000069\": {\n \"index\": \"test-000069\",\n \"managed\": true,\n \"policy\": \"my_lifecycle3\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"25.14s\",\n \"phase\": \"hot\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"rollover\",\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"attempt-rollover\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\",\n \"phase_execution\": {\n \"policy\": \"my_lifecycle3\",\n \"phase_definition\": { <1>\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_age\": \"30s\"\n }\n }\n },\n \"version\": 3, <2>\n \"modified_date\": \"2018-10-15T13:21:41.576Z\", <3>\n \"modified_date_in_millis\": 1539609701576 <4>\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 197
- },
- "digest": "0a6dcb918e7d6354c4709505f22a786f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"test-000020\": {\n \"index\": \"test-000020\",\n \"managed\": true,\n \"policy\": \"my_lifecycle3\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"4.12m\",\n \"phase\": \"warm\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"allocate\",\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"check-allocation\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\",\n \"step_info\": { <1>\n \"message\": \"Waiting for all shard copies to be active\",\n \"shards_left_to_allocate\": -1,\n \"all_shards_active\": false,\n \"actual_replicas\": 2\n },\n \"phase_execution\": {\n \"policy\": \"my_lifecycle3\",\n \"phase_definition\": {\n \"min_age\": \"0ms\",\n \"actions\": {\n \"allocate\": {\n \"number_of_replicas\": 2,\n \"include\": {\n \"box_type\": \"warm\"\n },\n \"exclude\": {},\n \"require\": {}\n },\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"version\": 2,\n \"modified_date\": \"2018-10-15T13:20:02.489Z\",\n \"modified_date_in_millis\": 1539609602489\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/explain.asciidoc",
- "line": 261
- },
- "digest": "b7d45a87863e94a174a3af72f9b2d11c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": {\n \"test-000056\": {\n \"index\": \"test-000056\",\n \"managed\": true,\n \"policy\": \"my_lifecycle3\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"50.1d\",\n \"phase\": \"hot\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"rollover\",\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"ERROR\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\",\n \"failed_step\": \"check-rollover-ready\", <1>\n \"is_auto_retryable_error\": true, <2>\n \"failed_step_retry_count\": 1, <3>\n \"step_info\": { <4>\n \"type\": \"cluster_block_exception\",\n \"reason\": \"index [test-000057/H7lF9n36Rzqa-KfKcnGQMg] blocked by: [FORBIDDEN/5/index read-only (api)\",\n \"index_uuid\": \"H7lF9n36Rzqa-KfKcnGQMg\",\n \"index\": \"test-000057\"\n },\n \"phase_execution\": {\n \"policy\": \"my_lifecycle3\",\n \"phase_definition\": {\n \"min_age\": \"0ms\",\n \"actions\": {\n \"rollover\": {\n \"max_age\": \"30s\"\n }\n }\n },\n \"version\": 3,\n \"modified_date\": \"2018-10-15T13:21:41.576Z\",\n \"modified_date_in_millis\": 1539609701576\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/start.asciidoc",
- "line": 76
- },
- "digest": "72ae3851160fcf02b8e2cdfd4e57d238",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/start",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.start"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/start.asciidoc",
- "line": 84
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ilm/apis/stop.asciidoc",
- "line": 80
- },
- "digest": "585a34ad79aee16678b37da785933ac8",
- "lang": "console",
- "found": [],
- "source": "POST _ilm/stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ilm/stop",
- "query": null,
- "body": null,
- "params": null,
- "api": "ilm.stop"
- }
- ]
- },
- {
- "source_location": {
- "file": "ilm/apis/stop.asciidoc",
- "line": 88
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/put-pipeline.asciidoc",
- "line": 11
- },
- "digest": "e7e28812b86c5257bf48931d131409f0",
- "lang": "console",
- "found": [],
- "source": "PUT _ingest/pipeline/my-pipeline-id\n{\n \"description\" : \"describe pipeline\",\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"bar\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": {
- "description": "describe pipeline",
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "bar"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/put-pipeline.asciidoc",
- "line": 93
- },
- "digest": "3467d11d772321353951461b756e3ffb",
- "lang": "console",
- "found": [],
- "source": "PUT /_ingest/pipeline/my-pipeline-id\n{\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"bar\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": {
- "description": "describe pipeline",
- "version": 123,
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "bar"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/put-pipeline.asciidoc",
- "line": 113
- },
- "digest": "ca42bbe58bdd127eb042389699d4a45c",
- "lang": "console",
- "found": [],
- "source": "PUT /_ingest/pipeline/my-pipeline-id\n{\n \"description\" : \"describe pipeline\",\n \"processors\" : [\n {\n \"set\" : {\n \"field\": \"foo\",\n \"value\": \"bar\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": {
- "description": "describe pipeline",
- "processors": [
- {
- "set": {
- "field": "foo",
- "value": "bar"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.put_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 30
- },
- "digest": "6a3a86ff58e5f20950d429cf2832c229",
- "lang": "console",
- "found": [],
- "source": "GET /_ingest/pipeline/my-pipeline-id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": null,
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.get_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 66
- },
- "digest": "6a3a86ff58e5f20950d429cf2832c229",
- "lang": "console",
- "found": [],
- "source": "GET /_ingest/pipeline/my-pipeline-id",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": null,
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.get_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 74
- },
- "digest": "82161823bc1112102b52bbb836311b94",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 107
- },
- "digest": "9f549bb400b6cc1523b00d60bc8fd8e1",
- "lang": "console",
- "found": [],
- "source": "GET /_ingest/pipeline/my-pipeline-id?filter_path=*.version",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": {
- "filter_path": "*.version"
- },
- "body": null,
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.get_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/get-pipeline.asciidoc",
- "line": 115
- },
- "digest": "61dc34169722548fb040f02e488c8814",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my-pipeline-id\" : {\n \"version\" : 123\n }\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/delete-pipeline.asciidoc",
- "line": 28
- },
- "digest": "dff61a76d5ef9ca8cbe59a416269a84b",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ingest/pipeline/my-pipeline-id",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ingest/pipeline/my-pipeline-id",
- "query": null,
- "body": null,
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.delete_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/delete-pipeline.asciidoc",
- "line": 67
- },
- "digest": "a7cf31f4b907e4c00132aca75f55790c",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ingest/pipeline/pipeline-one",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ingest/pipeline/pipeline-one",
- "query": null,
- "body": null,
- "params": {
- "id": "pipeline-one"
- },
- "api": "ingest.delete_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/delete-pipeline.asciidoc",
- "line": 76
- },
- "digest": "c6b5c695a9b757b5e7325345b206bde5",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ingest/pipeline/pipeline-*",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ingest/pipeline/pipeline-*",
- "query": null,
- "body": null,
- "params": {
- "id": "pipeline-*"
- },
- "api": "ingest.delete_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/delete-pipeline.asciidoc",
- "line": 85
- },
- "digest": "11e772ff5dbb73408ae30a1a367a0d9b",
- "lang": "console",
- "found": [],
- "source": "DELETE /_ingest/pipeline/*",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ingest/pipeline/*",
- "query": null,
- "body": null,
- "params": {
- "id": "*"
- },
- "api": "ingest.delete_pipeline"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 31
- },
- "digest": "67ffa135c50c43d6788636c88078c7d1",
- "lang": "console",
- "found": [],
- "source": "POST /_ingest/pipeline/my-pipeline-id/_simulate\n{\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/my-pipeline-id/_simulate",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "bar"
- }
- },
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "rab"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 147
- },
- "digest": "67ffa135c50c43d6788636c88078c7d1",
- "lang": "console",
- "found": [],
- "source": "POST /_ingest/pipeline/my-pipeline-id/_simulate\n{\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/my-pipeline-id/_simulate",
- "query": null,
- "body": {
- "docs": [
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "bar"
- }
- },
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "rab"
- }
- }
- ]
- },
- "params": {
- "id": "my-pipeline-id"
- },
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 172
- },
- "digest": "661b827203639440daa8f73727c8375e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 212
- },
- "digest": "17c2b0a6b0305804ff3b7fd3b4a68df3",
- "lang": "console",
- "found": [],
- "source": "POST /_ingest/pipeline/_simulate\n{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": null,
- "body": {
- "pipeline": {
- "description": "_description",
- "processors": [
- {
- "set": {
- "field": "field2",
- "value": "_value"
- }
- }
- ]
- },
- "docs": [
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "bar"
- }
- },
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "rab"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 249
- },
- "digest": "661b827203639440daa8f73727c8375e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 296
- },
- "digest": "463de55bb164cde9ac51acd4a7384901",
- "lang": "console",
- "found": [],
- "source": "POST /_ingest/pipeline/_simulate?verbose\n{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \"value\" : \"_value2\"\n }\n },\n {\n \"set\" : {\n \"field\" : \"field3\",\n \"value\" : \"_value3\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ingest/pipeline/_simulate",
- "query": {
- "verbose": true
- },
- "body": {
- "pipeline": {
- "description": "_description",
- "processors": [
- {
- "set": {
- "field": "field2",
- "value": "_value2"
- }
- },
- {
- "set": {
- "field": "field3",
- "value": "_value3"
- }
- }
- ]
- },
- "docs": [
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "bar"
- }
- },
- {
- "_index": "index",
- "_id": "id",
- "_source": {
- "foo": "rab"
- }
- }
- ]
- },
- "params": null,
- "api": "ingest.simulate"
- }
- ]
- },
- {
- "source_location": {
- "file": "ingest/apis/simulate-pipeline.asciidoc",
- "line": 339
- },
- "digest": "514f42adb2f4e60f6ae30cb4318018f4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"docs\": [\n {\n \"processor_results\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value2\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:46:09.674Z\",\n \"pipeline\": \"_simulate_pipeline\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field3\": \"_value3\",\n \"field2\": \"_value2\",\n \"foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:46:09.675Z\",\n \"pipeline\": \"_simulate_pipeline\"\n }\n }\n }\n ]\n },\n {\n \"processor_results\": [\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field2\": \"_value2\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:46:09.676Z\",\n \"pipeline\": \"_simulate_pipeline\"\n }\n }\n },\n {\n \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\",\n \"_source\": {\n \"field3\": \"_value3\",\n \"field2\": \"_value2\",\n \"foo\": \"rab\"\n },\n \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:46:09.677Z\",\n \"pipeline\": \"_simulate_pipeline\"\n }\n }\n }\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "rest-api/info.asciidoc",
- "line": 45
- },
- "digest": "9054187cbab5c9e1c4ca2a4dba6a5db0",
- "lang": "console",
- "found": [],
- "source": "GET /_xpack",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_xpack",
- "query": null,
- "body": null,
- "params": null,
- "api": "xpack.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "rest-api/info.asciidoc",
- "line": 52
- },
- "digest": "8d139e92f02bfcb49d5438c0f3fead18",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"build\" : {\n \"hash\" : \"2798b1a3ce779b3611bb53a0082d4d741e4d3168\",\n \"date\" : \"2015-04-07T13:34:42Z\"\n },\n \"license\" : {\n \"uid\" : \"893361dc-9749-4997-93cb-xxx\",\n \"type\" : \"trial\",\n \"mode\" : \"trial\",\n \"status\" : \"active\",\n \"expiry_date_in_millis\" : 1542665112332\n },\n \"features\" : {\n \"ccr\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"analytics\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"enrich\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"frozen_indices\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"graph\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ilm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"logstash\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ml\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"monitoring\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"rollup\": {\n \"available\": true,\n \"enabled\": true\n },\n \"searchable_snapshots\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"security\" : {\n \"available\" : true,\n \"enabled\" : false\n },\n \"slm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"spatial\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"eql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"sql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"transform\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"vectors\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"voting_only\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"watcher\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"data_streams\" : {\n \"available\" : true,\n \"enabled\" : true,\n }\n },\n \"tagline\" : \"You know, for X\"\n}"
- },
- {
- "source_location": {
- "file": "rest-api/info.asciidoc",
- "line": 167
- },
- "digest": "b11a0675e49df0709be693297ca73a2c",
- "lang": "console",
- "found": [],
- "source": "GET /_xpack?categories=build,features",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_xpack",
- "query": {
- "categories": "build,features"
- },
- "body": null,
- "params": null,
- "api": "xpack.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "rest-api/info.asciidoc",
- "line": 174
- },
- "digest": "4ed946065faa92f9950f04e402676a97",
- "lang": "console",
- "found": [],
- "source": "GET /_xpack?human=false",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_xpack",
- "query": {
- "human": "false"
- },
- "body": null,
- "params": null,
- "api": "xpack.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/delete-license.asciidoc",
- "line": 36
- },
- "digest": "4f8a4ad49e2bca6784c88ede18a1a709",
- "lang": "console",
- "found": [],
- "source": "DELETE /_license",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_license",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-license.asciidoc",
- "line": 47
- },
- "digest": "11c395d1649733bcab853fe31ec393b2",
- "lang": "console",
- "found": [],
- "source": "GET /_license",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_license",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-license.asciidoc",
- "line": 52
- },
- "digest": "a151a5db7e5b65046743be37fd9a02e9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"license\" : {\n \"status\" : \"active\",\n \"uid\" : \"cbff45e7-c553-41f7-ae4f-9205eabd80xx\",\n \"type\" : \"trial\",\n \"issue_date\" : \"2018-10-20T22:05:12.332Z\",\n \"issue_date_in_millis\" : 1540073112332,\n \"expiry_date\" : \"2018-11-19T22:05:12.332Z\",\n \"expiry_date_in_millis\" : 1542665112332,\n \"max_nodes\" : 1000,\n \"max_resource_units\" : null,\n \"issued_to\" : \"test\",\n \"issuer\" : \"elasticsearch\",\n \"start_date_in_millis\" : -1\n }\n}"
- },
- {
- "source_location": {
- "file": "licensing/get-trial-status.asciidoc",
- "line": 41
- },
- "digest": "88cf60d3310a56d8ae12704abc05b565",
- "lang": "console",
- "found": [],
- "source": "GET /_license/trial_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_license/trial_status",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.get_trial_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-trial-status.asciidoc",
- "line": 48
- },
- "digest": "cd83a052bf4f1fe11413e7aa51e5b9a5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"eligible_to_start_trial\": true\n}"
- },
- {
- "source_location": {
- "file": "licensing/start-trial.asciidoc",
- "line": 45
- },
- "digest": "37f1f2e75ed95308ae436bbbb8d5645e",
- "lang": "console",
- "found": [],
- "source": "POST /_license/start_trial?acknowledge=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_license/start_trial",
- "query": {
- "acknowledge": "true"
- },
- "body": null,
- "params": null,
- "api": "license.post_start_trial"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-basic-status.asciidoc",
- "line": 36
- },
- "digest": "f92d2f5018a8843ffbb56ade15f84406",
- "lang": "console",
- "found": [],
- "source": "GET /_license/basic_status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_license/basic_status",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.get_basic_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/get-basic-status.asciidoc",
- "line": 43
- },
- "digest": "7539f49762b2e372c275d0d061009d19",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"eligible_to_start_basic\": true\n}"
- },
- {
- "source_location": {
- "file": "licensing/start-basic.asciidoc",
- "line": 43
- },
- "digest": "8699d35269a47ba867fa8cc766287413",
- "lang": "console",
- "found": [],
- "source": "POST /_license/start_basic",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_license/start_basic",
- "query": null,
- "body": null,
- "params": null,
- "api": "license.post_start_basic"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/start-basic.asciidoc",
- "line": 63
- },
- "digest": "f58fd031597e2c3df78bf0efd07206e3",
- "lang": "console",
- "found": [],
- "source": "POST /_license/start_basic?acknowledge=true",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_license/start_basic",
- "query": {
- "acknowledge": "true"
- },
- "body": null,
- "params": null,
- "api": "license.post_start_basic"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/update-license.asciidoc",
- "line": 61
- },
- "digest": "85f2839beeb71edb66988e5c82188be0",
- "lang": "console",
- "found": [],
- "source": "PUT _license\n{\n \"licenses\": [\n {\n \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\":\"basic\",\n \"issue_date_in_millis\":1411948800000,\n \"expiry_date_in_millis\":1914278399999,\n \"max_nodes\":1,\n \"issued_to\":\"issuedTo\",\n \"issuer\":\"issuer\",\n \"signature\":\"xx\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_license",
- "query": null,
- "body": {
- "licenses": [
- {
- "uid": "893361dc-9749-4997-93cb-802e3d7fa4xx",
- "type": "basic",
- "issue_date_in_millis": 1411948800000,
- "expiry_date_in_millis": 1914278399999,
- "max_nodes": 1,
- "issued_to": "issuedTo",
- "issuer": "issuer",
- "signature": "xx"
- }
- ]
- },
- "params": null,
- "api": "license.post"
- }
- ]
- },
- {
- "source_location": {
- "file": "licensing/update-license.asciidoc",
- "line": 137
- },
- "digest": "46b1c1f6e0c86528be84c373eeb8d425",
- "lang": "console",
- "found": [],
- "source": "PUT _license?acknowledge=true\n{\n \"licenses\": [\n {\n \"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\":\"basic\",\n \"issue_date_in_millis\":1411948800000,\n \"expiry_date_in_millis\":1914278399999,\n \"max_nodes\":1,\n \"issued_to\":\"issuedTo\",\n \"issuer\":\"issuer\",\n \"signature\":\"xx\"\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_license",
- "query": {
- "acknowledge": "true"
- },
- "body": {
- "licenses": [
- {
- "uid": "893361dc-9749-4997-93cb-802e3d7fa4xx",
- "type": "basic",
- "issue_date_in_millis": 1411948800000,
- "expiry_date_in_millis": 1914278399999,
- "max_nodes": 1,
- "issued_to": "issuedTo",
- "issuer": "issuer",
- "signature": "xx"
- }
- ]
- },
- "params": null,
- "api": "license.post"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/post-calendar-event.asciidoc",
- "line": 64
- },
- "digest": "c067182d385f59ce5952fb9a716fbf05",
- "lang": "console",
- "found": [],
- "source": "POST _ml/calendars/planned-outages/events\n{\n \"events\" : [\n {\"description\": \"event 1\", \"start_time\": 1513641600000, \"end_time\": 1513728000000},\n {\"description\": \"event 2\", \"start_time\": 1513814400000, \"end_time\": 1513900800000},\n {\"description\": \"event 3\", \"start_time\": 1514160000000, \"end_time\": 1514246400000}\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/calendars/planned-outages/events",
- "query": null,
- "body": {
- "events": [
- {
- "description": "event 1",
- "start_time": 1513641600000,
- "end_time": 1513728000000
- },
- {
- "description": "event 2",
- "start_time": 1513814400000,
- "end_time": 1513900800000
- },
- {
- "description": "event 3",
- "start_time": 1514160000000,
- "end_time": 1514246400000
- }
- ]
- },
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.post_calendar_events"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/post-calendar-event.asciidoc",
- "line": 79
- },
- "digest": "d85277c7ee060163024f51ce226e9687",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"events\": [\n {\n \"description\": \"event 1\",\n \"start_time\": 1513641600000,\n \"end_time\": 1513728000000,\n \"calendar_id\": \"planned-outages\"\n },\n {\n \"description\": \"event 2\",\n \"start_time\": 1513814400000,\n \"end_time\": 1513900800000,\n \"calendar_id\": \"planned-outages\"\n },\n {\n \"description\": \"event 3\",\n \"start_time\": 1514160000000,\n \"end_time\": 1514246400000,\n \"calendar_id\": \"planned-outages\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-calendar-job.asciidoc",
- "line": 38
- },
- "digest": "1b2ab75d3c8064fac6ecc63104396c02",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/calendars/planned-outages/jobs/total-requests",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/calendars/planned-outages/jobs/total-requests",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages",
- "job_id": "total-requests"
- },
- "api": "ml.put_calendar_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-calendar-job.asciidoc",
- "line": 46
- },
- "digest": "1dae5fc15721297e0bbb7f75f4d688c8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": [\n \"total-requests\"\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/close-job.asciidoc",
- "line": 92
- },
- "digest": "75957a7d1b67e3d47899c5f18b32cb61",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_close",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_close",
- "query": null,
- "body": null,
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.close_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/close-job.asciidoc",
- "line": 100
- },
- "digest": "bde804b8b2cf95aad1cf3ca64df67fa9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"closed\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-job.asciidoc",
- "line": 298
- },
- "digest": "9c11e238772d67dbc9d273776de9916c",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/anomaly_detectors/total-requests\n{\n \"description\" : \"Total sum of requests\",\n \"analysis_config\" : {\n \"bucket_span\":\"10m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of total\",\n \"function\": \"sum\",\n \"field_name\": \"total\"\n }\n ]\n },\n \"data_description\" : {\n \"time_field\":\"timestamp\",\n \"time_format\": \"epoch_ms\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/anomaly_detectors/total-requests",
- "query": null,
- "body": {
- "description": "Total sum of requests",
- "analysis_config": {
- "bucket_span": "10m",
- "detectors": [
- {
- "detector_description": "Sum of total",
- "function": "sum",
- "field_name": "total"
- }
- ]
- },
- "data_description": {
- "time_field": "timestamp",
- "time_format": "epoch_ms"
- }
- },
- "params": {
- "job_id": "total-requests"
- },
- "api": "ml.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-job.asciidoc",
- "line": 322
- },
- "digest": "3002879e8e12f9dc71d17f2bd4c65f11",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"job_id\" : \"total-requests\",\n \"job_type\" : \"anomaly_detector\",\n \"job_version\" : \"8.0.0\",\n \"description\" : \"Total sum of requests\",\n \"create_time\" : 1562352500629,\n \"analysis_config\" : {\n \"bucket_span\" : \"10m\",\n \"detectors\" : [\n {\n \"detector_description\" : \"Sum of total\",\n \"function\" : \"sum\",\n \"field_name\" : \"total\",\n \"detector_index\" : 0\n }\n ],\n \"influencers\" : [ ]\n },\n \"analysis_limits\" : {\n \"model_memory_limit\" : \"1024mb\",\n \"categorization_examples_limit\" : 4\n },\n \"data_description\" : {\n \"time_field\" : \"timestamp\",\n \"time_format\" : \"epoch_ms\"\n },\n \"model_snapshot_retention_days\" : 10,\n \"daily_model_snapshot_retention_after_days\" : 1,\n \"results_index_name\" : \"shared\",\n \"allow_lazy_open\" : false\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-calendar.asciidoc",
- "line": 46
- },
- "digest": "e61b5abe85000cc954a42e2cd74f3a26",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/calendars/planned-outages",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/calendars/planned-outages",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.put_calendar"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-calendar.asciidoc",
- "line": 54
- },
- "digest": "171c0cd3b79df8fc5fe414cf9607f56f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": []\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-datafeed.asciidoc",
- "line": 113
- },
- "digest": "23067c5e8da958fa4d914f3b5c9bf607",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/datafeeds/datafeed-total-requests\n{\n \"job_id\": \"total-requests\",\n \"indices\": [\"server-metrics\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/datafeeds/datafeed-total-requests",
- "query": null,
- "body": {
- "job_id": "total-requests",
- "indices": [
- "server-metrics"
- ]
- },
- "params": {
- "datafeed_id": "datafeed-total-requests"
- },
- "api": "ml.put_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-datafeed.asciidoc",
- "line": 125
- },
- "digest": "6bdf0b32f57bad22be8b6bfc07ff58d7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"datafeed_id\": \"datafeed-total-requests\",\n \"job_id\": \"total-requests\",\n \"query_delay\": \"83474ms\",\n \"indices\": [\n \"server-metrics\"\n ],\n \"query\": {\n \"match_all\": {\n \"boost\": 1.0\n }\n },\n \"scroll_size\": 1000,\n \"chunking_config\": {\n \"mode\": \"auto\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-filter.asciidoc",
- "line": 52
- },
- "digest": "b4aec2a1d353852507c091bdb629b765",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/filters/safe_domains\n{\n \"description\": \"A list of safe domains\",\n \"items\": [\"*.google.com\", \"wikipedia.org\"]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/filters/safe_domains",
- "query": null,
- "body": {
- "description": "A list of safe domains",
- "items": [
- "*.google.com",
- "wikipedia.org"
- ]
- },
- "params": {
- "filter_id": "safe_domains"
- },
- "api": "ml.put_filter"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/put-filter.asciidoc",
- "line": 64
- },
- "digest": "e5edabc3d3e627c7ed92623b855c05d9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"filter_id\": \"safe_domains\",\n \"description\": \"A list of safe domains\",\n \"items\": [\"*.google.com\", \"wikipedia.org\"]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar.asciidoc",
- "line": 40
- },
- "digest": "63893e7e9479a9b60db71dcddcc79aaf",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/calendars/planned-outages",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/calendars/planned-outages",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.delete_calendar"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar.asciidoc",
- "line": 48
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-datafeed.asciidoc",
- "line": 45
- },
- "digest": "8a12cd824404d74f098d854716a26899",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/datafeeds/datafeed-total-requests",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/datafeeds/datafeed-total-requests",
- "query": null,
- "body": null,
- "params": {
- "datafeed_id": "datafeed-total-requests"
- },
- "api": "ml.delete_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-datafeed.asciidoc",
- "line": 53
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar-event.asciidoc",
- "line": 45
- },
- "digest": "f6982ff80b9a64cd5fcac5b20908c906",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages",
- "event_id": "LS8LJGEBMTCMA-qz49st"
- },
- "api": "ml.delete_calendar_event"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-filter.asciidoc",
- "line": 41
- },
- "digest": "8c5d48252cd6d1ee26a2bb817f89c78e",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/filters/safe_domains",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/filters/safe_domains",
- "query": null,
- "body": null,
- "params": {
- "filter_id": "safe_domains"
- },
- "api": "ml.delete_filter"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-filter.asciidoc",
- "line": 49
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-forecast.asciidoc",
- "line": 71
- },
- "digest": "eb4e43b47867b54214a8630172dd0e21",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/anomaly_detectors/total-requests/_forecast/_all",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/anomaly_detectors/total-requests/_forecast/_all",
- "query": null,
- "body": null,
- "params": {
- "job_id": "total-requests",
- "forecast_id": "_all"
- },
- "api": "ml.delete_forecast"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-job.asciidoc",
- "line": 60
- },
- "digest": "3ac8b5234e9d53859245cf8ab0094ca5",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/anomaly_detectors/total-requests",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/anomaly_detectors/total-requests",
- "query": null,
- "body": null,
- "params": {
- "job_id": "total-requests"
- },
- "api": "ml.delete_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-job.asciidoc",
- "line": 68
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-job.asciidoc",
- "line": 77
- },
- "digest": "ccec66fb20d5ede6c691e0890cfe402a",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/anomaly_detectors/total-requests?wait_for_completion=false",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/anomaly_detectors/total-requests",
- "query": {
- "wait_for_completion": "false"
- },
- "body": null,
- "params": {
- "job_id": "total-requests"
- },
- "api": "ml.delete_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-job.asciidoc",
- "line": 86
- },
- "digest": "7911626413c70672fd05359a832096c3",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"task\": \"oTUltX4IQMOUUVeiohTt8A:39\"\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar-job.asciidoc",
- "line": 38
- },
- "digest": "1b0b29e5cd7550c648d0892378e93804",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/calendars/planned-outages/jobs/total-requests",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/calendars/planned-outages/jobs/total-requests",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages",
- "job_id": "total-requests"
- },
- "api": "ml.delete_calendar_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-calendar-job.asciidoc",
- "line": 47
- },
- "digest": "f114ee8c6333648f1cfd511a4bc15655",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": []\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-snapshot.asciidoc",
- "line": 44
- },
- "digest": "1e08e054c761353f99211cd18e8ca47b",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/anomaly_detectors/farequote/model_snapshots/1491948163",
- "query": null,
- "body": null,
- "params": {
- "job_id": "farequote",
- "snapshot_id": "1491948163"
- },
- "api": "ml.delete_model_snapshot"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-snapshot.asciidoc",
- "line": 52
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-expired-data.asciidoc",
- "line": 62
- },
- "digest": "f2f09bc4723805c7aaabdc83c55100fa",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/_delete_expired_data",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/_delete_expired_data",
- "query": null,
- "body": null,
- "params": null,
- "api": "ml.delete_expired_data"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/delete-expired-data.asciidoc",
- "line": 70
- },
- "digest": "c852b65b9085718ec12e9fc5b41d8655",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"deleted\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/estimate-model-memory.asciidoc",
- "line": 60
- },
- "digest": "c4178795c108b4ed3daec4e69aa2acc6",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/_estimate_model_memory\n{\n \"analysis_config\": {\n \"bucket_span\": \"5m\",\n \"detectors\": [\n {\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"by_field_name\": \"status\",\n \"partition_field_name\": \"app\"\n }\n ],\n \"influencers\": [ \"source_ip\", \"dest_ip\" ]\n },\n \"overall_cardinality\": {\n \"status\": 10,\n \"app\": 50\n },\n \"max_bucket_cardinality\": {\n \"source_ip\": 300,\n \"dest_ip\": 30\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/_estimate_model_memory",
- "query": null,
- "body": {
- "analysis_config": {
- "bucket_span": "5m",
- "detectors": [
- {
- "function": "sum",
- "field_name": "bytes",
- "by_field_name": "status",
- "partition_field_name": "app"
- }
- ],
- "influencers": [
- "source_ip",
- "dest_ip"
- ]
- },
- "overall_cardinality": {
- "status": 10,
- "app": 50
- },
- "max_bucket_cardinality": {
- "source_ip": 300,
- "dest_ip": 30
- }
- },
- "params": null,
- "api": "ml.estimate_model_memory"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/estimate-model-memory.asciidoc",
- "line": 90
- },
- "digest": "f5047c61947ac5f5ac544b6aac384a67",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"model_memory_estimate\": \"21mb\"\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/find-file-structure.asciidoc",
- "line": 253
- },
- "digest": "7a145f2c4ad1c3c9fea24afeadb847ef",
- "lang": "console",
- "found": [],
- "source": "POST _ml/find_file_structure\n{\"name\": \"Leviathan Wakes\", \"author\": \"James S.A. Corey\", \"release_date\": \"2011-06-02\", \"page_count\": 561}\n{\"name\": \"Hyperion\", \"author\": \"Dan Simmons\", \"release_date\": \"1989-05-26\", \"page_count\": 482}\n{\"name\": \"Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1965-06-01\", \"page_count\": 604}\n{\"name\": \"Dune Messiah\", \"author\": \"Frank Herbert\", \"release_date\": \"1969-10-15\", \"page_count\": 331}\n{\"name\": \"Children of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1976-04-21\", \"page_count\": 408}\n{\"name\": \"God Emperor of Dune\", \"author\": \"Frank Herbert\", \"release_date\": \"1981-05-28\", \"page_count\": 454}\n{\"name\": \"Consider Phlebas\", \"author\": \"Iain M. Banks\", \"release_date\": \"1987-04-23\", \"page_count\": 471}\n{\"name\": \"Pandora's Star\", \"author\": \"Peter F. Hamilton\", \"release_date\": \"2004-03-02\", \"page_count\": 768}\n{\"name\": \"Revelation Space\", \"author\": \"Alastair Reynolds\", \"release_date\": \"2000-03-15\", \"page_count\": 585}\n{\"name\": \"A Fire Upon the Deep\", \"author\": \"Vernor Vinge\", \"release_date\": \"1992-06-01\", \"page_count\": 613}\n{\"name\": \"Ender's Game\", \"author\": \"Orson Scott Card\", \"release_date\": \"1985-06-01\", \"page_count\": 324}\n{\"name\": \"1984\", \"author\": \"George Orwell\", \"release_date\": \"1985-06-01\", \"page_count\": 328}\n{\"name\": \"Fahrenheit 451\", \"author\": \"Ray Bradbury\", \"release_date\": \"1953-10-15\", \"page_count\": 227}\n{\"name\": \"Brave New World\", \"author\": \"Aldous Huxley\", \"release_date\": \"1932-06-01\", \"page_count\": 268}\n{\"name\": \"Foundation\", \"author\": \"Isaac Asimov\", \"release_date\": \"1951-06-01\", \"page_count\": 224}\n{\"name\": \"The Giver\", \"author\": \"Lois Lowry\", \"release_date\": \"1993-04-26\", \"page_count\": 208}\n{\"name\": \"Slaughterhouse-Five\", \"author\": \"Kurt Vonnegut\", \"release_date\": \"1969-06-01\", \"page_count\": 275}\n{\"name\": \"The Hitchhiker's Guide to the Galaxy\", \"author\": \"Douglas Adams\", \"release_date\": \"1979-10-12\", \"page_count\": 180}\n{\"name\": \"Snow Crash\", \"author\": \"Neal Stephenson\", \"release_date\": \"1992-06-01\", \"page_count\": 470}\n{\"name\": \"Neuromancer\", \"author\": \"William Gibson\", \"release_date\": \"1984-07-01\", \"page_count\": 271}\n{\"name\": \"The Handmaid's Tale\", \"author\": \"Margaret Atwood\", \"release_date\": \"1985-06-01\", \"page_count\": 311}\n{\"name\": \"Starship Troopers\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1959-12-01\", \"page_count\": 335}\n{\"name\": \"The Left Hand of Darkness\", \"author\": \"Ursula K. Le Guin\", \"release_date\": \"1969-06-01\", \"page_count\": 304}\n{\"name\": \"The Moon is a Harsh Mistress\", \"author\": \"Robert A. Heinlein\", \"release_date\": \"1966-04-01\", \"page_count\": 288}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/find_file_structure",
- "query": null,
- "body": [
- {
- "name": "Leviathan Wakes",
- "author": "James S.A. Corey",
- "release_date": "2011-06-02",
- "page_count": 561
- },
- {
- "name": "Hyperion",
- "author": "Dan Simmons",
- "release_date": "1989-05-26",
- "page_count": 482
- },
- {
- "name": "Dune",
- "author": "Frank Herbert",
- "release_date": "1965-06-01",
- "page_count": 604
- },
- {
- "name": "Dune Messiah",
- "author": "Frank Herbert",
- "release_date": "1969-10-15",
- "page_count": 331
- },
- {
- "name": "Children of Dune",
- "author": "Frank Herbert",
- "release_date": "1976-04-21",
- "page_count": 408
- },
- {
- "name": "God Emperor of Dune",
- "author": "Frank Herbert",
- "release_date": "1981-05-28",
- "page_count": 454
- },
- {
- "name": "Consider Phlebas",
- "author": "Iain M. Banks",
- "release_date": "1987-04-23",
- "page_count": 471
- },
- {
- "name": "Pandora's Star",
- "author": "Peter F. Hamilton",
- "release_date": "2004-03-02",
- "page_count": 768
- },
- {
- "name": "Revelation Space",
- "author": "Alastair Reynolds",
- "release_date": "2000-03-15",
- "page_count": 585
- },
- {
- "name": "A Fire Upon the Deep",
- "author": "Vernor Vinge",
- "release_date": "1992-06-01",
- "page_count": 613
- },
- {
- "name": "Ender's Game",
- "author": "Orson Scott Card",
- "release_date": "1985-06-01",
- "page_count": 324
- },
- {
- "name": "1984",
- "author": "George Orwell",
- "release_date": "1985-06-01",
- "page_count": 328
- },
- {
- "name": "Fahrenheit 451",
- "author": "Ray Bradbury",
- "release_date": "1953-10-15",
- "page_count": 227
- },
- {
- "name": "Brave New World",
- "author": "Aldous Huxley",
- "release_date": "1932-06-01",
- "page_count": 268
- },
- {
- "name": "Foundation",
- "author": "Isaac Asimov",
- "release_date": "1951-06-01",
- "page_count": 224
- },
- {
- "name": "The Giver",
- "author": "Lois Lowry",
- "release_date": "1993-04-26",
- "page_count": 208
- },
- {
- "name": "Slaughterhouse-Five",
- "author": "Kurt Vonnegut",
- "release_date": "1969-06-01",
- "page_count": 275
- },
- {
- "name": "The Hitchhiker's Guide to the Galaxy",
- "author": "Douglas Adams",
- "release_date": "1979-10-12",
- "page_count": 180
- },
- {
- "name": "Snow Crash",
- "author": "Neal Stephenson",
- "release_date": "1992-06-01",
- "page_count": 470
- },
- {
- "name": "Neuromancer",
- "author": "William Gibson",
- "release_date": "1984-07-01",
- "page_count": 271
- },
- {
- "name": "The Handmaid's Tale",
- "author": "Margaret Atwood",
- "release_date": "1985-06-01",
- "page_count": 311
- },
- {
- "name": "Starship Troopers",
- "author": "Robert A. Heinlein",
- "release_date": "1959-12-01",
- "page_count": 335
- },
- {
- "name": "The Left Hand of Darkness",
- "author": "Ursula K. Le Guin",
- "release_date": "1969-06-01",
- "page_count": 304
- },
- {
- "name": "The Moon is a Harsh Mistress",
- "author": "Robert A. Heinlein",
- "release_date": "1966-04-01",
- "page_count": 288
- }
- ],
- "params": null,
- "api": "ml.find_file_structure"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/find-file-structure.asciidoc",
- "line": 284
- },
- "digest": "70a2df9a5d05f1dc9e9b4152e3098174",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"num_lines_analyzed\" : 24, <1>\n \"num_messages_analyzed\" : 24, <2>\n \"sample_start\" : \"{\\\"name\\\": \\\"Leviathan Wakes\\\", \\\"author\\\": \\\"James S.A. Corey\\\", \\\"release_date\\\": \\\"2011-06-02\\\", \\\"page_count\\\": 561}\\n{\\\"name\\\": \\\"Hyperion\\\", \\\"author\\\": \\\"Dan Simmons\\\", \\\"release_date\\\": \\\"1989-05-26\\\", \\\"page_count\\\": 482}\\n\", <3>\n \"charset\" : \"UTF-8\", <4>\n \"has_byte_order_marker\" : false, <5>\n \"format\" : \"ndjson\", <6>\n \"timestamp_field\" : \"release_date\", <7>\n \"joda_timestamp_formats\" : [ <8>\n \"ISO8601\"\n ],\n \"java_timestamp_formats\" : [ <9>\n \"ISO8601\"\n ],\n \"need_client_timezone\" : true, <10>\n \"mappings\" : { <11>\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"author\" : {\n \"type\" : \"keyword\"\n },\n \"name\" : {\n \"type\" : \"keyword\"\n },\n \"page_count\" : {\n \"type\" : \"long\"\n },\n \"release_date\" : {\n \"type\" : \"date\",\n \"format\" : \"iso8601\"\n }\n },\n \"ingest_pipeline\" : {\n \"description\" : \"Ingest pipeline created by file structure finder\",\n \"processors\" : [\n {\n \"date\" : {\n \"field\" : \"release_date\",\n \"timezone\" : \"{{ event.timezone }}\",\n \"formats\" : [\n \"ISO8601\"\n ]\n }\n }\n ]\n },\n \"field_stats\" : { <12>\n \"author\" : {\n \"count\" : 24,\n \"cardinality\" : 20,\n \"top_hits\" : [\n {\n \"value\" : \"Frank Herbert\",\n \"count\" : 4\n },\n {\n \"value\" : \"Robert A. Heinlein\",\n \"count\" : 2\n },\n {\n \"value\" : \"Alastair Reynolds\",\n \"count\" : 1\n },\n {\n \"value\" : \"Aldous Huxley\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dan Simmons\",\n \"count\" : 1\n },\n {\n \"value\" : \"Douglas Adams\",\n \"count\" : 1\n },\n {\n \"value\" : \"George Orwell\",\n \"count\" : 1\n },\n {\n \"value\" : \"Iain M. Banks\",\n \"count\" : 1\n },\n {\n \"value\" : \"Isaac Asimov\",\n \"count\" : 1\n },\n {\n \"value\" : \"James S.A. Corey\",\n \"count\" : 1\n }\n ]\n },\n \"name\" : {\n \"count\" : 24,\n \"cardinality\" : 24,\n \"top_hits\" : [\n {\n \"value\" : \"1984\",\n \"count\" : 1\n },\n {\n \"value\" : \"A Fire Upon the Deep\",\n \"count\" : 1\n },\n {\n \"value\" : \"Brave New World\",\n \"count\" : 1\n },\n {\n \"value\" : \"Children of Dune\",\n \"count\" : 1\n },\n {\n \"value\" : \"Consider Phlebas\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dune\",\n \"count\" : 1\n },\n {\n \"value\" : \"Dune Messiah\",\n \"count\" : 1\n },\n {\n \"value\" : \"Ender's Game\",\n \"count\" : 1\n },\n {\n \"value\" : \"Fahrenheit 451\",\n \"count\" : 1\n },\n {\n \"value\" : \"Foundation\",\n \"count\" : 1\n }\n ]\n },\n \"page_count\" : {\n \"count\" : 24,\n \"cardinality\" : 24,\n \"min_value\" : 180,\n \"max_value\" : 768,\n \"mean_value\" : 387.0833333333333,\n \"median_value\" : 329.5,\n \"top_hits\" : [\n {\n \"value\" : 180,\n \"count\" : 1\n },\n {\n \"value\" : 208,\n \"count\" : 1\n },\n {\n \"value\" : 224,\n \"count\" : 1\n },\n {\n \"value\" : 227,\n \"count\" : 1\n },\n {\n \"value\" : 268,\n \"count\" : 1\n },\n {\n \"value\" : 271,\n \"count\" : 1\n },\n {\n \"value\" : 275,\n \"count\" : 1\n },\n {\n \"value\" : 288,\n \"count\" : 1\n },\n {\n \"value\" : 304,\n \"count\" : 1\n },\n {\n \"value\" : 311,\n \"count\" : 1\n }\n ]\n },\n \"release_date\" : {\n \"count\" : 24,\n \"cardinality\" : 20,\n \"earliest\" : \"1932-06-01\",\n \"latest\" : \"2011-06-02\",\n \"top_hits\" : [\n {\n \"value\" : \"1985-06-01\",\n \"count\" : 3\n },\n {\n \"value\" : \"1969-06-01\",\n \"count\" : 2\n },\n {\n \"value\" : \"1992-06-01\",\n \"count\" : 2\n },\n {\n \"value\" : \"1932-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1951-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1953-10-15\",\n \"count\" : 1\n },\n {\n \"value\" : \"1959-12-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1965-06-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1966-04-01\",\n \"count\" : 1\n },\n {\n \"value\" : \"1969-10-15\",\n \"count\" : 1\n }\n ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/flush-job.asciidoc",
- "line": 71
- },
- "digest": "02520ac7816b2c4cf8fb413fd16122f2",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_flush\n{\n \"calc_interim\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_flush",
- "query": null,
- "body": {
- "calc_interim": true
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.flush_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/flush-job.asciidoc",
- "line": 82
- },
- "digest": "aa814fa4e6fba339421d0c6c94680041",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"flushed\": true,\n \"last_finalized_bucket_end\": 1455234900000\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/flush-job.asciidoc",
- "line": 98
- },
- "digest": "7ebfb30b3ece855c1b783d9210939469",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/total-requests/_flush\n{\n \"advance_time\": \"1514804400000\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/total-requests/_flush",
- "query": null,
- "body": {
- "advance_time": "1514804400000"
- },
- "params": {
- "job_id": "total-requests"
- },
- "api": "ml.flush_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/flush-job.asciidoc",
- "line": 109
- },
- "digest": "f6622deb2aae0e2e468ff3b3285eaaa5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"flushed\": true,\n \"last_finalized_bucket_end\": 1514804400000\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/forecast.asciidoc",
- "line": 76
- },
- "digest": "591c7fb7451069829a14bba593136f1f",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_forecast\n{\n \"duration\": \"10d\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_forecast",
- "query": null,
- "body": {
- "duration": "10d"
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.forecast"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-bucket.asciidoc",
- "line": 178
- },
- "digest": "f96d4614f2fc294339fef325b794355f",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/low_request_rate/results/buckets\n{\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/low_request_rate/results/buckets",
- "query": null,
- "body": {
- "anomaly_score": 80,
- "start": "1454530200001"
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.get_buckets"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-calendar.asciidoc",
- "line": 68
- },
- "digest": "5fca6671bc8eaddc44ac488d1c3c6909",
- "lang": "console",
- "found": [],
- "source": "GET _ml/calendars/planned-outages",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/calendars/planned-outages",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.get_calendars"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-calendar.asciidoc",
- "line": 76
- },
- "digest": "e611275d3d0d39a05718b5468d3c51b4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 1,\n \"calendars\": [\n {\n \"calendar_id\": \"planned-outages\",\n \"job_ids\": [\n \"total-requests\"\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-category.asciidoc",
- "line": 130
- },
- "digest": "e8f1c9ee003d115ec8f55e57990df6e4",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/esxi_log/results/categories\n{\n \"page\":{\n \"size\": 1\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/esxi_log/results/categories",
- "query": null,
- "body": {
- "page": {
- "size": 1
- }
- },
- "params": {
- "job_id": "esxi_log"
- },
- "api": "ml.get_categories"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-datafeed.asciidoc",
- "line": 77
- },
- "digest": "4fa9ee04188cbf0b38cfc28f6a56527d",
- "lang": "console",
- "found": [],
- "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/datafeeds/datafeed-high_sum_total_sales",
- "query": null,
- "body": null,
- "params": {
- "datafeed_id": "datafeed-high_sum_total_sales"
- },
- "api": "ml.get_datafeeds"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-datafeed.asciidoc",
- "line": 85
- },
- "digest": "5d99d21222b701c5d94bfccefc210a6e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"datafeeds\" : [\n {\n \"datafeed_id\" : \"datafeed-high_sum_total_sales\",\n \"job_id\" : \"high_sum_total_sales\",\n \"query_delay\" : \"93169ms\",\n \"indices\" : [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\" : {\n \"bool\" : {\n \"filter\" : [\n {\n \"term\" : {\n \"_index\" : \"kibana_sample_data_ecommerce\"\n }\n }\n ]\n }\n },\n \"scroll_size\" : 1000,\n \"chunking_config\" : {\n \"mode\" : \"auto\"\n },\n \"delayed_data_check_config\" : {\n \"enabled\" : true\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-datafeed-stats.asciidoc",
- "line": 153
- },
- "digest": "f44d287c6937785eb09b91353c1deb1e",
- "lang": "console",
- "found": [],
- "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/datafeeds/datafeed-high_sum_total_sales/_stats",
- "query": null,
- "body": null,
- "params": {
- "datafeed_id": "datafeed-high_sum_total_sales"
- },
- "api": "ml.get_datafeed_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-datafeed-stats.asciidoc",
- "line": 161
- },
- "digest": "1217b5b9acc1a42b1854ce7d5d6f34d2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"datafeeds\" : [\n {\n \"datafeed_id\" : \"datafeed-high_sum_total_sales\",\n \"state\" : \"started\",\n \"node\" : {\n \"id\" : \"7bmMXyWCRs-TuPfGJJ_yMw\",\n \"name\" : \"node-0\",\n \"ephemeral_id\" : \"hoXMLZB0RWKfR9UPPUCxXX\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"attributes\" : {\n \"ml.machine_memory\" : \"17179869184\",\n \"ml.max_open_jobs\" : \"20\"\n }\n },\n \"assignment_explanation\" : \"\",\n \"timing_stats\" : {\n \"job_id\" : \"high_sum_total_sales\",\n \"search_count\" : 7,\n \"bucket_count\" : 743,\n \"total_search_time_ms\" : 134.0,\n \"average_search_time_per_bucket_ms\" : 0.180349932705249,\n \"exponential_average_search_time_per_hour_ms\" : 11.514712961628677\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-influencer.asciidoc",
- "line": 128
- },
- "digest": "5bbccf103107e505c17ae59863753efd",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/high_sum_total_sales/results/influencers\n{\n \"sort\": \"influencer_score\",\n \"desc\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/high_sum_total_sales/results/influencers",
- "query": null,
- "body": {
- "sort": "influencer_score",
- "desc": true
- },
- "params": {
- "job_id": "high_sum_total_sales"
- },
- "api": "ml.get_influencers"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-job.asciidoc",
- "line": 90
- },
- "digest": "86280dcb49aa89083be4b2644daf1b7c",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/high_sum_total_sales",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/high_sum_total_sales",
- "query": null,
- "body": null,
- "params": {
- "job_id": "high_sum_total_sales"
- },
- "api": "ml.get_jobs"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-job-stats.asciidoc",
- "line": 370
- },
- "digest": "9298aaf8232a819e79b3bf8471245e98",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/low_request_rate/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/low_request_rate/_stats",
- "query": null,
- "body": null,
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.get_job_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-ml-info.asciidoc",
- "line": 41
- },
- "digest": "4d7c0b52d3c0a084157428624c543c90",
- "lang": "console",
- "found": [],
- "source": "GET _ml/info",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/info",
- "query": null,
- "body": null,
- "params": null,
- "api": "ml.info"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-ml-info.asciidoc",
- "line": 49
- },
- "digest": "3ad17b0bc83a8a937cba4bffa15486fc",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"defaults\" : {\n \"anomaly_detectors\" : {\n \"categorization_analyzer\" : {\n \"tokenizer\" : \"ml_classic\",\n \"filter\" : [\n {\n \"type\" : \"stop\",\n \"stopwords\" : [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\",\n \"Sun\",\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n \"GMT\",\n \"UTC\"\n ]\n }\n ]\n },\n \"model_memory_limit\" : \"1gb\",\n \"categorization_examples_limit\" : 4,\n \"model_snapshot_retention_days\" : 10,\n \"daily_model_snapshot_retention_after_days\" : 1\n },\n \"datafeeds\" : {\n \"scroll_size\" : 1000\n }\n },\n \"upgrade_mode\": false,\n \"native_code\" : {\n \"version\": \"7.0.0\",\n \"build_hash\": \"99a07c016d5a73\"\n },\n \"limits\" : {\n \"effective_max_model_memory_limit\": \"28961mb\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-snapshot.asciidoc",
- "line": 204
- },
- "digest": "c873f9cd093e26515148f052e28c7805",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots\n{\n \"start\": \"1575402236000\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots",
- "query": null,
- "body": {
- "start": "1575402236000"
- },
- "params": {
- "job_id": "high_sum_total_sales"
- },
- "api": "ml.get_model_snapshots"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-overall-buckets.asciidoc",
- "line": 124
- },
- "digest": "e48e7da65c2b32d724fd7e3bfa175c6f",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/job-*/results/overall_buckets\n{\n \"overall_score\": 80,\n \"start\": \"1403532000000\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/job-*/results/overall_buckets",
- "query": null,
- "body": {
- "overall_score": 80,
- "start": "1403532000000"
- },
- "params": {
- "job_id": "job-*"
- },
- "api": "ml.get_overall_buckets"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-overall-buckets.asciidoc",
- "line": 169
- },
- "digest": "405db6f3a01eceacfaa8b0ed3e4b3ac2",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/job-*/results/overall_buckets\n{\n \"top_n\": 2,\n \"overall_score\": 50.0,\n \"start\": \"1403532000000\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/job-*/results/overall_buckets",
- "query": null,
- "body": {
- "top_n": 2,
- "overall_score": 50,
- "start": "1403532000000"
- },
- "params": {
- "job_id": "job-*"
- },
- "api": "ml.get_overall_buckets"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-calendar-event.asciidoc",
- "line": 85
- },
- "digest": "39d6f575c9458d9c941364dfd0493fa0",
- "lang": "console",
- "found": [],
- "source": "GET _ml/calendars/planned-outages/events",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/calendars/planned-outages/events",
- "query": null,
- "body": null,
- "params": {
- "calendar_id": "planned-outages"
- },
- "api": "ml.get_calendar_events"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-calendar-event.asciidoc",
- "line": 93
- },
- "digest": "8c820d98ef814220df1fed0dad919ca6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 3,\n \"events\": [\n {\n \"description\": \"event 1\",\n \"start_time\": 1513641600000,\n \"end_time\": 1513728000000,\n \"calendar_id\": \"planned-outages\",\n \"event_id\": \"LS8LJGEBMTCMA-qz49st\"\n },\n {\n \"description\": \"event 2\",\n \"start_time\": 1513814400000,\n \"end_time\": 1513900800000,\n \"calendar_id\": \"planned-outages\",\n \"event_id\": \"Li8LJGEBMTCMA-qz49st\"\n },\n {\n \"description\": \"event 3\",\n \"start_time\": 1514160000000,\n \"end_time\": 1514246400000,\n \"calendar_id\": \"planned-outages\",\n \"event_id\": \"Ly8LJGEBMTCMA-qz49st\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-filter.asciidoc",
- "line": 67
- },
- "digest": "800861c15bb33ca01a46fb97dde7537a",
- "lang": "console",
- "found": [],
- "source": "GET _ml/filters/safe_domains",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/filters/safe_domains",
- "query": null,
- "body": null,
- "params": {
- "filter_id": "safe_domains"
- },
- "api": "ml.get_filters"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-filter.asciidoc",
- "line": 75
- },
- "digest": "b72f41bb18115f07edacf2eb5e6ec8c4",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 1,\n \"filters\": [\n {\n \"filter_id\": \"safe_domains\",\n \"description\": \"A list of safe domains\",\n \"items\": [\n \"*.google.com\",\n \"wikipedia.org\"\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/get-record.asciidoc",
- "line": 202
- },
- "digest": "20e3b181114e00c943a27a9bbcf85f15",
- "lang": "console",
- "found": [],
- "source": "GET _ml/anomaly_detectors/low_request_rate/results/records\n{\n \"sort\": \"record_score\",\n \"desc\": true,\n \"start\": \"1454944100000\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/anomaly_detectors/low_request_rate/results/records",
- "query": null,
- "body": {
- "sort": "record_score",
- "desc": true,
- "start": "1454944100000"
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.get_records"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/open-job.asciidoc",
- "line": 65
- },
- "digest": "a6204edaa0bcf7b82a89ab4f6bda0914",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_open\n{\n \"timeout\": \"35m\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_open",
- "query": null,
- "body": {
- "timeout": "35m"
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.open_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/open-job.asciidoc",
- "line": 76
- },
- "digest": "b5835f0dd6c814da70c497d320f67f2a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"opened\" : true,\n \"node\" : \"node-1\"\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/preview-datafeed.asciidoc",
- "line": 53
- },
- "digest": "38eed000de433b540116928681c520d3",
- "lang": "console",
- "found": [],
- "source": "GET _ml/datafeeds/datafeed-high_sum_total_sales/_preview",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/datafeeds/datafeed-high_sum_total_sales/_preview",
- "query": null,
- "body": null,
- "params": {
- "datafeed_id": "datafeed-high_sum_total_sales"
- },
- "api": "ml.preview_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/preview-datafeed.asciidoc",
- "line": 61
- },
- "digest": "cb9301147c1c73e6d4b6abfbe731e2f7",
- "lang": "console-result",
- "found": [],
- "source": "[\n {\n \"order_date\" : 1574294659000,\n \"category.keyword\" : \"Men's Clothing\",\n \"customer_full_name.keyword\" : \"Sultan Al Benson\",\n \"taxful_total_price\" : 35.96875\n },\n {\n \"order_date\" : 1574294918000,\n \"category.keyword\" : [\n \"Women's Accessories\",\n \"Women's Clothing\"\n ],\n \"customer_full_name.keyword\" : \"Pia Webb\",\n \"taxful_total_price\" : 83.0\n },\n {\n \"order_date\" : 1574295782000,\n \"category.keyword\" : [\n \"Women's Accessories\",\n \"Women's Shoes\"\n ],\n \"customer_full_name.keyword\" : \"Brigitte Graham\",\n \"taxful_total_price\" : 72.0\n }\n]"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/revert-snapshot.asciidoc",
- "line": 62
- },
- "digest": "b173b1b5bab610668ab74d5b2ab03f78",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/high_sum_total_sales/model_snapshots/1575402237/_revert\n{\n \"delete_intervening_results\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots/1575402237/_revert",
- "query": null,
- "body": {
- "delete_intervening_results": true
- },
- "params": {
- "job_id": "high_sum_total_sales",
- "snapshot_id": "1575402237"
- },
- "api": "ml.revert_model_snapshot"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/set-upgrade-mode.asciidoc",
- "line": 76
- },
- "digest": "ae4aa368617637a390074535df86e64b",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=true&timeout=10m",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "true",
- "timeout": "10m"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/set-upgrade-mode.asciidoc",
- "line": 83
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/set-upgrade-mode.asciidoc",
- "line": 98
- },
- "digest": "8e9e7dc5fad2b2b8e74ab4dc225d9c53",
- "lang": "console",
- "found": [],
- "source": "POST _ml/set_upgrade_mode?enabled=false&timeout=10m",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/set_upgrade_mode",
- "query": {
- "enabled": "false",
- "timeout": "10m"
- },
- "body": null,
- "params": null,
- "api": "ml.set_upgrade_mode"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/start-datafeed.asciidoc",
- "line": 113
- },
- "digest": "d7ae456f119246e95f2f4c37e7544b8c",
- "lang": "console",
- "found": [],
- "source": "POST _ml/datafeeds/datafeed-low_request_rate/_start\n{\n \"start\": \"2019-04-07T18:22:16Z\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/datafeeds/datafeed-low_request_rate/_start",
- "query": null,
- "body": {
- "start": "2019-04-07T18:22:16Z"
- },
- "params": {
- "datafeed_id": "datafeed-low_request_rate"
- },
- "api": "ml.start_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/start-datafeed.asciidoc",
- "line": 124
- },
- "digest": "cf5c7db01c545fa26fe97bc7409d3ed1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"started\" : true,\n \"node\" : \"node-1\"\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/stop-datafeed.asciidoc",
- "line": 74
- },
- "digest": "fd60b4092c6552164862cec287359676",
- "lang": "console",
- "found": [],
- "source": "POST _ml/datafeeds/datafeed-low_request_rate/_stop\n{\n \"timeout\": \"30s\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/datafeeds/datafeed-low_request_rate/_stop",
- "query": null,
- "body": {
- "timeout": "30s"
- },
- "params": {
- "datafeed_id": "datafeed-low_request_rate"
- },
- "api": "ml.stop_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/stop-datafeed.asciidoc",
- "line": 85
- },
- "digest": "5dcda409b93a4b4a031d6990cee66328",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"stopped\": true\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-datafeed.asciidoc",
- "line": 115
- },
- "digest": "df6d5b5f8e1c8785503269ccb7b34763",
- "lang": "console",
- "found": [],
- "source": "POST _ml/datafeeds/datafeed-total-requests/_update\n{\n \"query\": {\n \"term\": {\n \"level\": \"error\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/datafeeds/datafeed-total-requests/_update",
- "query": null,
- "body": {
- "query": {
- "term": {
- "level": "error"
- }
- }
- },
- "params": {
- "datafeed_id": "datafeed-total-requests"
- },
- "api": "ml.update_datafeed"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-datafeed.asciidoc",
- "line": 131
- },
- "digest": "037d9fe54be67c0e6418799c3cfe7b50",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"datafeed_id\": \"datafeed-total-requests\",\n \"job_id\": \"total-requests\",\n \"query_delay\": \"83474ms\",\n \"indices\": [\"server-metrics\"],\n \"query\": {\n \"term\": {\n \"level\": {\n \"value\": \"error\",\n \"boost\": 1.0\n }\n }\n },\n \"scroll_size\": 1000,\n \"chunking_config\": {\n \"mode\": \"auto\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-filter.asciidoc",
- "line": 46
- },
- "digest": "4d21725453955582ff12b4a1104aa7b6",
- "lang": "console",
- "found": [],
- "source": "POST _ml/filters/safe_domains/_update\n{\n \"description\": \"Updated list of domains\",\n \"add_items\": [\"*.myorg.com\"],\n \"remove_items\": [\"wikipedia.org\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/filters/safe_domains/_update",
- "query": null,
- "body": {
- "description": "Updated list of domains",
- "add_items": [
- "*.myorg.com"
- ],
- "remove_items": [
- "wikipedia.org"
- ]
- },
- "params": {
- "filter_id": "safe_domains"
- },
- "api": "ml.update_filter"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-filter.asciidoc",
- "line": 59
- },
- "digest": "c1cdffb22de3a5beadff539c0e856e60",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"filter_id\": \"safe_domains\",\n \"description\": \"Updated list of domains\",\n \"items\": [\"*.google.com\", \"*.myorg.com\"]\n}"
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-job.asciidoc",
- "line": 238
- },
- "digest": "421e68e2b9789f0e8c08760d9e685d1c",
- "lang": "console",
- "found": [],
- "source": "POST _ml/anomaly_detectors/low_request_rate/_update\n{\n \"description\":\"An updated job\",\n \"detectors\": {\n \"detector_index\": 0,\n \"description\": \"An updated detector description\"\n },\n \"groups\": [\"kibana_sample_data\",\"kibana_sample_web_logs\"],\n \"model_plot_config\": {\n \"enabled\": true\n },\n \"renormalization_window_days\": 30,\n \"background_persist_interval\": \"2h\",\n \"model_snapshot_retention_days\": 7,\n \"results_retention_days\": 60\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/low_request_rate/_update",
- "query": null,
- "body": {
- "description": "An updated job",
- "detectors": {
- "detector_index": 0,
- "description": "An updated detector description"
- },
- "groups": [
- "kibana_sample_data",
- "kibana_sample_web_logs"
- ],
- "model_plot_config": {
- "enabled": true
- },
- "renormalization_window_days": 30,
- "background_persist_interval": "2h",
- "model_snapshot_retention_days": 7,
- "results_retention_days": 60
- },
- "params": {
- "job_id": "low_request_rate"
- },
- "api": "ml.update_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/anomaly-detection/apis/update-snapshot.asciidoc",
- "line": 52
- },
- "digest": "3b9c54604535d97e8368d47148aecc6f",
- "lang": "console",
- "found": [],
- "source": "POST\n_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update\n{\n \"description\": \"Snapshot 1\",\n \"retain\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update",
- "query": null,
- "body": {
- "description": "Snapshot 1",
- "retain": true
- },
- "params": {
- "job_id": "it_ops_new_logs",
- "snapshot_id": "1491852978"
- },
- "api": "ml.update_model_snapshot"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 399
- },
- "digest": "8c6f3bb8abae9ff1d21e776f16ad1c86",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/model-flight-delays-pre\n{\n \"source\": {\n \"index\": [\n \"kibana_sample_data_flights\" <1>\n ],\n \"query\": { <2>\n \"range\": {\n \"DistanceKilometers\": {\n \"gt\": 0\n }\n }\n },\n \"_source\": { <3>\n \"includes\": [],\n \"excludes\": [\n \"FlightDelay\",\n \"FlightDelayType\"\n ]\n }\n },\n \"dest\": { <4>\n \"index\": \"df-flight-delays\",\n \"results_field\": \"ml-results\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"FlightDelayMin\",\n \"training_percent\": 90\n }\n },\n \"analyzed_fields\": { <5>\n \"includes\": [],\n \"excludes\": [\n \"FlightNum\"\n ]\n },\n \"model_memory_limit\": \"100mb\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/model-flight-delays-pre",
- "query": null,
- "body": {
- "source": {
- "index": [
- "kibana_sample_data_flights"
- ],
- "query": {
- "range": {
- "DistanceKilometers": {
- "gt": 0
- }
- }
- },
- "_source": {
- "includes": [],
- "excludes": [
- "FlightDelay",
- "FlightDelayType"
- ]
- }
- },
- "dest": {
- "index": "df-flight-delays",
- "results_field": "ml-results"
- },
- "analysis": {
- "regression": {
- "dependent_variable": "FlightDelayMin",
- "training_percent": 90
- }
- },
- "analyzed_fields": {
- "includes": [],
- "excludes": [
- "FlightNum"
- ]
- },
- "model_memory_limit": "100mb"
- },
- "params": {
- "id": "model-flight-delays-pre"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 469
- },
- "digest": "ce3c391c2b1915cfc44a2917bca71d19",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/loganalytics\n{\n \"description\": \"Outlier detection on log data\",\n \"source\": {\n \"index\": \"logdata\"\n },\n \"dest\": {\n \"index\": \"logdata_out\"\n },\n \"analysis\": {\n \"outlier_detection\": {\n \"compute_feature_influence\": true,\n \"outlier_fraction\": 0.05,\n \"standardization_enabled\": true\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/loganalytics",
- "query": null,
- "body": {
- "description": "Outlier detection on log data",
- "source": {
- "index": "logdata"
- },
- "dest": {
- "index": "logdata_out"
- },
- "analysis": {
- "outlier_detection": {
- "compute_feature_influence": true,
- "outlier_fraction": 0.05,
- "standardization_enabled": true
- }
- }
- },
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 494
- },
- "digest": "c773f11adf30c8ac60005cd4ddb5c2bb",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\": \"loganalytics\",\n \"description\": \"Outlier detection on log data\",\n \"source\": {\n \"index\": [\"logdata\"],\n \"query\": {\n \"match_all\": {}\n }\n },\n \"dest\": {\n \"index\": \"logdata_out\",\n \"results_field\": \"ml\"\n },\n \"analysis\": {\n \"outlier_detection\": {\n \"compute_feature_influence\": true,\n \"outlier_fraction\": 0.05,\n \"standardization_enabled\": true\n }\n },\n \"model_memory_limit\": \"1gb\",\n \"create_time\" : 1562265491319,\n \"version\" : \"8.0.0\",\n \"allow_lazy_start\" : false,\n \"max_num_threads\": 1\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 533
- },
- "digest": "e8211247c280a3fbbbdd32850b743b7b",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/house_price_regression_analysis\n{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"dest\": {\n \"index\": \"house_price_predictions\"\n },\n \"analysis\":\n {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/house_price_regression_analysis",
- "query": null,
- "body": {
- "source": {
- "index": "houses_sold_last_10_yrs"
- },
- "dest": {
- "index": "house_price_predictions"
- },
- "analysis": {
- "regression": {
- "dependent_variable": "price"
- }
- }
- },
- "params": {
- "id": "house_price_regression_analysis"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 556
- },
- "digest": "4ff328150800d40f323aa57c871362d7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\" : \"house_price_regression_analysis\",\n \"source\" : {\n \"index\" : [\n \"houses_sold_last_10_yrs\"\n ],\n \"query\" : {\n \"match_all\" : { }\n }\n },\n \"dest\" : {\n \"index\" : \"house_price_predictions\",\n \"results_field\" : \"ml\"\n },\n \"analysis\" : {\n \"regression\" : {\n \"dependent_variable\" : \"price\",\n \"training_percent\" : 100\n }\n },\n \"model_memory_limit\" : \"1gb\",\n \"create_time\" : 1567168659127,\n \"version\" : \"8.0.0\",\n \"allow_lazy_start\" : false\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 590
- },
- "digest": "ae82eb17c23cb8e5761cb6240a5ed0a6",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/student_performance_mathematics_0.3\n{\n \"source\": {\n \"index\": \"student_performance_mathematics\"\n },\n \"dest\": {\n \"index\":\"student_performance_mathematics_reg\"\n },\n \"analysis\":\n {\n \"regression\": {\n \"dependent_variable\": \"G3\",\n \"training_percent\": 70, <1>\n \"randomize_seed\": 19673948271 <2>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/student_performance_mathematics_0.3",
- "query": null,
- "body": {
- "source": {
- "index": "student_performance_mathematics"
- },
- "dest": {
- "index": "student_performance_mathematics_reg"
- },
- "analysis": {
- "regression": {
- "dependent_variable": "G3",
- "training_percent": 70,
- "randomize_seed": 19673948271
- }
- }
- },
- "params": {
- "id": "student_performance_mathematics_0.3"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/put-dfanalytics.asciidoc",
- "line": 622
- },
- "digest": "4fb0629146ca78b85e823edd405497bb",
- "lang": "console",
- "found": [],
- "source": "PUT _ml/data_frame/analytics/loan_classification\n{\n \"source\" : {\n \"index\": \"loan-applicants\"\n },\n \"dest\" : {\n \"index\": \"loan-applicants-classified\"\n },\n \"analysis\" : {\n \"classification\": {\n \"dependent_variable\": \"label\",\n \"training_percent\": 75,\n \"num_top_classes\": 2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_ml/data_frame/analytics/loan_classification",
- "query": null,
- "body": {
- "source": {
- "index": "loan-applicants"
- },
- "dest": {
- "index": "loan-applicants-classified"
- },
- "analysis": {
- "classification": {
- "dependent_variable": "label",
- "training_percent": 75,
- "num_top_classes": 2
- }
- }
- },
- "params": {
- "id": "loan_classification"
- },
- "api": "ml.put_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/update-dfanalytics.asciidoc",
- "line": 100
- },
- "digest": "d19956ce4b751d1909ec2d257c4ecaa4",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/analytics/model-flight-delays/_update\n{\n \"model_memory_limit\": \"200mb\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/analytics/model-flight-delays/_update",
- "query": null,
- "body": {
- "model_memory_limit": "200mb"
- },
- "params": {
- "id": "model-flight-delays"
- },
- "api": "ml.update_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/delete-dfanalytics.asciidoc",
- "line": 59
- },
- "digest": "1c8b6768c4eefc76fcb38708152f561b",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/data_frame/analytics/loganalytics",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/data_frame/analytics/loganalytics",
- "query": null,
- "body": null,
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.delete_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/delete-dfanalytics.asciidoc",
- "line": 67
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/delete-inference-trained-model.asciidoc",
- "line": 57
- },
- "digest": "334e28ff99f12b721b9942bad3a78f94",
- "lang": "console",
- "found": [],
- "source": "DELETE _ml/inference/regression-job-one-1574775307356",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_ml/inference/regression-job-one-1574775307356",
- "query": null,
- "body": null,
- "params": {
- "model_id": "regression-job-one-1574775307356"
- },
- "api": "ml.delete_trained_model"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/delete-inference-trained-model.asciidoc",
- "line": 66
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 205
- },
- "digest": "eae68412d998bc0f65b09711f007a4b7",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"my_analytics_dest_index\",\n \"evaluation\": {\n \"binary_soft_classification\": {\n \"actual_field\": \"is_outlier\",\n \"predicted_probability_field\": \"ml.outlier_score\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "my_analytics_dest_index",
- "evaluation": {
- "binary_soft_classification": {
- "actual_field": "is_outlier",
- "predicted_probability_field": "ml.outlier_score"
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 222
- },
- "digest": "7e2a4291c3a234e50d50f3731aff64fe",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"binary_soft_classification\": {\n \"auc_roc\": {\n \"score\": 0.92584757746414444\n },\n \"confusion_matrix\": {\n \"0.25\": {\n \"tp\": 5,\n \"fp\": 9,\n \"tn\": 204,\n \"fn\": 5\n },\n \"0.5\": {\n \"tp\": 1,\n \"fp\": 5,\n \"tn\": 208,\n \"fn\": 9\n },\n \"0.75\": {\n \"tp\": 0,\n \"fp\": 4,\n \"tn\": 209,\n \"fn\": 10\n }\n },\n \"precision\": {\n \"0.25\": 0.35714285714285715,\n \"0.5\": 0.16666666666666666,\n \"0.75\": 0\n },\n \"recall\": {\n \"0.25\": 0.5,\n \"0.5\": 0.1,\n \"0.75\": 0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 267
- },
- "digest": "2ecdc5393ac2a240e8287b50dde9dbd9",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"house_price_predictions\", <1>\n \"query\": {\n \"bool\": {\n \"filter\": [\n { \"term\": { \"ml.is_training\": false } } <2>\n ]\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"price\", <3>\n \"predicted_field\": \"ml.price_prediction\", <4>\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "house_price_predictions",
- "query": {
- "bool": {
- "filter": [
- {
- "term": {
- "ml.is_training": false
- }
- }
- ]
- }
- },
- "evaluation": {
- "regression": {
- "actual_field": "price",
- "predicted_field": "ml.price_prediction",
- "metrics": {
- "r_squared": {},
- "mse": {}
- }
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 304
- },
- "digest": "19c9b45dbd9d289997fc41a296fc28c5",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"student_performance_mathematics_reg\",\n \"query\": {\n \"term\": {\n \"ml.is_training\": {\n \"value\": true <1>\n }\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"G3\", <2>\n \"predicted_field\": \"ml.G3_prediction\", <3>\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "student_performance_mathematics_reg",
- "query": {
- "term": {
- "ml.is_training": {
- "value": true
- }
- }
- },
- "evaluation": {
- "regression": {
- "actual_field": "G3",
- "predicted_field": "ml.G3_prediction",
- "metrics": {
- "r_squared": {},
- "mse": {}
- }
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 343
- },
- "digest": "ca677dce1c1bf08fc1bee1de6ac54502",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"student_performance_mathematics_reg\",\n \"query\": {\n \"term\": {\n \"ml.is_training\": {\n \"value\": false <1>\n }\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"G3\", <2>\n \"predicted_field\": \"ml.G3_prediction\", <3>\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {}\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "student_performance_mathematics_reg",
- "query": {
- "term": {
- "ml.is_training": {
- "value": false
- }
- }
- },
- "evaluation": {
- "regression": {
- "actual_field": "G3",
- "predicted_field": "ml.G3_prediction",
- "metrics": {
- "r_squared": {},
- "mse": {}
- }
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 382
- },
- "digest": "388d3eda4f792d3fce044777739217e6",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/_evaluate\n{\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": { <1>\n \"actual_field\": \"animal_class\", <2>\n \"predicted_field\": \"ml.animal_class_prediction\", <3>\n \"metrics\": {\n \"multiclass_confusion_matrix\" : {} <4>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/_evaluate",
- "query": null,
- "body": {
- "index": "animal_classification",
- "evaluation": {
- "classification": {
- "actual_field": "animal_class",
- "predicted_field": "ml.animal_class_prediction",
- "metrics": {
- "multiclass_confusion_matrix": {}
- }
- }
- }
- },
- "params": null,
- "api": "ml.evaluate_data_frame"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/evaluate-dfanalytics.asciidoc",
- "line": 410
- },
- "digest": "c9b0865574c0db1f8ea02d507e215bfe",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"classification\" : {\n \"multiclass_confusion_matrix\" : {\n \"confusion_matrix\" : [\n {\n \"actual_class\" : \"cat\", <1>\n \"actual_class_doc_count\" : 12, <2>\n \"predicted_classes\" : [ <3>\n {\n \"predicted_class\" : \"cat\",\n \"count\" : 12 <4>\n },\n {\n \"predicted_class\" : \"dog\",\n \"count\" : 0 <5>\n }\n ],\n \"other_predicted_class_doc_count\" : 0 <6>\n },\n {\n \"actual_class\" : \"dog\",\n \"actual_class_doc_count\" : 11,\n \"predicted_classes\" : [\n {\n \"predicted_class\" : \"dog\",\n \"count\" : 7\n },\n {\n \"predicted_class\" : \"cat\",\n \"count\" : 4\n }\n ],\n \"other_predicted_class_doc_count\" : 0\n }\n ],\n \"other_actual_class_count\" : 0\n }\n }\n }"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/explain-dfanalytics.asciidoc",
- "line": 124
- },
- "digest": "8aa17bd25a3f2d634e5253b4b72fec4c",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/analytics/_explain\n{\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/analytics/_explain",
- "query": null,
- "body": {
- "source": {
- "index": "houses_sold_last_10_yrs"
- },
- "analysis": {
- "regression": {
- "dependent_variable": "price"
- }
- }
- },
- "params": null,
- "api": "ml.explain_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/explain-dfanalytics.asciidoc",
- "line": 143
- },
- "digest": "fdfac19398a52c398d60bcdd3d4f7c9d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"field_selection\": [\n {\n \"field\": \"number_of_bedrooms\",\n \"mappings_types\": [\"integer\"],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"numerical\"\n },\n {\n \"field\": \"postcode\",\n \"mappings_types\": [\"text\"],\n \"is_included\": false,\n \"is_required\": false,\n \"reason\": \"[postcode.keyword] is preferred because it is aggregatable\"\n },\n {\n \"field\": \"postcode.keyword\",\n \"mappings_types\": [\"keyword\"],\n \"is_included\": true,\n \"is_required\": false,\n \"feature_type\": \"categorical\"\n },\n {\n \"field\": \"price\",\n \"mappings_types\": [\"float\"],\n \"is_included\": true,\n \"is_required\": true,\n \"feature_type\": \"numerical\"\n }\n ],\n \"memory_estimation\": {\n \"expected_memory_without_disk\": \"128MB\",\n \"expected_memory_with_disk\": \"32MB\"\n }\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-dfanalytics.asciidoc",
- "line": 183
- },
- "digest": "5ccfd9f4698dcd7cdfbc6bad60081aab",
- "lang": "console",
- "found": [],
- "source": "GET _ml/data_frame/analytics/loganalytics",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/data_frame/analytics/loganalytics",
- "query": null,
- "body": null,
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.get_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-dfanalytics.asciidoc",
- "line": 191
- },
- "digest": "fde59be34000b8e62c12d539890e26ff",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 1,\n \"data_frame_analytics\": [\n {\n \"id\": \"loganalytics\",\n \"source\": {\n \"index\": \"logdata\",\n \"query\": {\n \"match_all\": {}\n }\n },\n \"dest\": {\n \"index\": \"logdata_out\",\n \"results_field\": \"ml\"\n },\n \"analysis\": {\n \"outlier_detection\": {}\n },\n \"model_memory_limit\": \"1gb\",\n \"create_time\": 1562265491319,\n \"version\" : \"8.0.0\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-dfanalytics-stats.asciidoc",
- "line": 534
- },
- "digest": "dbd2834971fedbe36911933d451ae65d",
- "lang": "console",
- "found": [],
- "source": "GET _ml/data_frame/analytics/ecommerce/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/data_frame/analytics/ecommerce/_stats",
- "query": null,
- "body": null,
- "params": {
- "id": "ecommerce"
- },
- "api": "ml.get_data_frame_analytics_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-dfanalytics-stats.asciidoc",
- "line": 540
- },
- "digest": "3b676ccb4e56d449957509b191c468ec",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"data_frame_analytics\" : [\n {\n \"id\" : \"ecommerce\",\n \"state\" : \"stopped\",\n \"progress\" : [\n {\n \"phase\" : \"reindexing\",\n \"progress_percent\" : 100\n },\n {\n \"phase\" : \"loading_data\",\n \"progress_percent\" : 100\n },\n {\n \"phase\" : \"analyzing\",\n \"progress_percent\" : 100\n },\n {\n \"phase\" : \"writing_results\",\n \"progress_percent\" : 100\n }\n ],\n \"data_counts\" : {\n \"training_docs_count\" : 3321,\n \"test_docs_count\" : 0,\n \"skipped_docs_count\" : 0\n },\n \"memory_usage\" : {\n \"timestamp\" : 1586905058000,\n \"peak_usage_bytes\" : 279484\n },\n \"analysis_stats\" : {\n \"outlier_detection_stats\" : {\n \"timestamp\" : 1586905058000,\n \"parameters\" : {\n \"n_neighbors\" : 0,\n \"method\" : \"ensemble\",\n \"compute_feature_influence\" : true,\n \"feature_influence_threshold\" : 0.1,\n \"outlier_fraction\" : 0.05,\n \"standardization_enabled\" : true\n },\n \"timing_stats\" : {\n \"elapsed_time\" : 245\n }\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-inference-trained-model.asciidoc",
- "line": 170
- },
- "digest": "f97c7791a0dd23aad5f96fd38ec7d12e",
- "lang": "console",
- "found": [],
- "source": "GET _ml/inference/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/inference/",
- "query": null,
- "body": null,
- "params": null,
- "api": "ml.get_trained_models"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-inference-trained-model-stats.asciidoc",
- "line": 152
- },
- "digest": "2dde95ba98c5d5e19725fbb10435d283",
- "lang": "console",
- "found": [],
- "source": "GET _ml/inference/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ml/inference/_stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "ml.get_trained_models_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/get-inference-trained-model-stats.asciidoc",
- "line": 161
- },
- "digest": "b0a253a5d3a2bc2bb5050675c1730f50",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\": 2,\n \"trained_model_stats\": [\n {\n \"model_id\": \"flight-delay-prediction-1574775339910\",\n \"pipeline_count\": 0,\n \"inference_stats\": {\n \"failure_count\": 0,\n \"inference_count\": 4,\n \"cache_miss_count\": 3,\n \"missing_all_fields_count\": 0,\n \"timestamp\": 1592399986979\n }\n },\n {\n \"model_id\": \"regression-job-one-1574775307356\",\n \"pipeline_count\": 1,\n \"inference_stats\": {\n \"failure_count\": 0,\n \"inference_count\": 178,\n \"cache_miss_count\": 3,\n \"missing_all_fields_count\": 0,\n \"timestamp\": 1592399986979\n },\n \"ingest\": {\n \"total\": {\n \"count\": 178,\n \"time_in_millis\": 8,\n \"current\": 0,\n \"failed\": 0\n },\n \"pipelines\": {\n \"flight-delay\": {\n \"count\": 178,\n \"time_in_millis\": 8,\n \"current\": 0,\n \"failed\": 0,\n \"processors\": [\n {\n \"inference\": {\n \"type\": \"inference\",\n \"stats\": {\n \"count\": 178,\n \"time_in_millis\": 7,\n \"current\": 0,\n \"failed\": 0\n }\n }\n }\n ]\n }\n }\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/start-dfanalytics.asciidoc",
- "line": 89
- },
- "digest": "1a3a4b8a4bfee4ab84ddd13d8835f560",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/analytics/loganalytics/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/analytics/loganalytics/_start",
- "query": null,
- "body": null,
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.start_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/start-dfanalytics.asciidoc",
- "line": 97
- },
- "digest": "f052c0460de9e53274506d780b23f202",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true,\n \"node\" : \"node-1\"\n}"
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/stop-dfanalytics.asciidoc",
- "line": 76
- },
- "digest": "db19cc7a26ca80106d86d688f4be67a8",
- "lang": "console",
- "found": [],
- "source": "POST _ml/data_frame/analytics/loganalytics/_stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_ml/data_frame/analytics/loganalytics/_stop",
- "query": null,
- "body": null,
- "params": {
- "id": "loganalytics"
- },
- "api": "ml.stop_data_frame_analytics"
- }
- ]
- },
- {
- "source_location": {
- "file": "ml/df-analytics/apis/stop-dfanalytics.asciidoc",
- "line": 84
- },
- "digest": "0cb51a35e30e7cb43c0d65adef177a84",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"stopped\" : true\n}"
- },
- {
- "source_location": {
- "file": "migration/apis/deprecation.asciidoc",
- "line": 43
- },
- "digest": "135819da3a4bde684357c57a49ad8e85",
- "lang": "console",
- "found": [],
- "source": "GET /_migration/deprecations",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_migration/deprecations",
- "query": null,
- "body": null,
- "params": null,
- "api": "migration.deprecations"
- }
- ]
- },
- {
- "source_location": {
- "file": "migration/apis/deprecation.asciidoc",
- "line": 122
- },
- "digest": "69f8b0f2a9ba47e11f363d788cee9d6d",
- "lang": "console",
- "found": [],
- "source": "GET /logstash-*/_migration/deprecations",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/logstash-*/_migration/deprecations",
- "query": null,
- "body": null,
- "params": {
- "index": "logstash-*"
- },
- "api": "migration.deprecations"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/reload-analyzers.asciidoc",
- "line": 14
- },
- "digest": "b0015e63323171f38995b8e4aa2b52d5",
- "lang": "console",
- "found": [],
- "source": "POST /twitter/_reload_search_analyzers",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_reload_search_analyzers",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.reload_search_analyzers"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/reload-analyzers.asciidoc",
- "line": 102
- },
- "digest": "db8cbfa2afece5d21b3ca69ffee8f5c0",
- "lang": "console",
- "found": [],
- "source": "PUT /my_index\n{\n \"settings\": {\n \"index\" : {\n \"analysis\" : {\n \"analyzer\" : {\n \"my_synonyms\" : {\n \"tokenizer\" : \"whitespace\",\n \"filter\" : [\"synonym\"]\n }\n },\n \"filter\" : {\n \"synonym\" : {\n \"type\" : \"synonym_graph\",\n \"synonyms_path\" : \"analysis/synonym.txt\", <1>\n \"updateable\" : true <2>\n }\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"text\": {\n \"type\": \"text\",\n \"analyzer\" : \"standard\",\n \"search_analyzer\": \"my_synonyms\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "my_synonyms": {
- "tokenizer": "whitespace",
- "filter": [
- "synonym"
- ]
- }
- },
- "filter": {
- "synonym": {
- "type": "synonym_graph",
- "synonyms_path": "analysis/synonym.txt",
- "updateable": true
- }
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "text": {
- "type": "text",
- "analyzer": "standard",
- "search_analyzer": "my_synonyms"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/reload-analyzers.asciidoc",
- "line": 146
- },
- "digest": "7554da505cc27f6bd0d028b66e85f4a5",
- "lang": "console",
- "found": [],
- "source": "POST /my_index/_reload_search_analyzers",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/my_index/_reload_search_analyzers",
- "query": null,
- "body": null,
- "params": {
- "index": "my_index"
- },
- "api": "indices.reload_search_analyzers"
- }
- ]
- },
- {
- "source_location": {
- "file": "indices/apis/reload-analyzers.asciidoc",
- "line": 154
- },
- "digest": "02c4e2e6c6793d50a38aa77a3daaab67",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 2,\n \"successful\" : 2,\n \"failed\" : 0\n },\n \"reload_details\" : [\n {\n \"index\" : \"my_index\",\n \"reloaded_analyzers\" : [\n \"my_synonyms\"\n ],\n \"reloaded_node_ids\" : [\n \"mfdqTXn_T7SGr2Ho2KT8uw\"\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/put-job.asciidoc",
- "line": 247
- },
- "digest": "2025834fab7efbb0542275c30d9d0bfe",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : { <1>\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [ <2>\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/put-job.asciidoc",
- "line": 286
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/delete-job.asciidoc",
- "line": 80
- },
- "digest": "94246f45025ed394cd6415ed8d7a0588",
- "lang": "console",
- "found": [],
- "source": "DELETE _rollup/job/sensor",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.delete_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/delete-job.asciidoc",
- "line": 88
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/get-job.asciidoc",
- "line": 89
- },
- "digest": "d095b422d9803c02b62c01adffc85376",
- "lang": "console",
- "found": [],
- "source": "GET _rollup/job/sensor",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.get_jobs"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/get-job.asciidoc",
- "line": 97
- },
- "digest": "ab98ea7ccb077daef197ae0e9e2e2588",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"jobs\" : [\n {\n \"config\" : {\n \"id\" : \"sensor\",\n \"index_pattern\" : \"sensor-*\",\n \"rollup_index\" : \"sensor_rollup\",\n \"cron\" : \"*/30 * * * * ?\",\n \"groups\" : {\n \"date_histogram\" : {\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\",\n \"field\": \"timestamp\",\n \"time_zone\": \"UTC\"\n },\n \"terms\" : {\n \"fields\" : [\n \"node\"\n ]\n }\n },\n \"metrics\" : [\n {\n \"field\" : \"temperature\",\n \"metrics\" : [\n \"min\",\n \"max\",\n \"sum\"\n ]\n },\n {\n \"field\" : \"voltage\",\n \"metrics\" : [\n \"avg\"\n ]\n }\n ],\n \"timeout\" : \"20s\",\n \"page_size\" : 1000\n },\n \"status\" : {\n \"job_state\" : \"stopped\"\n },\n \"stats\" : {\n \"pages_processed\" : 0,\n \"documents_processed\" : 0,\n \"rollups_indexed\" : 0,\n \"trigger_count\" : 0,\n \"index_failures\": 0,\n \"index_time_in_ms\": 0,\n \"index_total\": 0,\n \"search_failures\": 0,\n \"search_time_in_ms\": 0,\n \"search_total\": 0,\n \"processing_time_in_ms\": 0,\n \"processing_total\": 0\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/get-job.asciidoc",
- "line": 164
- },
- "digest": "6d13e0721a7aac00adcdc5fe77198300",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor2 <1>\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}\n\nGET _rollup/job/_all <2>",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor2",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor2"
- },
- "api": "rollup.put_job"
- },
- {
- "method": "GET",
- "url": "/_rollup/job/_all",
- "query": null,
- "body": null,
- "params": {
- "id": "_all"
- },
- "api": "rollup.get_jobs"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 57
- },
- "digest": "2d20c42e9664febeccaff61581605cbe",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 92
- },
- "digest": "a00311843b5f8f3e9f7d511334a828b1",
- "lang": "console",
- "found": [],
- "source": "GET _rollup/data/sensor-*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_rollup/data/sensor-*",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor-*"
- },
- "api": "rollup.get_rollup_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 100
- },
- "digest": "daffdcda9042b8ac26bc109a3b38173a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"sensor-*\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 164
- },
- "digest": "944806221eb89f5af2298ccdf2902277",
- "lang": "console",
- "found": [],
- "source": "GET _rollup/data/_all",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_rollup/data/_all",
- "query": null,
- "body": null,
- "params": {
- "id": "_all"
- },
- "api": "rollup.get_rollup_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 173
- },
- "digest": "f8cb1a04c2e487ff006b5ae0e1a7afbd",
- "lang": "console",
- "found": [],
- "source": "GET _rollup/data/sensor-1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_rollup/data/sensor-1",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor-1"
- },
- "api": "rollup.get_rollup_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-caps.asciidoc",
- "line": 179
- },
- "digest": "ecde3c2fa2f4b771baec679a4cdf348f",
- "lang": "console-result",
- "found": [],
- "source": "{\n\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-index-caps.asciidoc",
- "line": 53
- },
- "digest": "2d20c42e9664febeccaff61581605cbe",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-index-caps.asciidoc",
- "line": 88
- },
- "digest": "73d1a6c5ef90b7e35d43a0bfdc1e158d",
- "lang": "console",
- "found": [],
- "source": "GET /sensor_rollup/_rollup/data",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup/data",
- "query": null,
- "body": null,
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.get_rollup_index_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-index-caps.asciidoc",
- "line": 97
- },
- "digest": "b656c91a173b5aaaf21efb9ff882c0b6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"sensor_rollup\" : {\n \"rollup_jobs\" : [\n {\n \"job_id\" : \"sensor\",\n \"rollup_index\" : \"sensor_rollup\",\n \"index_pattern\" : \"sensor-*\",\n \"fields\" : {\n \"node\" : [\n {\n \"agg\" : \"terms\"\n }\n ],\n \"temperature\" : [\n {\n \"agg\" : \"min\"\n },\n {\n \"agg\" : \"max\"\n },\n {\n \"agg\" : \"sum\"\n }\n ],\n \"timestamp\" : [\n {\n \"agg\" : \"date_histogram\",\n \"time_zone\" : \"UTC\",\n \"fixed_interval\" : \"1h\",\n \"delay\": \"7d\"\n }\n ],\n \"voltage\" : [\n {\n \"agg\" : \"avg\"\n }\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-index-caps.asciidoc",
- "line": 163
- },
- "digest": "642161d70dacf7d153767d37d3726838",
- "lang": "console",
- "found": [],
- "source": "GET /*_rollup/_rollup/data",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/*_rollup/_rollup/data",
- "query": null,
- "body": null,
- "params": {
- "index": "*_rollup"
- },
- "api": "rollup.get_rollup_index_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 79
- },
- "digest": "2d20c42e9664febeccaff61581605cbe",
- "lang": "console",
- "found": [],
- "source": "PUT _rollup/job/sensor\n{\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\" :1000,\n \"groups\" : {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\"node\"]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\"min\", \"max\", \"sum\"]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\"avg\"]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_rollup/job/sensor",
- "query": null,
- "body": {
- "index_pattern": "sensor-*",
- "rollup_index": "sensor_rollup",
- "cron": "*/30 * * * * ?",
- "page_size": 1000,
- "groups": {
- "date_histogram": {
- "field": "timestamp",
- "fixed_interval": "1h",
- "delay": "7d"
- },
- "terms": {
- "fields": [
- "node"
- ]
- }
- },
- "metrics": [
- {
- "field": "temperature",
- "metrics": [
- "min",
- "max",
- "sum"
- ]
- },
- {
- "field": "voltage",
- "metrics": [
- "avg"
- ]
- }
- ]
- },
- "params": {
- "id": "sensor"
- },
- "api": "rollup.put_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 116
- },
- "digest": "4e63a0fd56cc5d59595baa0b0721f971",
- "lang": "console",
- "found": [],
- "source": "GET /sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "max_temperature": {
- "max": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 137
- },
- "digest": "82742a24e16fbaffa950867499a39b97",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 102,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : ... ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"max_temperature\" : {\n \"value\" : 202.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 171
- },
- "digest": "3d1cea1ad861d1ee62e5f34b84371943",
- "lang": "console",
- "found": [],
- "source": "GET sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"avg_temperature\": {\n \"avg\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "avg_temperature": {
- "avg": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 188
- },
- "digest": "b010489cc7d519a628dcbc1ce81adb3c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"error\" : {\n \"root_cause\" : [\n {\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"There is not a rollup job that has a [avg] agg with name [avg_temperature] which also satisfies all requirements of query.\",\n \"stack_trace\": ...\n }\n ],\n \"type\" : \"illegal_argument_exception\",\n \"reason\" : \"There is not a rollup job that has a [avg] agg with name [avg_temperature] which also satisfies all requirements of query.\",\n \"stack_trace\": ...\n },\n \"status\": 400\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 214
- },
- "digest": "adcd760ef029f744ab59460818d2342e",
- "lang": "console",
- "found": [],
- "source": "GET sensor-1,sensor_rollup/_rollup_search <1>\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/sensor-1,sensor_rollup/_rollup_search",
- "query": null,
- "body": {
- "size": 0,
- "aggregations": {
- "max_temperature": {
- "max": {
- "field": "temperature"
- }
- }
- }
- },
- "params": {
- "index": "sensor-1,sensor_rollup"
- },
- "api": "rollup.rollup_search"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/rollup-search.asciidoc",
- "line": 245
- },
- "digest": "82742a24e16fbaffa950867499a39b97",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\" : 102,\n \"timed_out\" : false,\n \"terminated_early\" : false,\n \"_shards\" : ... ,\n \"hits\" : {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : 0.0,\n \"hits\" : [ ]\n },\n \"aggregations\" : {\n \"max_temperature\" : {\n \"value\" : 202.0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/start-job.asciidoc",
- "line": 51
- },
- "digest": "618c9d42284c067891fb57034a4fd834",
- "lang": "console",
- "found": [],
- "source": "POST _rollup/job/sensor/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_rollup/job/sensor/_start",
- "query": null,
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.start_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "rollup/apis/start-job.asciidoc",
- "line": 59
- },
- "digest": "1851f163178ac4046c8fc88b0293644f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"started\": true\n}"
- },
- {
- "source_location": {
- "file": "rollup/apis/stop-job.asciidoc",
- "line": 76
- },
- "digest": "07a5fdeb7805cec1d28ba288b28f5ff5",
- "lang": "console",
- "found": [],
- "source": "POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_rollup/job/sensor/_stop",
- "query": {
- "wait_for_completion": "true",
- "timeout": "10s"
- },
- "body": null,
- "params": {
- "id": "sensor"
- },
- "api": "rollup.stop_job"
- }
- ]
- },
- {
- "source_location": {
- "file": "search.asciidoc",
- "line": 18
- },
- "digest": "5d32279dcd52b22d9e1178a02a3ad957",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /twitter/_doc?routing=kimchy\n{\n \"user\" : \"kimchy\",\n \"post_date\" : \"2009-11-15T14:12:12\",\n \"message\" : \"trying out Elasticsearch\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_doc",
- "query": {
- "routing": "kimchy"
- },
- "body": {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- "params": {
- "index": "twitter"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search.asciidoc",
- "line": 32
- },
- "digest": "8acc1d67b152e7027e0f0e1a8b4b2431",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /twitter/_search?routing=kimchy\n{\n \"query\": {\n \"bool\" : {\n \"must\" : {\n \"query_string\" : {\n \"query\" : \"some query string here\"\n }\n },\n \"filter\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "routing": "kimchy"
- },
- "body": {
- "query": {
- "bool": {
- "must": {
- "query_string": {
- "query": "some query string here"
- }
- },
- "filter": {
- "term": {
- "user": "kimchy"
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search.asciidoc",
- "line": 72
- },
- "digest": "014b788c879e4aaa1020672e45e25473",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /_cluster/settings\n{\n \"transient\": {\n \"cluster.routing.use_adaptive_replica_selection\": false\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_cluster/settings",
- "query": null,
- "body": {
- "transient": {
- "cluster.routing.use_adaptive_replica_selection": false
- }
- },
- "params": null,
- "api": "cluster.put_settings"
- }
- ]
- },
- {
- "source_location": {
- "file": "search.asciidoc",
- "line": 96
- },
- "digest": "189a921df2f5b1fe580937210ce9c1c2",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_search\n{\n \"query\" : {\n \"match_all\" : {}\n },\n \"stats\" : [\"group1\", \"group2\"]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "stats": [
- "group1",
- "group2"
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 10
- },
- "digest": "d2153f3100bf12c2de98f14eb86ab061",
- "lang": "console",
- "found": [
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /twitter/_search",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 596
- },
- "digest": "be49260e1b3496c4feac38c56ebb0669",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /twitter/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 604
- },
- "digest": "350f67173e43125d038317fb7fc9b242",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 5,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.3862942,\n \"hits\": [\n {\n \"_index\": \"twitter\",\n \"_id\": \"0\",\n \"_score\": 1.3862942,\n \"_source\": {\n \"date\": \"2009-11-15T14:12:12\",\n \"likes\": 0,\n \"message\": \"trying out Elasticsearch\",\n \"user\": \"kimchy\"\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 642
- },
- "digest": "f5569945024b9d664828693705c27c1a",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /kimchy,elasticsearch/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/kimchy,elasticsearch/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "kimchy,elasticsearch"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 654
- },
- "digest": "168bfdde773570cfc6dd3ab3574e413b",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 663
- },
- "digest": "8022e6a690344035b6472a43a9d122e0",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /_all/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_all/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "_all"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 669
- },
- "digest": "43682666e1abcb14770c99f02eb26a0d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "go",
- "js"
- ],
- "source": "GET /*/_search?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/*/_search",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "*"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 678
- },
- "digest": "84d6a777a51963629272b1be5698b091",
- "lang": "console",
- "found": [
- "go",
- "js"
- ],
- "source": "GET /twitter/_search\n{\n \"query\": {\n \"term\": {\n \"user\": \"kimchy\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search.asciidoc",
- "line": 693
- },
- "digest": "359cac0b617a365d35277f510bd4c5ee",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 1,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.3862942,\n \"hits\": [\n {\n \"_index\": \"twitter\",\n \"_id\": \"0\",\n \"_score\": 1.3862942,\n \"_source\": {\n \"user\": \"kimchy\",\n \"message\": \"trying out Elasticsearch\",\n \"date\": \"2009-11-15T14:12:12\",\n \"likes\": 0\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request-body.asciidoc",
- "line": 7
- },
- "digest": "0ce3606f1dba490eef83c4317b315b62",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /twitter/_search\n{\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request-body.asciidoc",
- "line": 65
- },
- "digest": "bfcd65ab85d684d36a8550080032958d",
- "lang": "console",
- "found": [
- "php",
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search?q=message:number&size=0&terminate_after=1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "q": "message:number",
- "size": "0",
- "terminate_after": "1"
- },
- "body": null,
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request-body.asciidoc",
- "line": 79
- },
- "digest": "31fa804420aad7728f9ba9f20dc1a9c5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 3,\n \"timed_out\": false,\n \"terminated_early\": true,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": null,\n \"hits\": []\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/collapse.asciidoc",
- "line": 9
- },
- "digest": "032f67ced3e7d106f8722432ebbd94d3",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /twitter/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n },\n \"collapse\" : {\n \"field\" : \"user\" <1>\n },\n \"sort\": [\"likes\"], <2>\n \"from\": 10 <3>\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "collapse": {
- "field": "user"
- },
- "sort": [
- "likes"
- ],
- "from": 10
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/collapse.asciidoc",
- "line": 43
- },
- "digest": "63d36a10d9475be2e2fa73d2415e20e6",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /twitter/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n },\n \"collapse\" : {\n \"field\" : \"user\", <1>\n \"inner_hits\": {\n \"name\": \"last_tweets\", <2>\n \"size\": 5, <3>\n \"sort\": [{ \"date\": \"asc\" }] <4>\n },\n \"max_concurrent_group_searches\": 4 <5>\n },\n \"sort\": [\"likes\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "collapse": {
- "field": "user",
- "inner_hits": {
- "name": "last_tweets",
- "size": 5,
- "sort": [
- {
- "date": "asc"
- }
- ]
- },
- "max_concurrent_group_searches": 4
- },
- "sort": [
- "likes"
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/collapse.asciidoc",
- "line": 77
- },
- "digest": "4f20ca49fbaac83620d4cb23fd355f3b",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"query\": {\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n },\n \"collapse\" : {\n \"field\" : \"user\", <1>\n \"inner_hits\": [\n {\n \"name\": \"most_liked\", <2>\n \"size\": 3,\n \"sort\": [\"likes\"]\n },\n {\n \"name\": \"most_recent\", <3>\n \"size\": 3,\n \"sort\": [{ \"date\": \"asc\" }]\n }\n ]\n },\n \"sort\": [\"likes\"]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- },
- "collapse": {
- "field": "user",
- "inner_hits": [
- {
- "name": "most_liked",
- "size": 3,
- "sort": [
- "likes"
- ]
- },
- {
- "name": "most_recent",
- "size": 3,
- "sort": [
- {
- "date": "asc"
- }
- ]
- }
- ]
- },
- "sort": [
- "likes"
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 24
- },
- "digest": "05e1088d2c04391203cc8eb3ab287b71",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"content\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"content\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "content": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "content": {}
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 279
- },
- "digest": "3cc4e8b1e2aecac644ba52d34ca29422",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"number_of_fragments\" : 3,\n \"fragment_size\" : 150,\n \"fields\" : {\n \"body\" : { \"pre_tags\" : [\"\"], \"post_tags\" : [\"\"] },\n \"blog.title\" : { \"number_of_fragments\" : 0 },\n \"blog.author\" : { \"number_of_fragments\" : 0 },\n \"blog.comment\" : { \"number_of_fragments\" : 5, \"order\" : \"score\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "number_of_fragments": 3,
- "fragment_size": 150,
- "fields": {
- "body": {
- "pre_tags": [
- ""
- ],
- "post_tags": [
- ""
- ]
- },
- "blog.title": {
- "number_of_fragments": 0
- },
- "blog.author": {
- "number_of_fragments": 0
- },
- "blog.comment": {
- "number_of_fragments": 5,
- "order": "score"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 309
- },
- "digest": "977882872876edd3a37c6769ab75b90b",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": {\n \"comment\": {\n \"query\": \"foo bar\"\n }\n }\n },\n \"rescore\": {\n \"window_size\": 50,\n \"query\": {\n \"rescore_query\" : {\n \"match_phrase\": {\n \"comment\": {\n \"query\": \"foo bar\",\n \"slop\": 1\n }\n }\n },\n \"rescore_query_weight\" : 10\n }\n },\n \"_source\": false,\n \"highlight\" : {\n \"order\" : \"score\",\n \"fields\" : {\n \"comment\" : {\n \"fragment_size\" : 150,\n \"number_of_fragments\" : 3,\n \"highlight_query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"comment\": {\n \"query\": \"foo bar\"\n }\n }\n },\n \"should\": {\n \"match_phrase\": {\n \"comment\": {\n \"query\": \"foo bar\",\n \"slop\": 1,\n \"boost\": 10.0\n }\n }\n },\n \"minimum_should_match\": 0\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "comment": {
- "query": "foo bar"
- }
- }
- },
- "rescore": {
- "window_size": 50,
- "query": {
- "rescore_query": {
- "match_phrase": {
- "comment": {
- "query": "foo bar",
- "slop": 1
- }
- }
- },
- "rescore_query_weight": 10
- }
- },
- "_source": false,
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "fragment_size": 150,
- "number_of_fragments": 3,
- "highlight_query": {
- "bool": {
- "must": {
- "match": {
- "comment": {
- "query": "foo bar"
- }
- }
- },
- "should": {
- "match_phrase": {
- "comment": {
- "query": "foo bar",
- "slop": 1,
- "boost": 10
- }
- }
- },
- "minimum_should_match": 0
- }
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 377
- },
- "digest": "9e502038aa4ebb9cb4df230c0c4a854e",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"comment\" : {\"type\" : \"plain\"}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "comment": {
- "type": "plain"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 401
- },
- "digest": "ee079a3f9eb529aac33f09be16747aa9",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"pre_tags\" : [\"\"],\n \"post_tags\" : [\"\"],\n \"fields\" : {\n \"body\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "pre_tags": [
- ""
- ],
- "post_tags": [
- ""
- ],
- "fields": {
- "body": {}
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 422
- },
- "digest": "a225bb439c204b20ed52a28e1dcd663b",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"pre_tags\" : [\"\", \"\"],\n \"post_tags\" : [\"\", \"\"],\n \"fields\" : {\n \"body\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "pre_tags": [
- "",
- ""
- ],
- "post_tags": [
- "",
- ""
- ],
- "fields": {
- "body": {}
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 442
- },
- "digest": "05ce63b83a89fddb63fd60c923811582",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"tags_schema\" : \"styled\",\n \"fields\" : {\n \"comment\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "tags_schema": "styled",
- "fields": {
- "comment": {}
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 466
- },
- "digest": "87b697eb7340e9e52ca790922eca0066",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"comment\" : {\"force_source\" : true}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "comment": {
- "force_source": true
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 490
- },
- "digest": "1e8b687c757981af3a9f005cfd2b4946",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"require_field_match\": false,\n \"fields\": {\n \"body\" : { \"pre_tags\" : [\"\"], \"post_tags\" : [\"\"] }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "require_field_match": false,
- "fields": {
- "body": {
- "pre_tags": [
- ""
- ],
- "post_tags": [
- ""
- ]
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 523
- },
- "digest": "a182c91923ad1e47cf502ea890c53015",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"comment.plain:running scissors\",\n \"fields\": [\"comment\"]\n }\n },\n \"highlight\": {\n \"order\": \"score\",\n \"fields\": {\n \"comment\": {\n \"matched_fields\": [\"comment\", \"comment.plain\"],\n \"type\" : \"fvh\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "comment.plain:running scissors",
- "fields": [
- "comment"
- ]
- }
- },
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "matched_fields": [
- "comment",
- "comment.plain"
- ],
- "type": "fvh"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 552
- },
- "digest": "974bb1452f614f9a378a695fa9addd4e",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"running scissors\",\n \"fields\": [\"comment\", \"comment.plain^10\"]\n }\n },\n \"highlight\": {\n \"order\": \"score\",\n \"fields\": {\n \"comment\": {\n \"matched_fields\": [\"comment\", \"comment.plain\"],\n \"type\" : \"fvh\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "running scissors",
- "fields": [
- "comment",
- "comment.plain^10"
- ]
- }
- },
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "matched_fields": [
- "comment",
- "comment.plain"
- ],
- "type": "fvh"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 579
- },
- "digest": "4971d093f19f85e3c622f1e0257ff60f",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"running scissors\",\n \"fields\": [\"comment\", \"comment.plain^10\"]\n }\n },\n \"highlight\": {\n \"order\": \"score\",\n \"fields\": {\n \"comment\": {\n \"matched_fields\": [\"comment.plain\"],\n \"type\" : \"fvh\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "running scissors",
- "fields": [
- "comment",
- "comment.plain^10"
- ]
- }
- },
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "matched_fields": [
- "comment.plain"
- ],
- "type": "fvh"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 648
- },
- "digest": "2859fb1a8139777dca087862a5b1c205",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"highlight\": {\n \"fields\": [\n { \"title\": {} },\n { \"text\": {} }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "highlight": {
- "fields": [
- {
- "title": {}
- },
- {
- "text": {}
- }
- ]
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 677
- },
- "digest": "e8446172481fb6298c04b4bdc3340f3f",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"comment\" : {\"fragment_size\" : 150, \"number_of_fragments\" : 3}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "comment": {
- "fragment_size": 150,
- "number_of_fragments": 3
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 696
- },
- "digest": "4ae1e4f88af2f9be50696e5a59466bb6",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"order\" : \"score\",\n \"fields\" : {\n \"comment\" : {\"fragment_size\" : 150, \"number_of_fragments\" : 3}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "order": "score",
- "fields": {
- "comment": {
- "fragment_size": 150,
- "number_of_fragments": 3
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 719
- },
- "digest": "62b15eac8c6d294da9114541fdfc527f",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"body\" : {},\n \"blog.title\" : {\"number_of_fragments\" : 0}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "body": {},
- "blog.title": {
- "number_of_fragments": 0
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 745
- },
- "digest": "3d10eba5cac0069486bc3c2854d15689",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"match\": { \"user\": \"kimchy\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"comment\" : {\n \"fragment_size\" : 150,\n \"number_of_fragments\" : 3,\n \"no_match_size\": 150\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "user": "kimchy"
- }
- },
- "highlight": {
- "fields": {
- "comment": {
- "fragment_size": 150,
- "number_of_fragments": 3,
- "no_match_size": 150
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 772
- },
- "digest": "5ea9da129ca70a5fe534f27a82d80b29",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"comment\" : {\n \"type\": \"text\",\n \"index_options\" : \"offsets\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comment": {
- "type": "text",
- "index_options": "offsets"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 790
- },
- "digest": "17a1e308761afd3282f13d44d7be008a",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "PUT /example\n{\n \"mappings\": {\n \"properties\": {\n \"comment\" : {\n \"type\": \"text\",\n \"term_vector\" : \"with_positions_offsets\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/example",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comment": {
- "type": "text",
- "term_vector": "with_positions_offsets"
- }
- }
- }
- },
- "params": {
- "index": "example"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 812
- },
- "digest": "146bfeeaa2ac4fc1352bf8d41097baa0",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET twitter/_search\n{\n \"query\" : {\n \"match_phrase\": { \"message\": \"number 1\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"message\" : {\n \"type\": \"plain\",\n \"fragment_size\" : 15,\n \"number_of_fragments\" : 3,\n \"fragmenter\": \"simple\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "message": "number 1"
- }
- },
- "highlight": {
- "fields": {
- "message": {
- "type": "plain",
- "fragment_size": 15,
- "number_of_fragments": 3,
- "fragmenter": "simple"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 835
- },
- "digest": "37d38d963a009dc9a40d2deb7cac58d5",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.6011951,\n \"hits\": [\n {\n \"_index\": \"twitter\",\n \"_id\": \"1\",\n \"_score\": 1.6011951,\n \"_source\": {\n \"user\": \"test\",\n \"message\": \"some message with the number 1\",\n \"date\": \"2009-11-15T14:12:12\",\n \"likes\": 1\n },\n \"highlight\": {\n \"message\": [\n \" with the number\",\n \" 1\"\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 869
- },
- "digest": "bc9bd39420f810edae72b9fb33a154fd",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET twitter/_search\n{\n \"query\" : {\n \"match_phrase\": { \"message\": \"number 1\" }\n },\n \"highlight\" : {\n \"fields\" : {\n \"message\" : {\n \"type\": \"plain\",\n \"fragment_size\" : 15,\n \"number_of_fragments\" : 3,\n \"fragmenter\": \"span\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match_phrase": {
- "message": "number 1"
- }
- },
- "highlight": {
- "fields": {
- "message": {
- "type": "plain",
- "fragment_size": 15,
- "number_of_fragments": 3,
- "fragmenter": "span"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/highlighting.asciidoc",
- "line": 892
- },
- "digest": "b21b88a3a25231b37aca12d2e84ab698",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.6011951,\n \"hits\": [\n {\n \"_index\": \"twitter\",\n \"_id\": \"1\",\n \"_score\": 1.6011951,\n \"_source\": {\n \"user\": \"test\",\n \"message\": \"some message with the number 1\",\n \"date\": \"2009-11-15T14:12:12\",\n \"likes\": 1\n },\n \"highlight\": {\n \"message\": [\n \" with the number 1\"\n ]\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/index-boost.asciidoc",
- "line": 11
- },
- "digest": "69dce2801f824f61e4f3ea9ee9371e31",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"indices_boost\" : [\n { \"index1\" : 1.4 },\n { \"index2\" : 1.3 }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "indices_boost": [
- {
- "index1": 1.4
- },
- {
- "index2": 1.3
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/index-boost.asciidoc",
- "line": 25
- },
- "digest": "fb8a4322825d26c4e7b41bd763b3d392",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"indices_boost\" : [\n { \"alias1\" : 1.4 },\n { \"index*\" : 1.3 }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "indices_boost": [
- {
- "alias1": 1.4
- },
- {
- "index*": 1.3
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 86
- },
- "digest": "2a91e1fb8ad93a188fa9d77ec01bc431",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"mappings\": {\n \"properties\": {\n \"comments\": {\n \"type\": \"nested\"\n }\n }\n }\n}\n\nPUT test/_doc/1?refresh\n{\n \"title\": \"Test title\",\n \"comments\": [\n {\n \"author\": \"kimchy\",\n \"number\": 1\n },\n {\n \"author\": \"nik9000\",\n \"number\": 2\n }\n ]\n}\n\nPOST test/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"comments\",\n \"query\": {\n \"match\": {\"comments.number\" : 2}\n },\n \"inner_hits\": {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comments": {
- "type": "nested"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Test title",
- "comments": [
- {
- "author": "kimchy",
- "number": 1
- },
- {
- "author": "nik9000",
- "number": 2
- }
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "comments",
- "query": {
- "match": {
- "comments.number": 2
- }
- },
- "inner_hits": {}
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 132
- },
- "digest": "cb58a734d14c0a1e2743f7449d42e9c9",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...,\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.0,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_score\": 1.0,\n \"_source\": ...,\n \"inner_hits\": {\n \"comments\": { <1>\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.0,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_nested\": {\n \"field\": \"comments\",\n \"offset\": 1\n },\n \"_score\": 1.0,\n \"_source\": {\n \"author\": \"nik9000\",\n \"number\": 2\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 207
- },
- "digest": "983fbb78e57e8fe98db38cf2d217e943",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"mappings\": {\n \"properties\": {\n \"comments\": {\n \"type\": \"nested\"\n }\n }\n }\n}\n\nPUT test/_doc/1?refresh\n{\n \"title\": \"Test title\",\n \"comments\": [\n {\n \"author\": \"kimchy\",\n \"text\": \"comment text\"\n },\n {\n \"author\": \"nik9000\",\n \"text\": \"words words words\"\n }\n ]\n}\n\nPOST test/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"comments\",\n \"query\": {\n \"match\": {\"comments.text\" : \"words\"}\n },\n \"inner_hits\": {\n \"_source\" : false,\n \"docvalue_fields\" : [\n \"comments.text.keyword\"\n ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comments": {
- "type": "nested"
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Test title",
- "comments": [
- {
- "author": "kimchy",
- "text": "comment text"
- },
- {
- "author": "nik9000",
- "text": "words words words"
- }
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "comments",
- "query": {
- "match": {
- "comments.text": "words"
- }
- },
- "inner_hits": {
- "_source": false,
- "docvalue_fields": [
- "comments.text.keyword"
- ]
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 318
- },
- "digest": "79feb4a0c0a21b7015a52f9736cd4683",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"mappings\": {\n \"properties\": {\n \"comments\": {\n \"type\": \"nested\",\n \"properties\": {\n \"votes\": {\n \"type\": \"nested\"\n }\n }\n }\n }\n }\n}\n\nPUT test/_doc/1?refresh\n{\n \"title\": \"Test title\",\n \"comments\": [\n {\n \"author\": \"kimchy\",\n \"text\": \"comment text\",\n \"votes\": []\n },\n {\n \"author\": \"nik9000\",\n \"text\": \"words words words\",\n \"votes\": [\n {\"value\": 1 , \"voter\": \"kimchy\"},\n {\"value\": -1, \"voter\": \"other\"}\n ]\n }\n ]\n}\n\nPOST test/_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"comments.votes\",\n \"query\": {\n \"match\": {\n \"comments.votes.voter\": \"kimchy\"\n }\n },\n \"inner_hits\" : {}\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "comments": {
- "type": "nested",
- "properties": {
- "votes": {
- "type": "nested"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "title": "Test title",
- "comments": [
- {
- "author": "kimchy",
- "text": "comment text",
- "votes": []
- },
- {
- "author": "nik9000",
- "text": "words words words",
- "votes": [
- {
- "value": 1,
- "voter": "kimchy"
- },
- {
- "value": -1,
- "voter": "other"
- }
- ]
- }
- ]
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "comments.votes",
- "query": {
- "match": {
- "comments.votes.voter": "kimchy"
- }
- },
- "inner_hits": {}
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 374
- },
- "digest": "bb924187bb9a4f4f07e55042f1f4b639",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...,\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.6931471,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_score\": 0.6931471,\n \"_source\": ...,\n \"inner_hits\": {\n \"comments.votes\": { <1>\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.6931471,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_nested\": {\n \"field\": \"comments\",\n \"offset\": 1,\n \"_nested\": {\n \"field\": \"votes\",\n \"offset\": 0\n }\n },\n \"_score\": 0.6931471,\n \"_source\": {\n \"value\": 1,\n \"voter\": \"kimchy\"\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 435
- },
- "digest": "3f5b5bee692e7d4b0992dc0a64e95a60",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"mappings\": {\n \"properties\": {\n \"my_join_field\": {\n \"type\": \"join\",\n \"relations\": {\n \"my_parent\": \"my_child\"\n }\n }\n }\n }\n}\n\nPUT test/_doc/1?refresh\n{\n \"number\": 1,\n \"my_join_field\": \"my_parent\"\n}\n\nPUT test/_doc/2?routing=1&refresh\n{\n \"number\": 1,\n \"my_join_field\": {\n \"name\": \"my_child\",\n \"parent\": \"1\"\n }\n}\n\nPOST test/_search\n{\n \"query\": {\n \"has_child\": {\n \"type\": \"my_child\",\n \"query\": {\n \"match\": {\n \"number\": 1\n }\n },\n \"inner_hits\": {} <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "my_join_field": {
- "type": "join",
- "relations": {
- "my_parent": "my_child"
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "number": 1,
- "my_join_field": "my_parent"
- },
- "params": {
- "index": "test",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "PUT",
- "url": "/test/_doc/2",
- "query": {
- "routing": "1",
- "refresh": true
- },
- "body": {
- "number": 1,
- "my_join_field": {
- "name": "my_child",
- "parent": "1"
- }
- },
- "params": {
- "index": "test",
- "id": "2"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "query": {
- "has_child": {
- "type": "my_child",
- "query": {
- "match": {
- "number": 1
- }
- },
- "inner_hits": {}
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/inner-hits.asciidoc",
- "line": 486
- },
- "digest": "fb62e4e434f60048bdc77373e674834a",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...,\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.0,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_score\": 1.0,\n \"_source\": {\n \"number\": 1,\n \"my_join_field\": \"my_parent\"\n },\n \"inner_hits\": {\n \"my_child\": {\n \"hits\": {\n \"total\" : {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"max_score\": 1.0,\n \"hits\": [\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_score\": 1.0,\n \"_routing\": \"1\",\n \"_source\": {\n \"number\": 1,\n \"my_join_field\": {\n \"name\": \"my_child\",\n \"parent\": \"1\"\n }\n }\n }\n ]\n }\n }\n }\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/min-score.asciidoc",
- "line": 8
- },
- "digest": "8e8ceac8fc99348f885f85ff714557fd",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"min_score\": 0.5,\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "min_score": 0.5,
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/named-queries-and-filters.asciidoc",
- "line": 7
- },
- "digest": "0aad4321e968effc6e6ef2b98c6c71a5",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"query\": {\n \"bool\" : {\n \"should\" : [\n {\"match\" : { \"name.first\" : {\"query\" : \"shay\", \"_name\" : \"first\"} }},\n {\"match\" : { \"name.last\" : {\"query\" : \"banon\", \"_name\" : \"last\"} }}\n ],\n \"filter\" : {\n \"terms\" : {\n \"name.last\" : [\"banon\", \"kimchy\"],\n \"_name\" : \"test\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "should": [
- {
- "match": {
- "name.first": {
- "query": "shay",
- "_name": "first"
- }
- }
- },
- {
- "match": {
- "name.last": {
- "query": "banon",
- "_name": "last"
- }
- }
- }
- ],
- "filter": {
- "terms": {
- "name.last": [
- "banon",
- "kimchy"
- ],
- "_name": "test"
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/post-filter.asciidoc",
- "line": 11
- },
- "digest": "35390274db3acad03eb77b2376c57e40",
- "lang": "console",
- "found": [],
- "source": "PUT /shirts\n{\n \"mappings\": {\n \"properties\": {\n \"brand\": { \"type\": \"keyword\"},\n \"color\": { \"type\": \"keyword\"},\n \"model\": { \"type\": \"keyword\"}\n }\n }\n}\n\nPUT /shirts/_doc/1?refresh\n{\n \"brand\": \"gucci\",\n \"color\": \"red\",\n \"model\": \"slim\"\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/shirts",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "brand": {
- "type": "keyword"
- },
- "color": {
- "type": "keyword"
- },
- "model": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "shirts"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/shirts/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "brand": "gucci",
- "color": "red",
- "model": "slim"
- },
- "params": {
- "index": "shirts",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/post-filter.asciidoc",
- "line": 40
- },
- "digest": "f83eb6605c7c56e297a494b318400ef0",
- "lang": "console",
- "found": [],
- "source": "GET /shirts/_search\n{\n \"query\": {\n \"bool\": {\n \"filter\": [\n { \"term\": { \"color\": \"red\" }},\n { \"term\": { \"brand\": \"gucci\" }}\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/shirts/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": [
- {
- "term": {
- "color": "red"
- }
- },
- {
- "term": {
- "brand": "gucci"
- }
- }
- ]
- }
- }
- },
- "params": {
- "index": "shirts"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/post-filter.asciidoc",
- "line": 63
- },
- "digest": "81f1b1e1d5c81683b6bf471c469e6046",
- "lang": "console",
- "found": [],
- "source": "GET /shirts/_search\n{\n \"query\": {\n \"bool\": {\n \"filter\": [\n { \"term\": { \"color\": \"red\" }},\n { \"term\": { \"brand\": \"gucci\" }}\n ]\n }\n },\n \"aggs\": {\n \"models\": {\n \"terms\": { \"field\": \"model\" } <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/shirts/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": [
- {
- "term": {
- "color": "red"
- }
- },
- {
- "term": {
- "brand": "gucci"
- }
- }
- ]
- }
- },
- "aggs": {
- "models": {
- "terms": {
- "field": "model"
- }
- }
- }
- },
- "params": {
- "index": "shirts"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/post-filter.asciidoc",
- "line": 94
- },
- "digest": "48313f620c2871b6f4019b66be730109",
- "lang": "console",
- "found": [],
- "source": "GET /shirts/_search\n{\n \"query\": {\n \"bool\": {\n \"filter\": {\n \"term\": { \"brand\": \"gucci\" } <1>\n }\n }\n },\n \"aggs\": {\n \"colors\": {\n \"terms\": { \"field\": \"color\" } <2>\n },\n \"color_red\": {\n \"filter\": {\n \"term\": { \"color\": \"red\" } <3>\n },\n \"aggs\": {\n \"models\": {\n \"terms\": { \"field\": \"model\" } <3>\n }\n }\n }\n },\n \"post_filter\": { <4>\n \"term\": { \"color\": \"red\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/shirts/_search",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "filter": {
- "term": {
- "brand": "gucci"
- }
- }
- }
- },
- "aggs": {
- "colors": {
- "terms": {
- "field": "color"
- }
- },
- "color_red": {
- "filter": {
- "term": {
- "color": "red"
- }
- },
- "aggs": {
- "models": {
- "terms": {
- "field": "model"
- }
- }
- }
- }
- },
- "post_filter": {
- "term": {
- "color": "red"
- }
- }
- },
- "params": {
- "index": "shirts"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/preference.asciidoc",
- "line": 59
- },
- "digest": "9405de6fd841c32ac510eb0a7eeed989",
- "lang": "console",
- "found": [],
- "source": "GET /_search?preference=xyzabc123\n{\n \"query\": {\n \"match\": {\n \"title\": \"elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "preference": "xyzabc123"
- },
- "body": {
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/rescore.asciidoc",
- "line": 43
- },
- "digest": "829a40d484c778a8c58340c7bf09e1d8",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"query\" : {\n \"match\" : {\n \"message\" : {\n \"operator\" : \"or\",\n \"query\" : \"the quick brown\"\n }\n }\n },\n \"rescore\" : {\n \"window_size\" : 50,\n \"query\" : {\n \"rescore_query\" : {\n \"match_phrase\" : {\n \"message\" : {\n \"query\" : \"the quick brown\",\n \"slop\" : 2\n }\n }\n },\n \"query_weight\" : 0.7,\n \"rescore_query_weight\" : 1.2\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "operator": "or",
- "query": "the quick brown"
- }
- }
- },
- "rescore": {
- "window_size": 50,
- "query": {
- "rescore_query": {
- "match_phrase": {
- "message": {
- "query": "the quick brown",
- "slop": 2
- }
- }
- },
- "query_weight": 0.7,
- "rescore_query_weight": 1.2
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/rescore.asciidoc",
- "line": 90
- },
- "digest": "7d7855afd9882a665bbabda810f94f61",
- "lang": "console",
- "found": [],
- "source": "POST /_search\n{\n \"query\" : {\n \"match\" : {\n \"message\" : {\n \"operator\" : \"or\",\n \"query\" : \"the quick brown\"\n }\n }\n },\n \"rescore\" : [ {\n \"window_size\" : 100,\n \"query\" : {\n \"rescore_query\" : {\n \"match_phrase\" : {\n \"message\" : {\n \"query\" : \"the quick brown\",\n \"slop\" : 2\n }\n }\n },\n \"query_weight\" : 0.7,\n \"rescore_query_weight\" : 1.2\n }\n }, {\n \"window_size\" : 10,\n \"query\" : {\n \"score_mode\": \"multiply\",\n \"rescore_query\" : {\n \"function_score\" : {\n \"script_score\": {\n \"script\": {\n \"source\": \"Math.log10(doc.likes.value + 2)\"\n }\n }\n }\n }\n }\n } ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": {
- "operator": "or",
- "query": "the quick brown"
- }
- }
- },
- "rescore": [
- {
- "window_size": 100,
- "query": {
- "rescore_query": {
- "match_phrase": {
- "message": {
- "query": "the quick brown",
- "slop": 2
- }
- }
- },
- "query_weight": 0.7,
- "rescore_query_weight": 1.2
- }
- },
- {
- "window_size": 10,
- "query": {
- "score_mode": "multiply",
- "rescore_query": {
- "function_score": {
- "script_score": {
- "script": {
- "source": "Math.log10(doc.likes.value + 2)"
- }
- }
- }
- }
- }
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/script-fields.asciidoc",
- "line": 8
- },
- "digest": "68358f94e77b5dce7eb01679516bae69",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n{\n \"query\" : {\n \"match_all\": {}\n },\n \"script_fields\" : {\n \"test1\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['price'].value * 2\"\n }\n },\n \"test2\" : {\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['price'].value * params.factor\",\n \"params\" : {\n \"factor\" : 2.0\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "script_fields": {
- "test1": {
- "script": {
- "lang": "painless",
- "source": "doc['price'].value * 2"
- }
- },
- "test2": {
- "script": {
- "lang": "painless",
- "source": "doc['price'].value * params.factor",
- "params": {
- "factor": 2
- }
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/script-fields.asciidoc",
- "line": 44
- },
- "digest": "34dd16c077e81b3744963b19a3dc9e49",
- "lang": "console",
- "found": [],
- "source": "GET /_search\n {\n \"query\" : {\n \"match_all\": {}\n },\n \"script_fields\" : {\n \"test1\" : {\n \"script\" : \"params['_source']['message']\"\n }\n }\n }",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "match_all": {}
- },
- "script_fields": {
- "test1": {
- "script": "params['_source']['message']"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 45
- },
- "digest": "7e52bec09624cf6c0de5d13f2bfad5a5",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /twitter/_search?scroll=1m\n{\n \"size\": 100,\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "size": 100,
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 63
- },
- "digest": "b41dce56b0e640d32b1cf452f87cec17",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_search/scroll <1>\n{\n \"scroll\" : \"1m\", <2>\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\" <3>\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search/scroll",
- "query": null,
- "body": {
- "scroll": "1m",
- "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
- },
- "params": null,
- "api": "scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 95
- },
- "digest": "d5dcddc6398b473b6ad9bce5c6adf986",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search?scroll=1m\n{\n \"sort\": [\n \"_doc\"\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "sort": [
- "_doc"
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 148
- },
- "digest": "72beebe779a258c225dee7b023e60c52",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_nodes/stats/indices/search",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_nodes/stats/indices/search",
- "query": null,
- "body": null,
- "params": {
- "metric": "indices",
- "index_metric": "search"
- },
- "api": "nodes.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 161
- },
- "digest": "b0d64d0a554549e5b2808002a0725493",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "DELETE /_search/scroll\n{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_search/scroll",
- "query": null,
- "body": {
- "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
- },
- "params": null,
- "api": "clear_scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 172
- },
- "digest": "3a700f836d8d5da1b656a876554028aa",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "DELETE /_search/scroll\n{\n \"scroll_id\" : [\n \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n \"DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB\"\n ]\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_search/scroll",
- "query": null,
- "body": {
- "scroll_id": [
- "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
- "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB"
- ]
- },
- "params": null,
- "api": "clear_scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 186
- },
- "digest": "c2c21e2824fbf6b7198ede30419da82b",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "DELETE /_search/scroll/_all",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_search/scroll/_all",
- "query": null,
- "body": null,
- "params": {
- "scroll_id": "_all"
- },
- "api": "clear_scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 194
- },
- "digest": "b94cee0f74f57742b3948f9b784dfdd4",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "DELETE /_search/scroll/DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==,DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_search/scroll/DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==,DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB",
- "query": null,
- "body": null,
- "params": {
- "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==,DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB"
- },
- "api": "clear_scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 206
- },
- "digest": "1027ab1ca767ac1428176ef4f84bfbcf",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /twitter/_search?scroll=1m\n{\n \"slice\": {\n \"id\": 0, <1>\n \"max\": 2 <2>\n },\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n }\n}\nGET /twitter/_search?scroll=1m\n{\n \"slice\": {\n \"id\": 1,\n \"max\": 2\n },\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "slice": {
- "id": 0,
- "max": 2
- },
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- },
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "slice": {
- "id": 1,
- "max": 2
- },
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/scroll.asciidoc",
- "line": 268
- },
- "digest": "fdcaba9547180439ff4b6275034a5170",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /twitter/_search?scroll=1m\n{\n \"slice\": {\n \"field\": \"date\",\n \"id\": 0,\n \"max\": 10\n },\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "scroll": "1m"
- },
- "body": {
- "slice": {
- "field": "date",
- "id": 0,
- "max": 10
- },
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/search-after.asciidoc",
- "line": 14
- },
- "digest": "402ee4bf8e2e386d5f9100fdaf13a6d6",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"size\": 10,\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n },\n \"sort\": [\n {\"date\": \"asc\"},\n {\"tie_breaker_id\": \"asc\"} <1>\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "size": 10,
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- },
- "sort": [
- {
- "date": "asc"
- },
- {
- "tie_breaker_id": "asc"
- }
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/search-after.asciidoc",
- "line": 57
- },
- "digest": "525ec32997125d401f9c128ca450cefa",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"size\": 10,\n \"query\": {\n \"match\" : {\n \"title\" : \"elasticsearch\"\n }\n },\n \"search_after\": [1463538857, \"654323\"],\n \"sort\": [\n {\"date\": \"asc\"},\n {\"tie_breaker_id\": \"asc\"}\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "size": 10,
- "query": {
- "match": {
- "title": "elasticsearch"
- }
- },
- "search_after": [
- 1463538857,
- "654323"
- ],
- "sort": [
- {
- "date": "asc"
- },
- {
- "tie_breaker_id": "asc"
- }
- ]
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/search-type.asciidoc",
- "line": 54
- },
- "digest": "de3c9fe00efc5647ad4b695524cbe8a0",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET twitter/_search?search_type=query_then_fetch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "search_type": "query_then_fetch"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/search-type.asciidoc",
- "line": 72
- },
- "digest": "be0d2fbf861842eef2c98d5e5bf6e406",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET twitter/_search?search_type=dfs_query_then_fetch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": {
- "search_type": "dfs_query_then_fetch"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 11
- },
- "digest": "d1b3b7d2bb2ab90d15fd10318abd24db",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index\n{\n \"mappings\": {\n \"properties\": {\n \"post_date\": { \"type\": \"date\" },\n \"user\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"age\": { \"type\": \"integer\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "post_date": {
- "type": "date"
- },
- "user": {
- "type": "keyword"
- },
- "name": {
- "type": "keyword"
- },
- "age": {
- "type": "integer"
- }
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 30
- },
- "digest": "ae9b5fbd42af2386ffbf56ad4a697e51",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /my_index/_search\n{\n \"sort\" : [\n { \"post_date\" : {\"order\" : \"asc\"}},\n \"user\",\n { \"name\" : \"desc\" },\n { \"age\" : \"desc\" },\n \"_score\"\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "post_date": {
- "order": "asc"
- }
- },
- "user",
- {
- "name": "desc"
- },
- {
- "age": "desc"
- },
- "_score"
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "my_index"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 94
- },
- "digest": "b997885974522ef439d5e345924cc5ba",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /my_index/_doc/1?refresh\n{\n \"product\": \"chocolate\",\n \"price\": [20, 4]\n}\n\nPOST /_search\n{\n \"query\" : {\n \"term\" : { \"product\" : \"chocolate\" }\n },\n \"sort\" : [\n {\"price\" : {\"order\" : \"asc\", \"mode\" : \"avg\"}}\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/my_index/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "product": "chocolate",
- "price": [
- 20,
- 4
- ]
- },
- "params": {
- "index": "my_index",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "product": "chocolate"
- }
- },
- "sort": [
- {
- "price": {
- "order": "asc",
- "mode": "avg"
- }
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 122
- },
- "digest": "abf329ebefaf58acd4ee30e685731499",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /index_double\n{\n \"mappings\": {\n \"properties\": {\n \"field\": { \"type\": \"double\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_double",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "field": {
- "type": "double"
- }
- }
- }
- },
- "params": {
- "index": "index_double"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 134
- },
- "digest": "f6b5032bf27c2445d28845be0d413970",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /index_long\n{\n \"mappings\": {\n \"properties\": {\n \"field\": { \"type\": \"long\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_long",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "field": {
- "type": "long"
- }
- }
- }
- },
- "params": {
- "index": "index_long"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 153
- },
- "digest": "2891aa10ee9d474780adf94d5607f2db",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /index_long,index_double/_search\n{\n \"sort\" : [\n {\n \"field\" : {\n \"numeric_type\" : \"double\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/index_long,index_double/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "field": {
- "numeric_type": "double"
- }
- }
- ]
- },
- "params": {
- "index": "index_long,index_double"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 180
- },
- "digest": "f4a1008b3f9baa67bb03ce9ef5ab4cb4",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /index_double\n{\n \"mappings\": {\n \"properties\": {\n \"field\": { \"type\": \"date\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_double",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "field": {
- "type": "date"
- }
- }
- }
- },
- "params": {
- "index": "index_double"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 192
- },
- "digest": "7477671958734843dd67cf0b8e6c7515",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /index_long\n{\n \"mappings\": {\n \"properties\": {\n \"field\": { \"type\": \"date_nanos\" }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/index_long",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "field": {
- "type": "date_nanos"
- }
- }
- }
- },
- "params": {
- "index": "index_long"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 211
- },
- "digest": "5f3549ac7fee94682ca0d7439eebdd2a",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /index_long,index_double/_search\n{\n \"sort\" : [\n {\n \"field\" : {\n \"numeric_type\" : \"date_nanos\"\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/index_long,index_double/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "field": {
- "numeric_type": "date_nanos"
- }
- }
- ]
- },
- "params": {
- "index": "index_long,index_double"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 262
- },
- "digest": "de139866a220124360e5e27d1a736ea4",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_search\n{\n \"query\" : {\n \"term\" : { \"product\" : \"chocolate\" }\n },\n \"sort\" : [\n {\n \"offer.price\" : {\n \"mode\" : \"avg\",\n \"order\" : \"asc\",\n \"nested\": {\n \"path\": \"offer\",\n \"filter\": {\n \"term\" : { \"offer.color\" : \"blue\" }\n }\n }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "product": "chocolate"
- }
- },
- "sort": [
- {
- "offer.price": {
- "mode": "avg",
- "order": "asc",
- "nested": {
- "path": "offer",
- "filter": {
- "term": {
- "offer.color": "blue"
- }
- }
- }
- }
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 289
- },
- "digest": "22334f4b24bb8977d3e1bf2ffdc29d3f",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST /_search\n{\n \"query\": {\n \"nested\": {\n \"path\": \"parent\",\n \"query\": {\n \"bool\": {\n \"must\": {\"range\": {\"parent.age\": {\"gte\": 21}}},\n \"filter\": {\n \"nested\": {\n \"path\": \"parent.child\",\n \"query\": {\"match\": {\"parent.child.name\": \"matt\"}}\n }\n }\n }\n }\n }\n },\n \"sort\" : [\n {\n \"parent.child.age\" : {\n \"mode\" : \"min\",\n \"order\" : \"asc\",\n \"nested\": {\n \"path\": \"parent\",\n \"filter\": {\n \"range\": {\"parent.age\": {\"gte\": 21}}\n },\n \"nested\": {\n \"path\": \"parent.child\",\n \"filter\": {\n \"match\": {\"parent.child.name\": \"matt\"}\n }\n }\n }\n }\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "nested": {
- "path": "parent",
- "query": {
- "bool": {
- "must": {
- "range": {
- "parent.age": {
- "gte": 21
- }
- }
- },
- "filter": {
- "nested": {
- "path": "parent.child",
- "query": {
- "match": {
- "parent.child.name": "matt"
- }
- }
- }
- }
- }
- }
- }
- },
- "sort": [
- {
- "parent.child.age": {
- "mode": "min",
- "order": "asc",
- "nested": {
- "path": "parent",
- "filter": {
- "range": {
- "parent.age": {
- "gte": 21
- }
- }
- },
- "nested": {
- "path": "parent.child",
- "filter": {
- "match": {
- "parent.child.name": "matt"
- }
- }
- }
- }
- }
- }
- ]
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 345
- },
- "digest": "ef0f4fa4272c47ff62fb7b422cf975e7",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"sort\" : [\n { \"price\" : {\"missing\" : \"_last\"} }\n ],\n \"query\" : {\n \"term\" : { \"product\" : \"chocolate\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "price": {
- "missing": "_last"
- }
- }
- ],
- "query": {
- "term": {
- "product": "chocolate"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 369
- },
- "digest": "899eef71a67a1b2aa11a2166ec7f48f1",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"sort\" : [\n { \"price\" : {\"unmapped_type\" : \"long\"} }\n ],\n \"query\" : {\n \"term\" : { \"product\" : \"chocolate\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "price": {
- "unmapped_type": "long"
- }
- }
- ],
- "query": {
- "term": {
- "product": "chocolate"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 391
- },
- "digest": "d17269bb80fb63ec0bf37d219e003dcb",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : [-70, 40],\n \"order\" : \"asc\",\n \"unit\" : \"km\",\n \"mode\" : \"min\",\n \"distance_type\" : \"arc\",\n \"ignore_unmapped\": true\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": [
- -70,
- 40
- ],
- "order": "asc",
- "unit": "km",
- "mode": "min",
- "distance_type": "arc",
- "ignore_unmapped": true
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 444
- },
- "digest": "979d25dff2d8987119410291ad47b0d1",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : {\n \"lat\" : 40,\n \"lon\" : -70\n },\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": {
- "lat": 40,
- "lon": -70
- },
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 470
- },
- "digest": "d50a3c64890f88af32c6d4ef4899d82a",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : \"40,-70\",\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": "40,-70",
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 491
- },
- "digest": "a1db5c822745fe167e9ef854dca3d129",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : \"drm3btev3e86\",\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": "drm3btev3e86",
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 515
- },
- "digest": "15dad5338065baaaa7d475abe85f4c22",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : [-70, 40],\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": [
- -70,
- 40
- ],
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 539
- },
- "digest": "77243bbf92f2a55e0fca6c2a349a1c15",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"sort\" : [\n {\n \"_geo_distance\" : {\n \"pin.location\" : [[-70, 40], [-71, 42]],\n \"order\" : \"asc\",\n \"unit\" : \"km\"\n }\n }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "sort": [
- {
- "_geo_distance": {
- "pin.location": [
- [
- -70,
- 40
- ],
- [
- -71,
- 42
- ]
- ],
- "order": "asc",
- "unit": "km"
- }
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 568
- },
- "digest": "04fe1e3a0047b0cdb10987b79fc3f3f3",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n },\n \"sort\" : {\n \"_script\" : {\n \"type\" : \"number\",\n \"script\" : {\n \"lang\": \"painless\",\n \"source\": \"doc['field_name'].value * params.factor\",\n \"params\" : {\n \"factor\" : 1.1\n }\n },\n \"order\" : \"asc\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- },
- "sort": {
- "_script": {
- "type": "number",
- "script": {
- "lang": "painless",
- "source": "doc['field_name'].value * params.factor",
- "params": {
- "factor": 1.1
- }
- },
- "order": "asc"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/sort.asciidoc",
- "line": 597
- },
- "digest": "e8e451bc8c45bcf16df43804c4fc8329",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /_search\n{\n \"track_scores\": true,\n \"sort\" : [\n { \"post_date\" : {\"order\" : \"desc\"} },\n { \"name\" : \"desc\" },\n { \"age\" : \"desc\" }\n ],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "track_scores": true,
- "sort": [
- {
- "post_date": {
- "order": "desc"
- }
- },
- {
- "name": "desc"
- },
- {
- "age": "desc"
- }
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/stored-fields.asciidoc",
- "line": 13
- },
- "digest": "2eeb3e55a7d3955e084bb369f1539009",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"stored_fields\" : [\"user\", \"postDate\"],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "stored_fields": [
- "user",
- "postDate"
- ],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/stored-fields.asciidoc",
- "line": 29
- },
- "digest": "2af86a6ebbb834fbcf6fa7268f87a3a5",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"stored_fields\" : [],\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "stored_fields": [],
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/stored-fields.asciidoc",
- "line": 55
- },
- "digest": "ccec437aed7a10d9111724ffd929fe00",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET /_search\n{\n \"stored_fields\": \"_none_\",\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search",
- "query": null,
- "body": {
- "stored_fields": "_none_",
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 23
- },
- "digest": "32789ba30a73d8813b61c39619ad7d71",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET twitter/_search\n{\n \"track_total_hits\": true,\n \"query\": {\n \"match\" : {\n \"message\" : \"Elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "track_total_hits": true,
- "query": {
- "match": {
- "message": "Elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 39
- },
- "digest": "2d4cfa49f19c4bece01b3ddfba0da723",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"timed_out\": false,\n \"took\": 100,\n \"hits\": {\n \"max_score\": 1.0,\n \"total\" : {\n \"value\": 2048, <1>\n \"relation\": \"eq\" <2>\n },\n \"hits\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 68
- },
- "digest": "e45cb729ed4a694b2d6cabaa55c9b5be",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_search\n{\n \"track_total_hits\": 100,\n \"query\": {\n \"match\" : {\n \"message\" : \"Elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "track_total_hits": 100,
- "query": {
- "match": {
- "message": "Elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 88
- },
- "digest": "2f9249492404ae95838b393e86c4cf88",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"timed_out\": false,\n \"took\": 30,\n \"hits\" : {\n \"max_score\": 1.0,\n \"total\" : {\n \"value\": 42, <1>\n \"relation\": \"eq\" <2>\n },\n \"hits\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 120
- },
- "digest": "66e97dfb31795ce3066106b3303a9bc2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"hits\" : {\n \"max_score\": 1.0,\n \"total\" : {\n \"value\": 100, <1>\n \"relation\": \"gte\" <2>\n },\n \"hits\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 142
- },
- "digest": "d9e08bca979c7ba3a9581f69470bf914",
- "lang": "console",
- "found": [
- "csharp"
- ],
- "source": "GET twitter/_search\n{\n \"track_total_hits\": false,\n \"query\": {\n \"match\" : {\n \"message\" : \"Elasticsearch\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "track_total_hits": false,
- "query": {
- "match": {
- "message": "Elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/request/track-total-hits.asciidoc",
- "line": 158
- },
- "digest": "05857ba6b0db5d68df139c82f6a3be80",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"timed_out\": false,\n \"took\": 10,\n \"hits\" : { <1>\n \"max_score\": 1.0,\n \"hits\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/async-search.asciidoc",
- "line": 17
- },
- "digest": "e50f9492af9e0174c7ecbe5ad7f09d74",
- "lang": "console",
- "found": [],
- "source": "POST /sales*/_async_search?size=0\n{\n \"sort\" : [\n { \"date\" : {\"order\" : \"asc\"} }\n ],\n \"aggs\" : {\n \"sale_date\" : {\n \"date_histogram\" : {\n \"field\" : \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/sales*/_async_search",
- "query": {
- "size": "0"
- },
- "body": {
- "sort": [
- {
- "date": {
- "order": "asc"
- }
- }
- ],
- "aggs": {
- "sale_date": {
- "date_histogram": {
- "field": "date",
- "calendar_interval": "1d"
- }
- }
- }
- },
- "params": {
- "index": "sales*"
- },
- "api": "async_search.submit"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/async-search.asciidoc",
- "line": 42
- },
- "digest": "3849c2b7e9d0242f272293aa42010b34",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\", <1>\n \"is_partial\" : true, <2>\n \"is_running\" : true, <3>\n \"start_time_in_millis\" : 1583945890986,\n \"expiration_time_in_millis\" : 1584377890986,\n \"response\" : {\n \"took\" : 1122,\n \"timed_out\" : false,\n \"num_reduce_phases\" : 0,\n \"_shards\" : {\n \"total\" : 562, <4>\n \"successful\" : 3, <5>\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 157483, <6>\n \"relation\" : \"gte\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/async-search.asciidoc",
- "line": 146
- },
- "digest": "14b81f96297952970b78a3216e059596",
- "lang": "console",
- "found": [],
- "source": "GET /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
- "query": null,
- "body": null,
- "params": {
- "id": "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="
- },
- "api": "async_search.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/async-search.asciidoc",
- "line": 152
- },
- "digest": "0f1fcb83af235bb9409e34d19deb637b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n \"is_partial\" : true, <1>\n \"is_running\" : true, <2>\n \"start_time_in_millis\" : 1583945890986,\n \"expiration_time_in_millis\" : 1584377890986, <3>\n \"response\" : {\n \"took\" : 12144,\n \"timed_out\" : false,\n \"num_reduce_phases\" : 46, <4>\n \"_shards\" : {\n \"total\" : 562, <5>\n \"successful\" : 188,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 456433,\n \"relation\" : \"eq\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n },\n \"aggregations\" : { <6>\n \"sale_date\" : {\n \"buckets\" : []\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/async-search.asciidoc",
- "line": 233
- },
- "digest": "7a3a7fbd81e5050b42e8c1eca26c7c1d",
- "lang": "console",
- "found": [],
- "source": "DELETE /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
- "query": null,
- "body": null,
- "params": {
- "id": "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="
- },
- "api": "async_search.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/scroll-api.asciidoc",
- "line": 25
- },
- "digest": "9ee6b38bc04ee4e73339b986ee09c30a",
- "lang": "console",
- "found": [],
- "source": "GET /_search/scroll\n{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/scroll",
- "query": null,
- "body": {
- "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
- },
- "params": null,
- "api": "scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/clear-scroll-api.asciidoc",
- "line": 25
- },
- "digest": "b0d64d0a554549e5b2808002a0725493",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "DELETE /_search/scroll\n{\n \"scroll_id\" : \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_search/scroll",
- "query": null,
- "body": {
- "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
- },
- "params": null,
- "api": "clear_scroll"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 7
- },
- "digest": "e068d93555351b9afbdb9dd2aff6368d",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\" : {\n \"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } },\n \"size\" : \"{{my_size}}\"\n },\n \"params\" : {\n \"my_field\" : \"message\",\n \"my_value\" : \"some message\",\n \"my_size\" : 5\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "match": {
- "{{my_field}}": "{{my_value}}"
- }
- },
- "size": "{{my_size}}"
- },
- "params": {
- "my_field": "message",
- "my_value": "some message",
- "my_size": 5
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 112
- },
- "digest": "b19dc078255bfa1237206913ae94012f",
- "lang": "console",
- "found": [],
- "source": "POST _scripts/\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"title\": \"{{query_string}}\"\n }\n }\n }\n }\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 147
- },
- "digest": "e51c88800679913981757542bc639816",
- "lang": "console",
- "found": [],
- "source": "GET _scripts/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 155
- },
- "digest": "f3f8f542b19e2e32b38274df21e74c43",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"script\" : {\n \"lang\" : \"mustache\",\n \"source\" : \"{\\\"query\\\":{\\\"match\\\":{\\\"title\\\":\\\"{{query_string}}\\\"}}}\",\n \"options\": {\n \"content_type\" : \"application/json; charset=UTF-8\"\n }\n },\n \"_id\": \"\",\n \"found\": true\n}"
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 173
- },
- "digest": "ed639528456671b302ecc887f5a60987",
- "lang": "console",
- "found": [],
- "source": "DELETE _scripts/",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 185
- },
- "digest": "de5b9f1211876f6ba7a4c93e87c27d3a",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"id\": \"\", <1>\n \"params\": {\n \"query_string\": \"search for these words\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "id": "",
- "params": {
- "query_string": "search for these words"
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 205
- },
- "digest": "4b13f649aa2eca6f7ee4221f708430c1",
- "lang": "console",
- "found": [],
- "source": "GET _render/template\n{\n \"source\": \"{ \\\"query\\\": { \\\"terms\\\": {{#toJson}}statuses{{/toJson}} }}\",\n \"params\": {\n \"statuses\" : {\n \"status\": [ \"pending\", \"published\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_render/template",
- "query": null,
- "body": {
- "source": "{ \"query\": { \"terms\": {{#toJson}}statuses{{/toJson}} }}",
- "params": {
- "statuses": {
- "status": [
- "pending",
- "published"
- ]
- }
- }
- },
- "params": null,
- "api": "render_search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 221
- },
- "digest": "f4b44a1758edafc2e3ea3db7ed7cd9e2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template_output\": {\n \"query\": {\n \"terms\": {\n \"status\": [ <1>\n \"pending\",\n \"published\"\n ]\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 258
- },
- "digest": "99e29a569f37ea83b02687e6e2793529",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"id\": \"my_template\",\n \"params\": {\n \"status\": [ \"pending\", \"published\" ]\n },\n \"explain\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "id": "my_template",
- "params": {
- "status": [
- "pending",
- "published"
- ]
- },
- "explain": true
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 277
- },
- "digest": "3462452c6fdba8dc1efe2cca101246e8",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"id\": \"my_template\",\n \"params\": {\n \"status\": [ \"pending\", \"published\" ]\n },\n \"profile\": true\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "id": "my_template",
- "params": {
- "status": [
- "pending",
- "published"
- ]
- },
- "profile": true
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 294
- },
- "digest": "4697b9aa952ac1613ee1a6ec7b3223c1",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": {\n \"query\": {\n \"term\": {\n \"message\": \"{{query_string}}\"\n }\n }\n },\n \"params\": {\n \"query_string\": \"search for these words\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "term": {
- "message": "{{query_string}}"
- }
- }
- },
- "params": {
- "query_string": "search for these words"
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 318
- },
- "digest": "eb1f3134f28a9ba8406b0f10199cf5be",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": \"{ \\\"query\\\": { \\\"terms\\\": {{#toJson}}statuses{{/toJson}} }}\",\n \"params\": {\n \"statuses\" : {\n \"status\": [ \"pending\", \"published\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": "{ \"query\": { \"terms\": {{#toJson}}statuses{{/toJson}} }}",
- "params": {
- "statuses": {
- "status": [
- "pending",
- "published"
- ]
- }
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 350
- },
- "digest": "6be45fa02e779a727ddf48f871610aa8",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": \"{\\\"query\\\":{\\\"bool\\\":{\\\"must\\\": {{#toJson}}clauses{{/toJson}} }}}\",\n \"params\": {\n \"clauses\": [\n { \"term\": { \"user\" : \"foo\" } },\n { \"term\": { \"user\" : \"bar\" } }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": "{\"query\":{\"bool\":{\"must\": {{#toJson}}clauses{{/toJson}} }}}",
- "params": {
- "clauses": [
- {
- "term": {
- "user": "foo"
- }
- },
- {
- "term": {
- "user": "bar"
- }
- }
- ]
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 395
- },
- "digest": "33bb4a6ec63a709a14dfa15a5e2cca88",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": {\n \"query\": {\n \"match\": {\n \"emails\": \"{{#join}}emails{{/join}}\"\n }\n }\n },\n \"params\": {\n \"emails\": [ \"username@email.com\", \"lastname@email.com\" ]\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "match": {
- "emails": "{{#join}}emails{{/join}}"
- }
- }
- },
- "params": {
- "emails": [
- "username@email.com",
- "lastname@email.com"
- ]
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 428
- },
- "digest": "02f0012ca77fdc409592e524e5647fb8",
- "lang": "console",
- "found": [],
- "source": "GET _search/template\n{\n \"source\": {\n \"query\": {\n \"range\": {\n \"born\": {\n \"gte\" : \"{{date.min}}\",\n \"lte\" : \"{{date.max}}\",\n \"format\": \"{{#join delimiter='||'}}date.formats{{/join delimiter='||'}}\"\n\t }\n }\n }\n },\n \"params\": {\n \"date\": {\n \"min\": \"2016\",\n \"max\": \"31/12/2017\",\n \"formats\": [\"dd/MM/yyyy\", \"yyyy\"]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_search/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "range": {
- "born": {
- "gte": "{{date.min}}",
- "lte": "{{date.max}}",
- "format": "{{#join delimiter='||'}}date.formats{{/join delimiter='||'}}"
- }
- }
- }
- },
- "params": {
- "date": {
- "min": "2016",
- "max": "31/12/2017",
- "formats": [
- "dd/MM/yyyy",
- "yyyy"
- ]
- }
- }
- },
- "params": null,
- "api": "search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 612
- },
- "digest": "a5cc9a86f0f9525cd86564421c721d2f",
- "lang": "console",
- "found": [],
- "source": "GET _render/template\n{\n \"source\" : {\n \"query\" : {\n \"term\": {\n \"http_access_log\": \"{{#url}}{{host}}/{{page}}{{/url}}\"\n }\n }\n },\n \"params\": {\n \"host\": \"https://www.elastic.co/\",\n \"page\": \"learn\"\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_render/template",
- "query": null,
- "body": {
- "source": {
- "query": {
- "term": {
- "http_access_log": "{{#url}}{{host}}/{{page}}{{/url}}"
- }
- }
- },
- "params": {
- "host": "https://www.elastic.co/",
- "page": "learn"
- }
- },
- "params": null,
- "api": "render_search_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-template.asciidoc",
- "line": 633
- },
- "digest": "619e96682251070000a25d9c2416456e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"template_output\" : {\n \"query\" : {\n \"term\" : {\n \"http_access_log\" : \"https%3A%2F%2Fwww.elastic.co%2F%2Flearn\"\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 7
- },
- "digest": "49b137a1c0016face219bac3faf41996",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search_shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search_shards",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search_shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 60
- },
- "digest": "49b137a1c0016face219bac3faf41996",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search_shards",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search_shards",
- "query": null,
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search_shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 68
- },
- "digest": "76b0a597cf67a4a269f0d58f2a48f062",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\": ...,\n \"indices\" : {\n \"twitter\": { }\n },\n \"shards\": [\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 0,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"0TvkCyF7TAmM1wHP4a42-A\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 1,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"fMju3hd1QHWmWrIgFnI4Ww\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 2,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"Nwl0wbMBTHCWjEEbGYGapg\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 3,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"bU_KLGJISbW0RejwnwDPKw\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 4,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"DMs7_giNSwmdqVukF7UydA\"},\n \"relocating_node\": null\n }\n ]\n ]\n}"
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 144
- },
- "digest": "a44b7da0091ac75e5571475a4e99bb16",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search_shards?routing=foo,bar",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search_shards",
- "query": {
- "routing": "foo,bar"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "search_shards"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/search-shards.asciidoc",
- "line": 152
- },
- "digest": "15386d464faca2db38376ae46da0d967",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"nodes\": ...,\n \"indices\" : {\n \"twitter\": { }\n },\n \"shards\": [\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 2,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"fMju3hd1QHWmWrIgFnI4Ww\"},\n \"relocating_node\": null\n }\n ],\n [\n {\n \"index\": \"twitter\",\n \"node\": \"JklnKbD7Tyqi9TP3_Q_tBg\",\n \"primary\": true,\n \"shard\": 3,\n \"state\": \"STARTED\",\n \"allocation_id\": {\"id\":\"0TvkCyF7TAmM1wHP4a42-A\"},\n \"relocating_node\": null\n }\n ]\n ]\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters.asciidoc",
- "line": 8
- },
- "digest": "626f8c4b3e2cd3d9beaa63a7f5799d7a",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST twitter/_search\n{\n \"query\" : {\n \"match\": {\n \"message\": \"tring out Elasticsearch\"\n }\n },\n \"suggest\" : {\n \"my-suggestion\" : {\n \"text\" : \"tring out Elasticsearch\",\n \"term\" : {\n \"field\" : \"message\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "tring out Elasticsearch"
- }
- },
- "suggest": {
- "my-suggestion": {
- "text": "tring out Elasticsearch",
- "term": {
- "field": "message"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters.asciidoc",
- "line": 51
- },
- "digest": "2533e4b36ae837eaecda08407ecb6383",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _search\n{\n \"suggest\": {\n \"my-suggest-1\" : {\n \"text\" : \"tring out Elasticsearch\",\n \"term\" : {\n \"field\" : \"message\"\n }\n },\n \"my-suggest-2\" : {\n \"text\" : \"kmichy\",\n \"term\" : {\n \"field\" : \"user\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "suggest": {
- "my-suggest-1": {
- "text": "tring out Elasticsearch",
- "term": {
- "field": "message"
- }
- },
- "my-suggest-2": {
- "text": "kmichy",
- "term": {
- "field": "user"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters.asciidoc",
- "line": 80
- },
- "digest": "b53648eccf39f999e69495a1ef4b8a43",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"hits\": ...\n \"took\": 2,\n \"timed_out\": false,\n \"suggest\": {\n \"my-suggest-1\": [ {\n \"text\": \"tring\",\n \"offset\": 0,\n \"length\": 5,\n \"options\": [ {\"text\": \"trying\", \"score\": 0.8, \"freq\": 1 } ]\n }, {\n \"text\": \"out\",\n \"offset\": 6,\n \"length\": 3,\n \"options\": []\n }, {\n \"text\": \"elasticsearch\",\n \"offset\": 10,\n \"length\": 13,\n \"options\": []\n } ],\n \"my-suggest-2\": ...\n }\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters.asciidoc",
- "line": 127
- },
- "digest": "5275842787967b6db876025f4a1c6942",
- "lang": "console",
- "found": [
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "POST _search\n{\n \"suggest\": {\n \"text\" : \"tring out Elasticsearch\",\n \"my-suggest-1\" : {\n \"term\" : {\n \"field\" : \"message\"\n }\n },\n \"my-suggest-2\" : {\n \"term\" : {\n \"field\" : \"user\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "tring out Elasticsearch",
- "my-suggest-1": {
- "term": {
- "field": "message"
- }
- },
- "my-suggest-2": {
- "term": {
- "field": "user"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 25
- },
- "digest": "5566cff431570f522e1fc5475b2ed875",
- "lang": "console",
- "found": [],
- "source": "PUT test\n{\n \"settings\": {\n \"index\": {\n \"number_of_shards\": 1,\n \"analysis\": {\n \"analyzer\": {\n \"trigram\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\"lowercase\",\"shingle\"]\n },\n \"reverse\": {\n \"type\": \"custom\",\n \"tokenizer\": \"standard\",\n \"filter\": [\"lowercase\",\"reverse\"]\n }\n },\n \"filter\": {\n \"shingle\": {\n \"type\": \"shingle\",\n \"min_shingle_size\": 2,\n \"max_shingle_size\": 3\n }\n }\n }\n }\n },\n \"mappings\": {\n \"properties\": {\n \"title\": {\n \"type\": \"text\",\n \"fields\": {\n \"trigram\": {\n \"type\": \"text\",\n \"analyzer\": \"trigram\"\n },\n \"reverse\": {\n \"type\": \"text\",\n \"analyzer\": \"reverse\"\n }\n }\n }\n }\n }\n}\nPOST test/_doc?refresh=true\n{\"title\": \"noble warriors\"}\nPOST test/_doc?refresh=true\n{\"title\": \"nobel prize\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/test",
- "query": null,
- "body": {
- "settings": {
- "index": {
- "number_of_shards": 1,
- "analysis": {
- "analyzer": {
- "trigram": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "shingle"
- ]
- },
- "reverse": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "reverse"
- ]
- }
- },
- "filter": {
- "shingle": {
- "type": "shingle",
- "min_shingle_size": 2,
- "max_shingle_size": 3
- }
- }
- }
- }
- },
- "mappings": {
- "properties": {
- "title": {
- "type": "text",
- "fields": {
- "trigram": {
- "type": "text",
- "analyzer": "trigram"
- },
- "reverse": {
- "type": "text",
- "analyzer": "reverse"
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "indices.create"
- },
- {
- "method": "POST",
- "url": "/test/_doc",
- "query": {
- "refresh": "true"
- },
- "body": {
- "title": "noble warriors"
- },
- "params": {
- "index": "test"
- },
- "api": "index"
- },
- {
- "method": "POST",
- "url": "/test/_doc",
- "query": {
- "refresh": "true"
- },
- "body": {
- "title": "nobel prize"
- },
- "params": {
- "index": "test"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 83
- },
- "digest": "3b162509ed14eda44a9681cd1108fa39",
- "lang": "console",
- "found": [],
- "source": "POST test/_search\n{\n \"suggest\": {\n \"text\": \"noble prize\",\n \"simple_phrase\": {\n \"phrase\": {\n \"field\": \"title.trigram\",\n \"size\": 1,\n \"gram_size\": 3,\n \"direct_generator\": [ {\n \"field\": \"title.trigram\",\n \"suggest_mode\": \"always\"\n } ],\n \"highlight\": {\n \"pre_tag\": \"\",\n \"post_tag\": \"\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "noble prize",
- "simple_phrase": {
- "phrase": {
- "field": "title.trigram",
- "size": 1,
- "gram_size": 3,
- "direct_generator": [
- {
- "field": "title.trigram",
- "suggest_mode": "always"
- }
- ],
- "highlight": {
- "pre_tag": "",
- "post_tag": ""
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 110
- },
- "digest": "3af632e3611008f1290293e8cb653e4f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\": ...\n \"hits\": ...\n \"timed_out\": false,\n \"took\": 3,\n \"suggest\": {\n \"simple_phrase\" : [\n {\n \"text\" : \"noble prize\",\n \"offset\" : 0,\n \"length\" : 11,\n \"options\" : [ {\n \"text\" : \"nobel prize\",\n \"highlighted\": \"nobel prize\",\n \"score\" : 0.48614594\n }]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 224
- },
- "digest": "89a6b24618cafd60de1702a5b9f28a8d",
- "lang": "console",
- "found": [],
- "source": "POST test/_search\n{\n \"suggest\": {\n \"text\" : \"noble prize\",\n \"simple_phrase\" : {\n \"phrase\" : {\n \"field\" : \"title.trigram\",\n \"size\" : 1,\n \"direct_generator\" : [ {\n \"field\" : \"title.trigram\",\n \"suggest_mode\" : \"always\",\n \"min_word_length\" : 1\n } ],\n \"collate\": {\n \"query\": { <1>\n \"source\" : {\n \"match\": {\n \"{{field_name}}\" : \"{{suggestion}}\" <2>\n }\n }\n },\n \"params\": {\"field_name\" : \"title\"}, <3>\n \"prune\": true <4>\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "noble prize",
- "simple_phrase": {
- "phrase": {
- "field": "title.trigram",
- "size": 1,
- "direct_generator": [
- {
- "field": "title.trigram",
- "suggest_mode": "always",
- "min_word_length": 1
- }
- ],
- "collate": {
- "query": {
- "source": {
- "match": {
- "{{field_name}}": "{{suggestion}}"
- }
- }
- },
- "params": {
- "field_name": "title"
- },
- "prune": true
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 293
- },
- "digest": "203c3bb334384bdfb11ff1101ccfba25",
- "lang": "console",
- "found": [],
- "source": "POST test/_search\n{\n \"suggest\": {\n \"text\" : \"obel prize\",\n \"simple_phrase\" : {\n \"phrase\" : {\n \"field\" : \"title.trigram\",\n \"size\" : 1,\n \"smoothing\" : {\n \"laplace\" : {\n \"alpha\" : 0.7\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "obel prize",
- "simple_phrase": {
- "phrase": {
- "field": "title.trigram",
- "size": 1,
- "smoothing": {
- "laplace": {
- "alpha": 0.7
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/phrase-suggest.asciidoc",
- "line": 413
- },
- "digest": "eb6d62f1d855a8e8fe9eab2656d47504",
- "lang": "console",
- "found": [],
- "source": "POST test/_search\n{\n \"suggest\": {\n \"text\" : \"obel prize\",\n \"simple_phrase\" : {\n \"phrase\" : {\n \"field\" : \"title.trigram\",\n \"size\" : 1,\n \"direct_generator\" : [ {\n \"field\" : \"title.trigram\",\n \"suggest_mode\" : \"always\"\n }, {\n \"field\" : \"title.reverse\",\n \"suggest_mode\" : \"always\",\n \"pre_filter\" : \"reverse\",\n \"post_filter\" : \"reverse\"\n } ]\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/test/_search",
- "query": null,
- "body": {
- "suggest": {
- "text": "obel prize",
- "simple_phrase": {
- "phrase": {
- "field": "title.trigram",
- "size": 1,
- "direct_generator": [
- {
- "field": "title.trigram",
- "suggest_mode": "always"
- },
- {
- "field": "title.reverse",
- "suggest_mode": "always",
- "pre_filter": "reverse",
- "post_filter": "reverse"
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "test"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 28
- },
- "digest": "b8718ca915bbb848925a5fb593a03e70",
- "lang": "console",
- "found": [],
- "source": "PUT music\n{\n \"mappings\": {\n \"properties\" : {\n \"suggest\" : {\n \"type\" : \"completion\"\n },\n \"title\" : {\n \"type\": \"keyword\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/music",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "suggest": {
- "type": "completion"
- },
- "title": {
- "type": "keyword"
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 84
- },
- "digest": "223787a2b80e132a22548768ccf7052d",
- "lang": "console",
- "found": [],
- "source": "PUT music/_doc/1?refresh\n{\n \"suggest\" : {\n \"input\": [ \"Nevermind\", \"Nirvana\" ],\n \"weight\" : 34\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/music/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "suggest": {
- "input": [
- "Nevermind",
- "Nirvana"
- ],
- "weight": 34
- }
- },
- "params": {
- "index": "music",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 120
- },
- "digest": "5e9f3b7246f4549624fa5b9dd3719d75",
- "lang": "console",
- "found": [],
- "source": "PUT music/_doc/1?refresh\n{\n \"suggest\" : [\n {\n \"input\": \"Nevermind\",\n \"weight\" : 10\n },\n {\n \"input\": \"Nirvana\",\n \"weight\" : 3\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/music/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "suggest": [
- {
- "input": "Nevermind",
- "weight": 10
- },
- {
- "input": "Nirvana",
- "weight": 3
- }
- ]
- },
- "params": {
- "index": "music",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 141
- },
- "digest": "7c3414279d47e9c29105d061ed316ef8",
- "lang": "console",
- "found": [],
- "source": "PUT music/_doc/1?refresh\n{\n \"suggest\" : [ \"Nevermind\", \"Nirvana\" ]\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/music/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "suggest": [
- "Nevermind",
- "Nirvana"
- ]
- },
- "params": {
- "index": "music",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 158
- },
- "digest": "7f951981bd8ed09e56aebeb13adb96ce",
- "lang": "console",
- "found": [],
- "source": "POST music/_search?pretty\n{\n \"suggest\": {\n \"song-suggest\" : {\n \"prefix\" : \"nir\", <1>\n \"completion\" : { <2>\n \"field\" : \"suggest\" <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "song-suggest": {
- "prefix": "nir",
- "completion": {
- "field": "suggest"
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 180
- },
- "digest": "92c5e36c94d3f183766862498044ec16",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\": ...\n \"took\": 2,\n \"timed_out\": false,\n \"suggest\": {\n \"song-suggest\" : [ {\n \"text\" : \"nir\",\n \"offset\" : 0,\n \"length\" : 3,\n \"options\" : [ {\n \"text\" : \"Nirvana\",\n \"_index\": \"music\",\n \"_id\": \"1\",\n \"_score\": 1.0,\n \"_source\": {\n \"suggest\": [\"Nevermind\", \"Nirvana\"]\n }\n } ]\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 226
- },
- "digest": "565ef4aad0c7765879325cc5d2e3c530",
- "lang": "console",
- "found": [],
- "source": "POST music/_search\n{\n \"_source\": \"suggest\", <1>\n \"suggest\": {\n \"song-suggest\" : {\n \"prefix\" : \"nir\",\n \"completion\" : {\n \"field\" : \"suggest\", <2>\n \"size\" : 5 <3>\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": null,
- "body": {
- "_source": "suggest",
- "suggest": {
- "song-suggest": {
- "prefix": "nir",
- "completion": {
- "field": "suggest",
- "size": 5
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 250
- },
- "digest": "af0f6a4645a4b938f4fa892935cb1f26",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 6,\n \"timed_out\": false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 0,\n \"relation\": \"eq\"\n },\n \"max_score\" : null,\n \"hits\" : []\n },\n \"suggest\": {\n \"song-suggest\" : [ {\n \"text\" : \"nir\",\n \"offset\" : 0,\n \"length\" : 3,\n \"options\" : [ {\n \"text\" : \"Nirvana\",\n \"_index\": \"music\",\n \"_id\": \"1\",\n \"_score\": 1.0,\n \"_source\": {\n \"suggest\": [\"Nevermind\", \"Nirvana\"]\n }\n } ]\n } ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 316
- },
- "digest": "b2a6fb1a94dd10bf594dafe727647e1d",
- "lang": "console",
- "found": [],
- "source": "POST music/_search?pretty\n{\n \"suggest\": {\n \"song-suggest\" : {\n \"prefix\" : \"nor\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"skip_duplicates\": true\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "song-suggest": {
- "prefix": "nor",
- "completion": {
- "field": "suggest",
- "skip_duplicates": true
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 341
- },
- "digest": "a4eac3c0bac550247e8c7d3f9bcaac1c",
- "lang": "console",
- "found": [],
- "source": "POST music/_search?pretty\n{\n \"suggest\": {\n \"song-suggest\" : {\n \"prefix\" : \"nor\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"fuzzy\" : {\n \"fuzziness\" : 2\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "song-suggest": {
- "prefix": "nor",
- "completion": {
- "field": "suggest",
- "fuzzy": {
- "fuzziness": 2
- }
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/completion-suggest.asciidoc",
- "line": 399
- },
- "digest": "62280b8a1ec0c214b3110a2c42a55fce",
- "lang": "console",
- "found": [],
- "source": "POST music/_search?pretty\n{\n \"suggest\": {\n \"song-suggest\" : {\n \"regex\" : \"n[ever|i]r\",\n \"completion\" : {\n \"field\" : \"suggest\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/music/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "song-suggest": {
- "regex": "n[ever|i]r",
- "completion": {
- "field": "suggest"
- }
- }
- }
- },
- "params": {
- "index": "music"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 25
- },
- "digest": "46b3154afd9a05f1aadd726efdd9cf98",
- "lang": "console",
- "found": [],
- "source": "PUT place\n{\n \"mappings\": {\n \"properties\" : {\n \"suggest\" : {\n \"type\" : \"completion\",\n \"contexts\": [\n { <1>\n \"name\": \"place_type\",\n \"type\": \"category\"\n },\n { <2>\n \"name\": \"location\",\n \"type\": \"geo\",\n \"precision\": 4\n }\n ]\n }\n }\n }\n}\nPUT place_path_category\n{\n \"mappings\": {\n \"properties\" : {\n \"suggest\" : {\n \"type\" : \"completion\",\n \"contexts\": [\n { <3>\n \"name\": \"place_type\",\n \"type\": \"category\",\n \"path\": \"cat\"\n },\n { <4>\n \"name\": \"location\",\n \"type\": \"geo\",\n \"precision\": 4,\n \"path\": \"loc\"\n }\n ]\n },\n \"loc\": {\n \"type\": \"geo_point\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/place",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "suggest": {
- "type": "completion",
- "contexts": [
- {
- "name": "place_type",
- "type": "category"
- },
- {
- "name": "location",
- "type": "geo",
- "precision": 4
- }
- ]
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "indices.create"
- },
- {
- "method": "PUT",
- "url": "/place_path_category",
- "query": null,
- "body": {
- "mappings": {
- "properties": {
- "suggest": {
- "type": "completion",
- "contexts": [
- {
- "name": "place_type",
- "type": "category",
- "path": "cat"
- },
- {
- "name": "location",
- "type": "geo",
- "precision": 4,
- "path": "loc"
- }
- ]
- },
- "loc": {
- "type": "geo_point"
- }
- }
- }
- },
- "params": {
- "index": "place_path_category"
- },
- "api": "indices.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 100
- },
- "digest": "2e59a0f8721e27dd537566f4af7a568f",
- "lang": "console",
- "found": [],
- "source": "PUT place/_doc/1\n{\n \"suggest\": {\n \"input\": [\"timmy's\", \"starbucks\", \"dunkin donuts\"],\n \"contexts\": {\n \"place_type\": [\"cafe\", \"food\"] <1>\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/place/_doc/1",
- "query": null,
- "body": {
- "suggest": {
- "input": [
- "timmy's",
- "starbucks",
- "dunkin donuts"
- ],
- "contexts": {
- "place_type": [
- "cafe",
- "food"
- ]
- }
- }
- },
- "params": {
- "index": "place",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 118
- },
- "digest": "d2a53c6c16ff2305830f64a3efd5f61d",
- "lang": "console",
- "found": [],
- "source": "PUT place_path_category/_doc/1\n{\n \"suggest\": [\"timmy's\", \"starbucks\", \"dunkin donuts\"],\n \"cat\": [\"cafe\", \"food\"] <1>\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/place_path_category/_doc/1",
- "query": null,
- "body": {
- "suggest": [
- "timmy's",
- "starbucks",
- "dunkin donuts"
- ],
- "cat": [
- "cafe",
- "food"
- ]
- },
- "params": {
- "index": "place_path_category",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 140
- },
- "digest": "8c3e9da5f412261477c032b33f36a3e9",
- "lang": "console",
- "found": [],
- "source": "POST place/_search?pretty\n{\n \"suggest\": {\n \"place_suggestion\" : {\n \"prefix\" : \"tim\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"size\": 10,\n \"contexts\": {\n \"place_type\": [ \"cafe\", \"restaurants\" ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/place/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "place_suggestion": {
- "prefix": "tim",
- "completion": {
- "field": "suggest",
- "size": 10,
- "contexts": {
- "place_type": [
- "cafe",
- "restaurants"
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 168
- },
- "digest": "8ac73762800c9db1ae418bfc0bcfa65a",
- "lang": "console",
- "found": [],
- "source": "POST place/_search?pretty\n{\n \"suggest\": {\n \"place_suggestion\" : {\n \"prefix\" : \"tim\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"size\": 10,\n \"contexts\": {\n \"place_type\": [ <1>\n { \"context\" : \"cafe\" },\n { \"context\" : \"restaurants\", \"boost\": 2 }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/place/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "place_suggestion": {
- "prefix": "tim",
- "completion": {
- "field": "suggest",
- "size": 10,
- "contexts": {
- "place_type": [
- {
- "context": "cafe"
- },
- {
- "context": "restaurants",
- "boost": 2
- }
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 253
- },
- "digest": "182162241e42f16f5860ea26fdc52c7e",
- "lang": "console",
- "found": [],
- "source": "PUT place/_doc/1\n{\n \"suggest\": {\n \"input\": \"timmy's\",\n \"contexts\": {\n \"location\": [\n {\n \"lat\": 43.6624803,\n \"lon\": -79.3863353\n },\n {\n \"lat\": 43.6624718,\n \"lon\": -79.3873227\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/place/_doc/1",
- "query": null,
- "body": {
- "suggest": {
- "input": "timmy's",
- "contexts": {
- "location": [
- {
- "lat": 43.6624803,
- "lon": -79.3863353
- },
- {
- "lat": 43.6624718,
- "lon": -79.3873227
- }
- ]
- }
- }
- },
- "params": {
- "index": "place",
- "id": "1"
- },
- "api": "index"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 282
- },
- "digest": "bc79a8936474faf7de6d3c9872678176",
- "lang": "console",
- "found": [],
- "source": "POST place/_search\n{\n \"suggest\": {\n \"place_suggestion\" : {\n \"prefix\" : \"tim\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"size\": 10,\n \"contexts\": {\n \"location\": {\n \"lat\": 43.662,\n \"lon\": -79.380\n }\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/place/_search",
- "query": null,
- "body": {
- "suggest": {
- "place_suggestion": {
- "prefix": "tim",
- "completion": {
- "field": "suggest",
- "size": 10,
- "contexts": {
- "location": {
- "lat": 43.662,
- "lon": -79.38
- }
- }
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/context-suggest.asciidoc",
- "line": 315
- },
- "digest": "837c765a38fa0fd5f01b1559138469be",
- "lang": "console",
- "found": [],
- "source": "POST place/_search?pretty\n{\n \"suggest\": {\n \"place_suggestion\" : {\n \"prefix\" : \"tim\",\n \"completion\" : {\n \"field\" : \"suggest\",\n \"size\": 10,\n \"contexts\": {\n \"location\": [ <1>\n {\n \"lat\": 43.6624803,\n \"lon\": -79.3863353,\n \"precision\": 2\n },\n {\n \"context\": {\n \"lat\": 43.6624803,\n \"lon\": -79.3863353\n },\n \"boost\": 2\n }\n ]\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/place/_search",
- "query": {
- "pretty": true
- },
- "body": {
- "suggest": {
- "place_suggestion": {
- "prefix": "tim",
- "completion": {
- "field": "suggest",
- "size": 10,
- "contexts": {
- "location": [
- {
- "lat": 43.6624803,
- "lon": -79.3863353,
- "precision": 2
- },
- {
- "context": {
- "lat": 43.6624803,
- "lon": -79.3863353
- },
- "boost": 2
- }
- ]
- }
- }
- }
- }
- },
- "params": {
- "index": "place"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/misc.asciidoc",
- "line": 10
- },
- "digest": "e194e9cbe3eb2305f4f7cdda0cf529bd",
- "lang": "console",
- "found": [],
- "source": "POST _search?typed_keys\n{\n \"suggest\": {\n \"text\" : \"some test mssage\",\n \"my-first-suggester\" : {\n \"term\" : {\n \"field\" : \"message\"\n }\n },\n \"my-second-suggester\" : {\n \"phrase\" : {\n \"field\" : \"message\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_search",
- "query": {
- "typed_keys": true
- },
- "body": {
- "suggest": {
- "text": "some test mssage",
- "my-first-suggester": {
- "term": {
- "field": "message"
- }
- },
- "my-second-suggester": {
- "phrase": {
- "field": "message"
- }
- }
- }
- },
- "params": null,
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/suggesters/misc.asciidoc",
- "line": 34
- },
- "digest": "e271c47fe54d36c6e09791d1a50ce314",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"suggest\": {\n \"term#my-first-suggester\": [ <1>\n {\n \"text\": \"some\",\n \"offset\": 0,\n \"length\": 4,\n \"options\": []\n },\n {\n \"text\": \"test\",\n \"offset\": 5,\n \"length\": 4,\n \"options\": []\n },\n {\n \"text\": \"mssage\",\n \"offset\": 10,\n \"length\": 6,\n \"options\": [\n {\n \"text\": \"message\",\n \"score\": 0.8333333,\n \"freq\": 4\n }\n ]\n }\n ],\n \"phrase#my-second-suggester\": [ <2>\n {\n \"text\": \"some test mssage\",\n \"offset\": 0,\n \"length\": 16,\n \"options\": [\n {\n \"text\": \"some test message\",\n \"score\": 0.030227963\n }\n ]\n }\n ]\n },\n ...\n}"
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 10
- },
- "digest": "58a2a71be35e770b50914753740ec91e",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_msearch\n{ }\n{\"query\" : {\"match\" : { \"message\": \"this is a test\"}}}\n{\"index\": \"twitter2\"}\n{\"query\" : {\"match_all\" : {}}}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_msearch",
- "query": null,
- "body": [
- {},
- {
- "query": {
- "match": {
- "message": "this is a test"
- }
- }
- },
- {
- "index": "twitter2"
- },
- {
- "query": {
- "match_all": {}
- }
- }
- ],
- "params": {
- "index": "twitter"
- },
- "api": "msearch"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 301
- },
- "digest": "05af5eab63bf98d0078dfe661cd81124",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_msearch\n{}\n{\"query\" : {\"match_all\" : {}}, \"from\" : 0, \"size\" : 10}\n{}\n{\"query\" : {\"match_all\" : {}}}\n{\"index\" : \"twitter2\"}\n{\"query\" : {\"match_all\" : {}}}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_msearch",
- "query": null,
- "body": [
- {},
- {
- "query": {
- "match_all": {}
- },
- "from": 0,
- "size": 10
- },
- {},
- {
- "query": {
- "match_all": {}
- }
- },
- {
- "index": "twitter2"
- },
- {
- "query": {
- "match_all": {}
- }
- }
- ],
- "params": {
- "index": "twitter"
- },
- "api": "msearch"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 334
- },
- "digest": "a914be2ff7dd0cbdec0257f0ad50b625",
- "lang": "console",
- "found": [],
- "source": "GET _msearch/template\n{\"index\" : \"twitter\"}\n{ \"source\" : \"{ \\\"query\\\": { \\\"match\\\": { \\\"message\\\" : \\\"{{keywords}}\\\" } } } }\", \"params\": { \"query_type\": \"match\", \"keywords\": \"some message\" } }\n{\"index\" : \"twitter\"}\n{ \"source\" : \"{ \\\"query\\\": { \\\"match_{{template}}\\\": {} } }\", \"params\": { \"template\": \"all\" } }",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_msearch/template",
- "query": null,
- "body": [
- {
- "index": "twitter"
- },
- {
- "source": "{ \"query\": { \"match\": { \"message\" : \"{{keywords}}\" } } } }",
- "params": {
- "query_type": "match",
- "keywords": "some message"
- }
- },
- {
- "index": "twitter"
- },
- {
- "source": "{ \"query\": { \"match_{{template}}\": {} } }",
- "params": {
- "template": "all"
- }
- }
- ],
- "params": null,
- "api": "msearch_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 347
- },
- "digest": "28e66ff0ecdd71cb1426880115eab5dd",
- "lang": "console",
- "found": [],
- "source": "POST /_scripts/my_template_1\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/my_template_1",
- "query": null,
- "body": {
- "script": {
- "lang": "mustache",
- "source": {
- "query": {
- "match": {
- "message": "{{query_string}}"
- }
- }
- }
- }
- },
- "params": {
- "id": "my_template_1"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 366
- },
- "digest": "72e72cb3aa1b10b903d8cadcaddf7d10",
- "lang": "console",
- "found": [],
- "source": "POST /_scripts/my_template_2\n{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"term\": {\n \"{{field}}\": \"{{value}}\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_scripts/my_template_2",
- "query": null,
- "body": {
- "script": {
- "lang": "mustache",
- "source": {
- "query": {
- "term": {
- "{{field}}": "{{value}}"
- }
- }
- }
- }
- },
- "params": {
- "id": "my_template_2"
- },
- "api": "put_script"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/multi-search.asciidoc",
- "line": 386
- },
- "digest": "8b4c8f395c0a6f952a42051a0d357154",
- "lang": "console",
- "found": [],
- "source": "GET _msearch/template\n{\"index\" : \"main\"}\n{ \"id\": \"my_template_1\", \"params\": { \"query_string\": \"some message\" } }\n{\"index\" : \"main\"}\n{ \"id\": \"my_template_2\", \"params\": { \"field\": \"user\", \"value\": \"test\" } }",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_msearch/template",
- "query": null,
- "body": [
- {
- "index": "main"
- },
- {
- "id": "my_template_1",
- "params": {
- "query_string": "some message"
- }
- },
- {
- "index": "main"
- },
- {
- "id": "my_template_2",
- "params": {
- "field": "user",
- "value": "test"
- }
- }
- ],
- "params": null,
- "api": "msearch_template"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/eql-search-api.asciidoc",
- "line": 36
- },
- "digest": "194ef7d5af279d9ca4d639e0b7eb5cc3",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_eql/search\n{\n \"query\": \"\"\"\n process where process.name = \"regsvr32.exe\"\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_eql/search",
- "query": null,
- "body": {
- "query": "\n process where process.name = \"regsvr32.exe\"\n "
- },
- "params": {
- "index": "my_index"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/eql-search-api.asciidoc",
- "line": 510
- },
- "digest": "5ee14675ed74281a57f348c08587a56d",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_eql/search\n{\n \"query\": \"\"\"\n file where (file.name == \"cmd.exe\" and agent.id != \"my_user\")\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_eql/search",
- "query": null,
- "body": {
- "query": "\n file where (file.name == \"cmd.exe\" and agent.id != \"my_user\")\n "
- },
- "params": {
- "index": "my_index"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/eql-search-api.asciidoc",
- "line": 530
- },
- "digest": "984f90f0a361c9e58f20d59b266797de",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 6,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 2,\n \"relation\": \"eq\"\n },\n \"events\": [\n {\n \"_index\": \"my_index\",\n \"_id\": \"2\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-06T11:04:07.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"file\",\n \"id\": \"dGCHwoeS\",\n \"sequence\": 2,\n },\n \"file\": {\n \"accessed\": \"2020-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n },\n \"sort\": [\n 1607252647000\n ]\n },\n {\n \"_index\": \"my_index\",\n \"_id\": \"4\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:07:08.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"file\",\n \"id\": \"bYA7gPay\",\n \"sequence\": 4\n },\n \"file\": {\n \"accessed\": \"2020-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n },\n \"sort\": [\n 1607339228000\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "eql/eql-search-api.asciidoc",
- "line": 631
- },
- "digest": "e5da3fd0dc6911375c47412c74b21bfd",
- "lang": "console",
- "found": [],
- "source": "GET /my_index/_eql/search\n{\n \"query\": \"\"\"\n sequence by agent.id\n [ file where file.name == \"cmd.exe\" and agent.id != \"my_user\" ]\n [ process where stringContains(process.path, \"regsvr32\") ]\n \"\"\"\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/my_index/_eql/search",
- "query": null,
- "body": {
- "query": "\n sequence by agent.id\n [ file where file.name == \"cmd.exe\" and agent.id != \"my_user\" ]\n [ process where stringContains(process.path, \"regsvr32\") ]\n "
- },
- "params": {
- "index": "my_index"
- },
- "api": "eql.search"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/eql-search-api.asciidoc",
- "line": 654
- },
- "digest": "5e1afa40ba67fe38a98b5a142f8cf08f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 6,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"sequences\": [\n {\n \"join_keys\": [\n \"8a4f500d\"\n ],\n \"events\": [\n {\n \"_index\": \"my_index\",\n \"_id\": \"4\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:07:08.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"file\",\n \"id\": \"bYA7gPay\",\n \"sequence\": 4\n },\n \"file\": {\n \"accessed\": \"2020-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n },\n \"sort\": [\n 1607339228000\n ]\n },\n {\n \"_index\": \"my_index\",\n \"_id\": \"5\",\n \"_score\": null,\n \"_source\": {\n \"@timestamp\": \"2020-12-07T11:07:09.000Z\",\n \"agent\": {\n \"id\": \"8a4f500d\"\n },\n \"event\": {\n \"category\": \"process\",\n \"id\": \"aR3NWVOs\",\n \"sequence\": 5\n },\n \"process\": {\n \"name\": \"regsvr32.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\"\n }\n },\n \"sort\": [\n 1607339229000\n ]\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "eql/get-async-eql-search-api.asciidoc",
- "line": 17
- },
- "digest": "d5ead6aacbfbedc8396f87bb34acc880",
- "lang": "console",
- "found": [],
- "source": "GET /_eql/search/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_eql/search/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
- "query": null,
- "body": null,
- "params": {
- "id": "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM="
- },
- "api": "eql.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "eql/delete-async-eql-search-api.asciidoc",
- "line": 17
- },
- "digest": "26d3ab748a855eb383e992eb1ff79662",
- "lang": "console",
- "found": [],
- "source": "DELETE /_eql/search/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_eql/search/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
- "query": null,
- "body": null,
- "params": {
- "id": "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM="
- },
- "api": "eql.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/count.asciidoc",
- "line": 7
- },
- "digest": "1b542e3ea87a742f95641d64dcfb1bdb",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "GET /twitter/_count?q=user:kimchy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_count",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "count"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/count.asciidoc",
- "line": 99
- },
- "digest": "8f0511f8a5cb176ff2afdd4311799a33",
- "lang": "console",
- "found": [
- "csharp",
- "python",
- "ruby",
- "go",
- "js"
- ],
- "source": "PUT /twitter/_doc/1?refresh\n{\n \"user\": \"kimchy\"\n}\n\nGET /twitter/_count?q=user:kimchy\n\nGET /twitter/_count\n{\n \"query\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_doc/1",
- "query": {
- "refresh": true
- },
- "body": {
- "user": "kimchy"
- },
- "params": {
- "index": "twitter",
- "id": "1"
- },
- "api": "index"
- },
- {
- "method": "GET",
- "url": "/twitter/_count",
- "query": {
- "q": "user:kimchy"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "count"
- },
- {
- "method": "GET",
- "url": "/twitter/_count",
- "query": null,
- "body": {
- "query": {
- "term": {
- "user": "kimchy"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "count"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/count.asciidoc",
- "line": 119
- },
- "digest": "ff7c62cdac9ce9ba27890ff93c28e805",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"skipped\" : 0,\n \"failed\" : 0\n }\n}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 7
- },
- "digest": "6bdf94c025faf346013a70e3473d5f87",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?q=user:foo",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "q": "user:foo"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 81
- },
- "digest": "a0a6e4abbf0a5d064d06d06ddc585f4c",
- "lang": "console",
- "found": [],
- "source": "PUT twitter/_bulk?refresh\n{\"index\":{\"_id\":1}}\n{\"user\" : \"kimchy\", \"post_date\" : \"2009-11-15T14:12:12\", \"message\" : \"trying out Elasticsearch\"}\n{\"index\":{\"_id\":2}}\n{\"user\" : \"kimchi\", \"post_date\" : \"2009-11-15T14:12:13\", \"message\" : \"My username is similar to @kimchy!\"}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/twitter/_bulk",
- "query": {
- "refresh": true
- },
- "body": [
- {
- "index": {
- "_id": 1
- }
- },
- {
- "user": "kimchy",
- "post_date": "2009-11-15T14:12:12",
- "message": "trying out Elasticsearch"
- },
- {
- "index": {
- "_id": 2
- }
- },
- {
- "user": "kimchi",
- "post_date": "2009-11-15T14:12:13",
- "message": "My username is similar to @kimchy!"
- }
- ],
- "params": {
- "index": "twitter"
- },
- "api": "bulk"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 93
- },
- "digest": "6bdf94c025faf346013a70e3473d5f87",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?q=user:foo",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "q": "user:foo"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 102
- },
- "digest": "dde3105cdd6190eb8c8c392f5fcfcce5",
- "lang": "console-result",
- "found": [],
- "source": "{\"valid\":true,\"_shards\":{\"total\":1,\"successful\":1,\"failed\":0}}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 110
- },
- "digest": "1a0ce57a5e6d73765601de98a5d60d80",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query\n{\n \"query\" : {\n \"bool\" : {\n \"must\" : {\n \"query_string\" : {\n \"query\" : \"*:*\"\n }\n },\n \"filter\" : {\n \"term\" : { \"user\" : \"kimchy\" }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": null,
- "body": {
- "query": {
- "bool": {
- "must": {
- "query_string": {
- "query": "*:*"
- }
- },
- "filter": {
- "term": {
- "user": "kimchy"
- }
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 137
- },
- "digest": "9989c7860423519c7357936a73c2a5ce",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"post_date:foo\",\n \"lenient\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": null,
- "body": {
- "query": {
- "query_string": {
- "query": "post_date:foo",
- "lenient": false
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 151
- },
- "digest": "bda06f3e3031f6ef16990d18c6e261d7",
- "lang": "console-result",
- "found": [],
- "source": "{\"valid\":false,\"_shards\":{\"total\":1,\"successful\":1,\"failed\":0}}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 161
- },
- "digest": "b5cd0cc45db5f2fba30ac310630ad172",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?explain=true\n{\n \"query\": {\n \"query_string\": {\n \"query\": \"post_date:foo\",\n \"lenient\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "explain": "true"
- },
- "body": {
- "query": {
- "query_string": {
- "query": "post_date:foo",
- "lenient": false
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 178
- },
- "digest": "98f290a4192fd07d63b1d072fbe56cb9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"valid\" : false,\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0\n },\n \"explanations\" : [ {\n \"index\" : \"twitter\",\n \"valid\" : false,\n \"error\" : \"twitter/IAEc2nIXSSunQA_suI0MLw] QueryShardException[failed to create query:...failed to parse date field [foo]\"\n } ]\n}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 202
- },
- "digest": "fd74d7518bab5f1dbc1fed588b9bc2a6",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?rewrite=true\n{\n \"query\": {\n \"more_like_this\": {\n \"like\": {\n \"_id\": \"2\"\n },\n \"boost_terms\": 1\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "rewrite": "true"
- },
- "body": {
- "query": {
- "more_like_this": {
- "like": {
- "_id": "2"
- },
- "boost_terms": 1
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 221
- },
- "digest": "d62feb691bcd5e6a52c5e3a845b6d613",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"valid\": true,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"explanations\": [\n {\n \"index\": \"twitter\",\n \"valid\": true,\n \"explanation\": \"((user:terminator^3.71334 plot:future^2.763601 plot:human^2.8415773 plot:sarah^3.4193945 plot:kyle^3.8244398 plot:cyborg^3.9177752 plot:connor^4.040236 plot:reese^4.7133346 ... )~6) -ConstantScore(_id:2)) #(ConstantScore(_type:_doc))^0.0\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 260
- },
- "digest": "d253135ac0a4b3b04531b1a5d2a19279",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_validate/query?rewrite=true&all_shards=true\n{\n \"query\": {\n \"match\": {\n \"user\": {\n \"query\": \"kimchy\",\n \"fuzziness\": \"auto\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_validate/query",
- "query": {
- "rewrite": "true",
- "all_shards": "true"
- },
- "body": {
- "query": {
- "match": {
- "user": {
- "query": "kimchy",
- "fuzziness": "auto"
- }
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "indices.validate_query"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/validate.asciidoc",
- "line": 278
- },
- "digest": "76f99d22c1a295f11ade1d073ef25da7",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"valid\": true,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"explanations\": [\n {\n \"index\": \"twitter\",\n \"shard\": 0,\n \"valid\": true,\n \"explanation\": \"(user:kimchi)^0.8333333 user:kimchy\"\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "search/explain.asciidoc",
- "line": 8
- },
- "digest": "abfec22fbe7d571711cc65661ca887ee",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_explain/0\n{\n \"query\" : {\n \"match\" : { \"message\" : \"elasticsearch\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_explain/0",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/explain.asciidoc",
- "line": 89
- },
- "digest": "abfec22fbe7d571711cc65661ca887ee",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_explain/0\n{\n \"query\" : {\n \"match\" : { \"message\" : \"elasticsearch\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_explain/0",
- "query": null,
- "body": {
- "query": {
- "match": {
- "message": "elasticsearch"
- }
- }
- },
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/explain.asciidoc",
- "line": 103
- },
- "digest": "d7b94ea9b12e159f417deba419272791",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_index\":\"twitter\",\n \"_id\":\"0\",\n \"matched\":true,\n \"explanation\":{\n \"value\":1.6943598,\n \"description\":\"weight(message:elasticsearch in 0) [PerFieldSimilarity], result of:\",\n \"details\":[\n {\n \"value\":1.6943598,\n \"description\":\"score(freq=1.0), computed as boost * idf * tf from:\",\n \"details\":[\n {\n \"value\":2.2,\n \"description\":\"boost\",\n \"details\":[]\n },\n {\n \"value\":1.3862944,\n \"description\":\"idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\",\n \"details\":[\n {\n \"value\":1,\n \"description\":\"n, number of documents containing term\",\n \"details\":[]\n },\n {\n \"value\":5,\n \"description\":\"N, total number of documents with field\",\n \"details\":[]\n }\n ]\n },\n {\n \"value\":0.5555556,\n \"description\":\"tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:\",\n \"details\":[\n {\n \"value\":1.0,\n \"description\":\"freq, occurrences of term within document\",\n \"details\":[]\n },\n {\n \"value\":1.2,\n \"description\":\"k1, term saturation parameter\",\n \"details\":[]\n },\n {\n \"value\":0.75,\n \"description\":\"b, length normalization parameter\",\n \"details\":[]\n },\n {\n \"value\":3.0,\n \"description\":\"dl, length of field\",\n \"details\":[]\n },\n {\n \"value\":5.4,\n \"description\":\"avgdl, average length of field\",\n \"details\":[]\n }\n ]\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/explain.asciidoc",
- "line": 182
- },
- "digest": "5032518611d928d1f802e215cf79c550",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_explain/0?q=message:search",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_explain/0",
- "query": {
- "q": "message:search"
- },
- "body": null,
- "params": {
- "index": "twitter",
- "id": "0"
- },
- "api": "explain"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 32
- },
- "digest": "f6e300010478e5cbbeb2e589bc16fce7",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"profile\": true,<1>\n \"query\" : {\n \"match\" : { \"message\" : \"some number\" }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "profile": true,
- "query": {
- "match": {
- "message": "some number"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 50
- },
- "digest": "8ef02d4ca4e1c06fcd7d81ed52c8848d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"took\": 25,\n \"timed_out\": false,\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"skipped\" : 0,\n \"failed\": 0\n },\n \"hits\": {\n \"total\" : {\n \"value\": 4,\n \"relation\": \"eq\"\n },\n \"max_score\": 0.5093388,\n \"hits\": [...] <1>\n },\n \"profile\": {\n \"shards\": [\n {\n \"id\": \"[2aE02wS1R8q_QFnYu6vDVQ][twitter][0]\",\n \"searches\": [\n {\n \"query\": [\n {\n \"type\": \"BooleanQuery\",\n \"description\": \"message:some message:number\",\n \"time_in_nanos\": \"1873811\",\n \"breakdown\": {\n \"score\": 51306,\n \"score_count\": 4,\n \"build_scorer\": 2935582,\n \"build_scorer_count\": 1,\n \"match\": 0,\n \"match_count\": 0,\n \"create_weight\": 919297,\n \"create_weight_count\": 1,\n \"next_doc\": 53876,\n \"next_doc_count\": 5,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n },\n \"children\": [\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:some\",\n \"time_in_nanos\": \"391943\",\n \"breakdown\": {\n \"score\": 28776,\n \"score_count\": 4,\n \"build_scorer\": 784451,\n \"build_scorer_count\": 1,\n \"match\": 0,\n \"match_count\": 0,\n \"create_weight\": 1669564,\n \"create_weight_count\": 1,\n \"next_doc\": 10111,\n \"next_doc_count\": 5,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n }\n },\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:number\",\n \"time_in_nanos\": \"210682\",\n \"breakdown\": {\n \"score\": 4552,\n \"score_count\": 4,\n \"build_scorer\": 42602,\n \"build_scorer_count\": 1,\n \"match\": 0,\n \"match_count\": 0,\n \"create_weight\": 89323,\n \"create_weight_count\": 1,\n \"next_doc\": 2852,\n \"next_doc_count\": 5,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n }\n }\n ]\n }\n ],\n \"rewrite_time\": 51443,\n \"collector\": [\n {\n \"name\": \"SimpleTopScoreDocCollector\",\n \"reason\": \"search_top_hits\",\n \"time_in_nanos\": \"32273\"\n }\n ]\n }\n ],\n \"aggregations\": []\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 183
- },
- "digest": "0bc2dcf8d456b6f751f87ea2ac991bdb",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"profile\": {\n \"shards\": [\n {\n \"id\": \"[2aE02wS1R8q_QFnYu6vDVQ][twitter][0]\", <1>\n \"searches\": [\n {\n \"query\": [...], <2>\n \"rewrite_time\": 51443, <3>\n \"collector\": [...] <4>\n }\n ],\n \"aggregations\": [...] <5>\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 270
- },
- "digest": "b32f9ae3eabdac3c080746da78b17c07",
- "lang": "console-result",
- "found": [],
- "source": "\"query\": [\n {\n \"type\": \"BooleanQuery\",\n \"description\": \"message:some message:number\",\n \"time_in_nanos\": \"1873811\",\n \"breakdown\": {...}, <1>\n \"children\": [\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:some\",\n \"time_in_nanos\": \"391943\",\n \"breakdown\": {...}\n },\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:number\",\n \"time_in_nanos\": \"210682\",\n \"breakdown\": {...}\n }\n ]\n }\n]"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 324
- },
- "digest": "d6e15d48186be56cbf86a10b7e5b606e",
- "lang": "console-result",
- "found": [],
- "source": "\"breakdown\": {\n \"score\": 51306,\n \"score_count\": 4,\n \"build_scorer\": 2935582,\n \"build_scorer_count\": 1,\n \"match\": 0,\n \"match_count\": 0,\n \"create_weight\": 919297,\n \"create_weight_count\": 1,\n \"next_doc\": 53876,\n \"next_doc_count\": 5,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n}"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 438
- },
- "digest": "0d40216bed29737d0bf4bed3d211e14a",
- "lang": "console-result",
- "found": [],
- "source": "\"collector\": [\n {\n \"name\": \"SimpleTopScoreDocCollector\",\n \"reason\": \"search_top_hits\",\n \"time_in_nanos\": \"32273\"\n }\n]"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 533
- },
- "digest": "d8621790a416f05557c8df037a3722ac",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"profile\": true,\n \"query\": {\n \"term\": {\n \"user\": {\n \"value\": \"test\"\n }\n }\n },\n \"aggs\": {\n \"my_scoped_agg\": {\n \"terms\": {\n \"field\": \"likes\"\n }\n },\n \"my_global_agg\": {\n \"global\": {},\n \"aggs\": {\n \"my_level_agg\": {\n \"terms\": {\n \"field\": \"likes\"\n }\n }\n }\n }\n },\n \"post_filter\": {\n \"match\": {\n \"message\": \"some\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "profile": true,
- "query": {
- "term": {
- "user": {
- "value": "test"
- }
- }
- },
- "aggs": {
- "my_scoped_agg": {
- "terms": {
- "field": "likes"
- }
- },
- "my_global_agg": {
- "global": {},
- "aggs": {
- "my_level_agg": {
- "terms": {
- "field": "likes"
- }
- }
- }
- }
- },
- "post_filter": {
- "match": {
- "message": "some"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 582
- },
- "digest": "7eaffb4a19c19aa24533f76be06327b0",
- "lang": "console-result",
- "found": [],
- "source": "{\n ...\n \"profile\": {\n \"shards\": [\n {\n \"id\": \"[P6-vulHtQRWuD4YnubWb7A][test][0]\",\n \"searches\": [\n {\n \"query\": [\n {\n \"type\": \"TermQuery\",\n \"description\": \"message:some\",\n \"time_in_nanos\": \"409456\",\n \"breakdown\": {\n \"score\": 0,\n \"build_scorer_count\": 1,\n \"match_count\": 0,\n \"create_weight\": 31584,\n \"next_doc\": 0,\n \"match\": 0,\n \"create_weight_count\": 1,\n \"next_doc_count\": 2,\n \"score_count\": 1,\n \"build_scorer\": 377872,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n }\n },\n {\n \"type\": \"TermQuery\",\n \"description\": \"user:test\",\n \"time_in_nanos\": \"303702\",\n \"breakdown\": {\n \"score\": 0,\n \"build_scorer_count\": 1,\n \"match_count\": 0,\n \"create_weight\": 185215,\n \"next_doc\": 5936,\n \"match\": 0,\n \"create_weight_count\": 1,\n \"next_doc_count\": 2,\n \"score_count\": 1,\n \"build_scorer\": 112551,\n \"advance\": 0,\n \"advance_count\": 0,\n \"compute_max_score\": 0,\n \"compute_max_score_count\": 0,\n \"shallow_advance\": 0,\n \"shallow_advance_count\": 0,\n \"set_min_competitive_score\": 0,\n \"set_min_competitive_score_count\": 0\n }\n }\n ],\n \"rewrite_time\": 7208,\n \"collector\": [\n {\n \"name\": \"MultiCollector\",\n \"reason\": \"search_multi\",\n \"time_in_nanos\": 1820,\n \"children\": [\n {\n \"name\": \"FilteredCollector\",\n \"reason\": \"search_post_filter\",\n \"time_in_nanos\": 7735,\n \"children\": [\n {\n \"name\": \"SimpleTopScoreDocCollector\",\n \"reason\": \"search_top_hits\",\n \"time_in_nanos\": 1328\n }\n ]\n },\n {\n \"name\": \"MultiBucketCollector: [[my_scoped_agg, my_global_agg]]\",\n \"reason\": \"aggregation\",\n \"time_in_nanos\": 8273\n }\n ]\n }\n ]\n }\n ],\n \"aggregations\": [...] <1>\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 736
- },
- "digest": "d8621790a416f05557c8df037a3722ac",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_search\n{\n \"profile\": true,\n \"query\": {\n \"term\": {\n \"user\": {\n \"value\": \"test\"\n }\n }\n },\n \"aggs\": {\n \"my_scoped_agg\": {\n \"terms\": {\n \"field\": \"likes\"\n }\n },\n \"my_global_agg\": {\n \"global\": {},\n \"aggs\": {\n \"my_level_agg\": {\n \"terms\": {\n \"field\": \"likes\"\n }\n }\n }\n }\n },\n \"post_filter\": {\n \"match\": {\n \"message\": \"some\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_search",
- "query": null,
- "body": {
- "profile": true,
- "query": {
- "term": {
- "user": {
- "value": "test"
- }
- }
- },
- "aggs": {
- "my_scoped_agg": {
- "terms": {
- "field": "likes"
- }
- },
- "my_global_agg": {
- "global": {},
- "aggs": {
- "my_level_agg": {
- "terms": {
- "field": "likes"
- }
- }
- }
- }
- },
- "post_filter": {
- "match": {
- "message": "some"
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "search"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/profile.asciidoc",
- "line": 778
- },
- "digest": "0e9aa44b4e3ce7094b76c9e28df4bb81",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"profile\" : {\n \"shards\" : [\n {\n \"aggregations\" : [\n {\n \"type\" : \"NumericTermsAggregator\",\n \"description\" : \"my_scoped_agg\",\n \"time_in_nanos\" : 195386,\n \"breakdown\" : {\n \"reduce\" : 0,\n \"build_aggregation\" : 81171,\n \"build_aggregation_count\" : 1,\n \"initialize\" : 22753,\n \"initialize_count\" : 1,\n \"reduce_count\" : 0,\n \"collect\" : 91456,\n \"collect_count\" : 4\n },\n \"debug\": {\n \"result_strategy\": \"long_terms\",\n \"total_buckets\": 4\n }\n },\n {\n \"type\" : \"GlobalAggregator\",\n \"description\" : \"my_global_agg\",\n \"time_in_nanos\" : 190430,\n \"breakdown\" : {\n \"reduce\" : 0,\n \"build_aggregation\" : 59990,\n \"build_aggregation_count\" : 1,\n \"initialize\" : 29619,\n \"initialize_count\" : 1,\n \"reduce_count\" : 0,\n \"collect\" : 100815,\n \"collect_count\" : 4\n },\n \"children\" : [\n {\n \"type\" : \"NumericTermsAggregator\",\n \"description\" : \"my_level_agg\",\n \"time_in_nanos\" : 160329,\n \"breakdown\" : {\n \"reduce\" : 0,\n \"build_aggregation\" : 55712,\n \"build_aggregation_count\" : 1,\n \"initialize\" : 10559,\n \"initialize_count\" : 1,\n \"reduce_count\" : 0,\n \"collect\" : 94052,\n \"collect_count\" : 4,\n },\n \"debug\": {\n \"result_strategy\": \"long_terms\",\n \"total_buckets\": 4\n }\n }\n ]\n }\n ]\n }\n ]\n }\n}"
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 9
- },
- "digest": "38f7739f750f1411bccf511a0abaaea3",
- "lang": "console",
- "found": [],
- "source": "GET /_field_caps?fields=rating",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_field_caps",
- "query": {
- "fields": "rating"
- },
- "body": null,
- "params": null,
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 118
- },
- "digest": "614bd49400b6ebf47c5b12839dd1ecb8",
- "lang": "console",
- "found": [],
- "source": "GET twitter/_field_caps?fields=rating",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_field_caps",
- "query": {
- "fields": "rating"
- },
- "body": null,
- "params": {
- "index": "twitter"
- },
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 128
- },
- "digest": "a985e6b7b2ead9c3f30a9bc97d8b598e",
- "lang": "console",
- "found": [],
- "source": "GET _field_caps?fields=rating,title",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_field_caps",
- "query": {
- "fields": "rating,title"
- },
- "body": null,
- "params": null,
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 135
- },
- "digest": "54f2c3b8888f8924a7ecb1f55e2d480a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": [\"index1\", \"index2\", \"index3\", \"index4\", \"index5\"],\n \"fields\": {\n \"rating\": { <1>\n \"long\": {\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [\"index1\", \"index2\"],\n \"non_aggregatable_indices\": [\"index1\"] <2>\n },\n \"keyword\": {\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [\"index3\", \"index4\"],\n \"non_searchable_indices\": [\"index4\"] <3>\n }\n },\n \"title\": { <4>\n \"text\": {\n \"searchable\": true,\n \"aggregatable\": false\n\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 176
- },
- "digest": "4e931cfac74e46e221cf4a9ab88a182d",
- "lang": "console",
- "found": [],
- "source": "GET _field_caps?fields=rating,title&include_unmapped",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_field_caps",
- "query": {
- "fields": "rating,title",
- "include_unmapped": true
- },
- "body": null,
- "params": null,
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 184
- },
- "digest": "21a1680f14093b44b20a674c3f4991a8",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"indices\": [\"index1\", \"index2\", \"index3\"],\n \"fields\": {\n \"rating\": {\n \"long\": {\n \"searchable\": true,\n \"aggregatable\": false,\n \"indices\": [\"index1\", \"index2\"],\n \"non_aggregatable_indices\": [\"index1\"]\n },\n \"keyword\": {\n \"searchable\": false,\n \"aggregatable\": true,\n \"indices\": [\"index3\", \"index4\"],\n \"non_searchable_indices\": [\"index4\"]\n },\n \"unmapped\": { <1>\n \"indices\": [\"index5\"],\n \"searchable\": false,\n \"aggregatable\": false\n }\n },\n \"title\": {\n \"text\": {\n \"indices\": [\"index1\", \"index2\", \"index3\", \"index4\"],\n \"searchable\": true,\n \"aggregatable\": false\n },\n \"unmapped\": { <2>\n \"indices\": [\"index5\"]\n \"searchable\": false,\n \"aggregatable\": false\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "search/field-caps.asciidoc",
- "line": 230
- },
- "digest": "4b50e414fddc2acd2e1d75c81f483b3c",
- "lang": "console",
- "found": [],
- "source": "POST twitter*/_field_caps?fields=rating\n{\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/twitter*/_field_caps",
- "query": {
- "fields": "rating"
- },
- "body": {
- "index_filter": {
- "range": {
- "@timestamp": {
- "gte": "2018"
- }
- }
- }
- },
- "params": {
- "index": "twitter*"
- },
- "api": "field_caps"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/rank-eval.asciidoc",
- "line": 232
- },
- "digest": "2a989679e4b71569e17e02db8865b685",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {}}},\n \"ratings\": []\n }],\n \"metric\": {\n \"precision\": {\n \"k\" : 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_rank_eval",
- "query": null,
- "body": {
- "requests": [
- {
- "id": "JFK query",
- "request": {
- "query": {
- "match_all": {}
- }
- },
- "ratings": []
- }
- ],
- "metric": {
- "precision": {
- "k": 20,
- "relevant_rating_threshold": 1,
- "ignore_unlabeled": false
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "rank_eval"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/rank-eval.asciidoc",
- "line": 287
- },
- "digest": "b0b86fd5ac0d4814fc70cb0642cee258",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {}}},\n \"ratings\": []\n }],\n \"metric\": {\n \"recall\": {\n \"k\" : 20,\n \"relevant_rating_threshold\": 1\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_rank_eval",
- "query": null,
- "body": {
- "requests": [
- {
- "id": "JFK query",
- "request": {
- "query": {
- "match_all": {}
- }
- },
- "ratings": []
- }
- ],
- "metric": {
- "recall": {
- "k": 20,
- "relevant_rating_threshold": 1
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "rank_eval"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/rank-eval.asciidoc",
- "line": 328
- },
- "digest": "351775a1f73e47025463bd937948f7b4",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {}}},\n \"ratings\": []\n }],\n \"metric\": {\n \"mean_reciprocal_rank\": {\n \"k\" : 20,\n \"relevant_rating_threshold\" : 1\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_rank_eval",
- "query": null,
- "body": {
- "requests": [
- {
- "id": "JFK query",
- "request": {
- "query": {
- "match_all": {}
- }
- },
- "ratings": []
- }
- ],
- "metric": {
- "mean_reciprocal_rank": {
- "k": 20,
- "relevant_rating_threshold": 1
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "rank_eval"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/rank-eval.asciidoc",
- "line": 372
- },
- "digest": "c4f013ff1a8b80c87c0265a91ed12648",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {}}},\n \"ratings\": []\n }],\n \"metric\": {\n \"dcg\": {\n \"k\" : 20,\n \"normalize\": false\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_rank_eval",
- "query": null,
- "body": {
- "requests": [
- {
- "id": "JFK query",
- "request": {
- "query": {
- "match_all": {}
- }
- },
- "ratings": []
- }
- ],
- "metric": {
- "dcg": {
- "k": 20,
- "normalize": false
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "rank_eval"
- }
- ]
- },
- {
- "source_location": {
- "file": "search/rank-eval.asciidoc",
- "line": 428
- },
- "digest": "12c4a9be9ffc26cdc0e9343d53c1fd5d",
- "lang": "console",
- "found": [],
- "source": "GET /twitter/_rank_eval\n{\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": { \"query\": { \"match_all\": {}}},\n \"ratings\": []\n }],\n \"metric\": {\n \"expected_reciprocal_rank\": {\n \"maximum_relevance\" : 3,\n \"k\" : 20\n }\n }\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/twitter/_rank_eval",
- "query": null,
- "body": {
- "requests": [
- {
- "id": "JFK query",
- "request": {
- "query": {
- "match_all": {}
- }
- },
- "ratings": []
- }
- ],
- "metric": {
- "expected_reciprocal_rank": {
- "maximum_relevance": 3,
- "k": 20
- }
- }
- },
- "params": {
- "index": "twitter"
- },
- "api": "rank_eval"
- }
- ]
- },
- {
- "source_location": {
- "file": "searchable-snapshots/apis/mount-snapshot.asciidoc",
- "line": 110
- },
- "digest": "098820242e25a05d6a4d962ad4132d1b",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true\n{\n \"index\": \"my_docs\", <1>\n \"renamed_index\": \"docs\", <2>\n \"index_settings\": { <3>\n \"index.number_of_replicas\": 0\n },\n \"ignored_index_settings\": [ \"index.refresh_interval\" ] <4>\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_repository/my_snapshot/_mount",
- "query": {
- "wait_for_completion": "true"
- },
- "body": {
- "index": "my_docs",
- "renamed_index": "docs",
- "index_settings": {
- "index.number_of_replicas": 0
- },
- "ignored_index_settings": [
- "index.refresh_interval"
- ]
- },
- "params": {
- "repository": "my_repository",
- "snapshot": "my_snapshot"
- },
- "api": "searchable_snapshots.mount"
- }
- ]
- },
- {
- "source_location": {
- "file": "searchable-snapshots/apis/clear-cache.asciidoc",
- "line": 73
- },
- "digest": "69487bde55a1fc688a8cc5acf40b1555",
- "lang": "console",
- "found": [],
- "source": "POST /docs/_searchable_snapshots/cache/clear",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/docs/_searchable_snapshots/cache/clear",
- "query": null,
- "body": null,
- "params": {
- "index": "docs"
- },
- "api": "searchable_snapshots.clear_cache"
- }
- ]
- },
- {
- "source_location": {
- "file": "searchable-snapshots/apis/get-stats.asciidoc",
- "line": 73
- },
- "digest": "806b19ef04f9b5acc99a59da73aff282",
- "lang": "console",
- "found": [],
- "source": "GET /docs/_searchable_snapshots/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/docs/_searchable_snapshots/stats",
- "query": null,
- "body": null,
- "params": {
- "index": "docs"
- },
- "api": "searchable_snapshots.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "searchable-snapshots/apis/repository-stats.asciidoc",
- "line": 70
- },
- "digest": "ad607e070bd3191558e3e2cf2b5bc2ea",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_repository/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_repository/_stats",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository"
- },
- "api": "searchable_snapshots.repository_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/authenticate.asciidoc",
- "line": 35
- },
- "digest": "55f4a15b84b724b9fbf2efd29a4da120",
- "lang": "console",
- "found": [],
- "source": "GET /_security/_authenticate",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/_authenticate",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.authenticate"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/authenticate.asciidoc",
- "line": 42
- },
- "digest": "693ee6047801b0a7dce3f2560baa1a13",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"username\": \"rdeniro\",\n \"roles\": [\n \"admin\"\n ],\n \"full_name\": null,\n \"email\": null,\n \"metadata\": { },\n \"enabled\": true,\n \"authentication_realm\": {\n \"name\" : \"file\",\n \"type\" : \"file\"\n },\n \"lookup_realm\": {\n \"name\" : \"file\",\n \"type\" : \"file\"\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/change-password.asciidoc",
- "line": 55
- },
- "digest": "a2d14f8f1ea3efe970887f7892fdb268",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/jacknich/_password\n{\n \"password\" : \"s3cr3t\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/jacknich/_password",
- "query": null,
- "body": {
- "password": "s3cr3t"
- },
- "params": {
- "username": "jacknich"
- },
- "api": "security.change_password"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/change-password.asciidoc",
- "line": 66
- },
- "digest": "782a8820be17669905206e46d2c25178",
- "lang": "console-result",
- "found": [],
- "source": "{}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/clear-cache.asciidoc",
- "line": 50
- },
- "digest": "a5e2b3588258430f2e595abda98e3943",
- "lang": "console",
- "found": [],
- "source": "POST /_security/realm/default_file/_clear_cache",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/realm/default_file/_clear_cache",
- "query": null,
- "body": null,
- "params": {
- "realms": "default_file"
- },
- "api": "security.clear_cached_realms"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/clear-cache.asciidoc",
- "line": 57
- },
- "digest": "c1409f591a01589638d9b00436ce42c0",
- "lang": "console",
- "found": [],
- "source": "POST /_security/realm/default_file/_clear_cache?usernames=rdeniro,alpacino",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/realm/default_file/_clear_cache",
- "query": {
- "usernames": "rdeniro,alpacino"
- },
- "body": null,
- "params": {
- "realms": "default_file"
- },
- "api": "security.clear_cached_realms"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/clear-cache.asciidoc",
- "line": 65
- },
- "digest": "00272f75a6afea91f8554ef7cda0c1f2",
- "lang": "console",
- "found": [],
- "source": "POST /_security/realm/default_file,ldap1/_clear_cache",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/realm/default_file,ldap1/_clear_cache",
- "query": null,
- "body": null,
- "params": {
- "realms": "default_file,ldap1"
- },
- "api": "security.clear_cached_realms"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/clear-roles-cache.asciidoc",
- "line": 40
- },
- "digest": "ee577c4c7cc723e99569ea2d1137adba",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/my_admin_role/_clear_cache",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/my_admin_role/_clear_cache",
- "query": null,
- "body": null,
- "params": {
- "name": "my_admin_role"
- },
- "api": "security.clear_cached_roles"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/clear-privileges-cache.asciidoc",
- "line": 41
- },
- "digest": "f6df4acf3c7a4f85706ff314b21ebcb2",
- "lang": "console",
- "found": [],
- "source": "POST /_security/privilege/myapp/_clear_cache",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/privilege/myapp/_clear_cache",
- "query": null,
- "body": null,
- "params": {
- "application": "myapp"
- },
- "api": "security.clear_cached_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-api-keys.asciidoc",
- "line": 71
- },
- "digest": "0c8f24166d0ce7b8792781b268b544a9",
- "lang": "console",
- "found": [],
- "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\", <1>\n \"role_descriptors\": { <2>\n \"role-a\": {\n \"cluster\": [\"all\"],\n \"index\": [\n {\n \"names\": [\"index-a*\"],\n \"privileges\": [\"read\"]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\"all\"],\n \"index\": [\n {\n \"names\": [\"index-b*\"],\n \"privileges\": [\"all\"]\n }\n ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key",
- "expiration": "1d",
- "role_descriptors": {
- "role-a": {
- "cluster": [
- "all"
- ],
- "index": [
- {
- "names": [
- "index-a*"
- ],
- "privileges": [
- "read"
- ]
- }
- ]
- },
- "role-b": {
- "cluster": [
- "all"
- ],
- "index": [
- {
- "names": [
- "index-b*"
- ],
- "privileges": [
- "all"
- ]
- }
- ]
- }
- }
- },
- "params": null,
- "api": "security.create_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-api-keys.asciidoc",
- "line": 107
- },
- "digest": "761e883344dbbbd26bdb50d1b7de257c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\":\"VuaCfGcBCdbkQm-e5aOx\", <1>\n \"name\":\"my-api-key\",\n \"expiration\":1544068612110, <2>\n \"api_key\":\"ui2lp2axTNmsyakw9tvNnw\" <3>\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/put-app-privileges.asciidoc",
- "line": 88
- },
- "digest": "4ee31fd4ea6d18f32ec28b7fa433441d",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/privilege\n{\n \"myapp\": {\n \"read\": {\n \"actions\": [ <1>\n \"data:read/*\" , <2>\n \"action:login\" ],\n \"metadata\": { <3>\n \"description\": \"Read access to myapp\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/privilege",
- "query": null,
- "body": {
- "myapp": {
- "read": {
- "actions": [
- "data:read/*",
- "action:login"
- ],
- "metadata": {
- "description": "Read access to myapp"
- }
- }
- }
- },
- "params": null,
- "api": "security.put_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/put-app-privileges.asciidoc",
- "line": 114
- },
- "digest": "81a9dd74f26c4b89341cac7ebeb4c0e6",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"myapp\": {\n \"read\": {\n \"created\": true <1>\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/put-app-privileges.asciidoc",
- "line": 130
- },
- "digest": "ee90d1fb22b59d30da339d825303b912",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/privilege\n{\n \"app01\": {\n \"read\": {\n \"actions\": [ \"action:login\", \"data:read/*\" ]\n },\n \"write\": {\n \"actions\": [ \"action:login\", \"data:write/*\" ]\n }\n },\n \"app02\": {\n \"all\": {\n \"actions\": [ \"*\" ]\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/privilege",
- "query": null,
- "body": {
- "app01": {
- "read": {
- "actions": [
- "action:login",
- "data:read/*"
- ]
- },
- "write": {
- "actions": [
- "action:login",
- "data:write/*"
- ]
- }
- },
- "app02": {
- "all": {
- "actions": [
- "*"
- ]
- }
- }
- },
- "params": null,
- "api": "security.put_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/put-app-privileges.asciidoc",
- "line": 153
- },
- "digest": "7269308683a9eb4ef6420e918391b791",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"app02\": {\n \"all\": {\n \"created\": true\n }\n },\n \"app01\": {\n \"read\": {\n \"created\": true\n },\n \"write\": {\n \"created\": true\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 113
- },
- "digest": "23b062c157235246d7c347b9047b2435",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping1\n{\n \"roles\": [ \"user\"],\n \"enabled\": true, <1>\n \"rules\": {\n \"field\" : { \"username\" : \"*\" }\n },\n \"metadata\" : { <2>\n \"version\" : 1\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping1",
- "query": null,
- "body": {
- "roles": [
- "user"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "username": "*"
- }
- },
- "metadata": {
- "version": 1
- }
- },
- "params": {
- "name": "mapping1"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 134
- },
- "digest": "cf8cff0fb254f0e1009a01651b1526e9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"role_mapping\" : {\n \"created\" : true <1>\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 147
- },
- "digest": "b176e0d428726705298184ef39ad5cb2",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping2\n{\n \"roles\": [ \"user\", \"admin\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"username\" : [ \"esadmin01\", \"esadmin02\" ] }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping2",
- "query": null,
- "body": {
- "roles": [
- "user",
- "admin"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "username": [
- "esadmin01",
- "esadmin02"
- ]
- }
- }
- },
- "params": {
- "name": "mapping2"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 160
- },
- "digest": "e60b7f75ca806f2c74927c3d9409a986",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping3\n{\n \"roles\": [ \"ldap-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"realm.name\" : \"ldap1\" }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping3",
- "query": null,
- "body": {
- "roles": [
- "ldap-user"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "realm.name": "ldap1"
- }
- }
- },
- "params": {
- "name": "mapping3"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 175
- },
- "digest": "7a23a385a63c87cab58fd494870450fd",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping4\n{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"any\": [\n {\n \"field\": {\n \"username\": \"esadmin\"\n }\n },\n {\n \"field\": {\n \"groups\": \"cn=admins,dc=example,dc=com\"\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping4",
- "query": null,
- "body": {
- "roles": [
- "superuser"
- ],
- "enabled": true,
- "rules": {
- "any": [
- {
- "field": {
- "username": "esadmin"
- }
- },
- {
- "field": {
- "groups": "cn=admins,dc=example,dc=com"
- }
- }
- ]
- }
- },
- "params": {
- "name": "mapping4"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 217
- },
- "digest": "5ad365ed9e1a3c26093a0f09666c133a",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping5\n{\n \"role_templates\": [\n {\n \"template\": { \"source\": \"{{#tojson}}groups{{/tojson}}\" }, <1>\n \"format\" : \"json\" <2>\n }\n ],\n \"rules\": {\n \"field\" : { \"realm.name\" : \"saml1\" }\n },\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping5",
- "query": null,
- "body": {
- "role_templates": [
- {
- "template": {
- "source": "{{#tojson}}groups{{/tojson}}"
- },
- "format": "json"
- }
- ],
- "rules": {
- "field": {
- "realm.name": "saml1"
- }
- },
- "enabled": true
- },
- "params": {
- "name": "mapping5"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 240
- },
- "digest": "7e5faa551f2c95ffd627da352563d450",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping6\n{\n \"roles\": [ \"example-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"field\" : { \"dn\" : \"*,ou=subtree,dc=example,dc=com\" }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping6",
- "query": null,
- "body": {
- "roles": [
- "example-user"
- ],
- "enabled": true,
- "rules": {
- "field": {
- "dn": "*,ou=subtree,dc=example,dc=com"
- }
- }
- },
- "params": {
- "name": "mapping6"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 255
- },
- "digest": "b80e1f5b26bae4f3c2f8a604b7caaf17",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping7\n{\n \"roles\": [ \"ldap-example-user\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n { \"field\" : { \"dn\" : \"*,ou=subtree,dc=example,dc=com\" } },\n { \"field\" : { \"realm.name\" : \"ldap1\" } }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping7",
- "query": null,
- "body": {
- "roles": [
- "ldap-example-user"
- ],
- "enabled": true,
- "rules": {
- "all": [
- {
- "field": {
- "dn": "*,ou=subtree,dc=example,dc=com"
- }
- },
- {
- "field": {
- "realm.name": "ldap1"
- }
- }
- ]
- }
- },
- "params": {
- "name": "mapping7"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 279
- },
- "digest": "0d94d76b7f00d0459d1f8c962c144dcd",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping8\n{\n \"roles\": [ \"superuser\" ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n {\n \"any\": [\n {\n \"field\": {\n \"dn\": \"*,ou=admin,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"username\": [ \"es-admin\", \"es-system\" ]\n }\n }\n ]\n },\n {\n \"field\": {\n \"groups\": \"cn=people,dc=example,dc=com\"\n }\n },\n {\n \"except\": {\n \"field\": {\n \"metadata.terminated_date\": null\n }\n }\n }\n ]\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping8",
- "query": null,
- "body": {
- "roles": [
- "superuser"
- ],
- "enabled": true,
- "rules": {
- "all": [
- {
- "any": [
- {
- "field": {
- "dn": "*,ou=admin,dc=example,dc=com"
- }
- },
- {
- "field": {
- "username": [
- "es-admin",
- "es-system"
- ]
- }
- }
- ]
- },
- {
- "field": {
- "groups": "cn=people,dc=example,dc=com"
- }
- },
- {
- "except": {
- "field": {
- "metadata.terminated_date": null
- }
- }
- }
- ]
- }
- },
- "params": {
- "name": "mapping8"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-role-mappings.asciidoc",
- "line": 329
- },
- "digest": "50dc35d3d8705bd62aed20a15209476c",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role_mapping/mapping9\n{\n \"rules\": { \"field\": { \"realm.name\": \"cloud-saml\" } },\n \"role_templates\": [\n { \"template\": { \"source\" : \"saml_user\" } }, <1>\n { \"template\": { \"source\" : \"_user_{{username}}\" } }\n ],\n \"enabled\": true\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role_mapping/mapping9",
- "query": null,
- "body": {
- "rules": {
- "field": {
- "realm.name": "cloud-saml"
- }
- },
- "role_templates": [
- {
- "template": {
- "source": "saml_user"
- }
- },
- {
- "template": {
- "source": "_user_{{username}}"
- }
- }
- ],
- "enabled": true
- },
- "params": {
- "name": "mapping9"
- },
- "api": "security.put_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-roles.asciidoc",
- "line": 85
- },
- "digest": "850a6d4aaf112ec1279260a2b7400a89",
- "lang": "console",
- "found": [],
- "source": "POST /_security/role/my_admin_role\n{\n \"cluster\": [\"all\"],\n \"indices\": [\n {\n \"names\": [ \"index1\", \"index2\" ],\n \"privileges\": [\"all\"],\n \"field_security\" : { // optional\n \"grant\" : [ \"title\", \"body\" ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\" // optional\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [ \"admin\", \"read\" ],\n \"resources\": [ \"*\" ]\n }\n ],\n \"run_as\": [ \"other_user\" ], // optional\n \"metadata\" : { // optional\n \"version\" : 1\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/role/my_admin_role",
- "query": null,
- "body": {
- "cluster": [
- "all"
- ],
- "indices": [
- {
- "names": [
- "index1",
- "index2"
- ],
- "privileges": [
- "all"
- ],
- "field_security": {
- "grant": [
- "title",
- "body"
- ]
- },
- "query": "{\"match\": {\"title\": \"foo\"}}"
- }
- ],
- "applications": [
- {
- "application": "myapp",
- "privileges": [
- "admin",
- "read"
- ],
- "resources": [
- "*"
- ]
- }
- ],
- "run_as": [
- "other_user"
- ],
- "metadata": {
- "version": 1
- }
- },
- "params": {
- "name": "my_admin_role"
- },
- "api": "security.put_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-roles.asciidoc",
- "line": 117
- },
- "digest": "99fbe9dc648835eb750e963f3b5ea9ab",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"role\": {\n \"created\": true <1>\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-users.asciidoc",
- "line": 108
- },
- "digest": "4c514b787945952a223cde8a4a09e826",
- "lang": "console",
- "found": [],
- "source": "POST /_security/user/jacknich\n{\n \"password\" : \"j@rV1s\",\n \"roles\" : [ \"admin\", \"other_role1\" ],\n \"full_name\" : \"Jack Nicholson\",\n \"email\" : \"jacknich@example.com\",\n \"metadata\" : {\n \"intelligence\" : 7\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/user/jacknich",
- "query": null,
- "body": {
- "password": "j@rV1s",
- "roles": [
- "admin",
- "other_role1"
- ],
- "full_name": "Jack Nicholson",
- "email": "jacknich@example.com",
- "metadata": {
- "intelligence": 7
- }
- },
- "params": {
- "username": "jacknich"
- },
- "api": "security.put_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/create-users.asciidoc",
- "line": 125
- },
- "digest": "2f6cf7203c981928aa739a504f3589b1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"created\": true <1>\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delegate-pki-authentication.asciidoc",
- "line": 77
- },
- "digest": "964f522091306634794ff544c867f002",
- "lang": "console",
- "found": [],
- "source": "POST /_security/delegate_pki\n{\n \"x509_certificate_chain\": [\"MIIDbTCCAlWgAwIBAgIJAIxTS7Qdho9jMA0GCSqGSIb3DQEBCwUAMFMxKzApBgNVBAMTIkVsYXN0aWNzZWFyY2ggVGVzdCBJbnRlcm1lZGlhdGUgQ0ExFjAUBgNVBAsTDUVsYXN0aWNzZWFyY2gxDDAKBgNVBAoTA29yZzAeFw0xOTA3MTkxMzMzNDFaFw0yMzA3MTgxMzMzNDFaMEoxIjAgBgNVBAMTGUVsYXN0aWNzZWFyY2ggVGVzdCBDbGllbnQxFjAUBgNVBAsTDUVsYXN0aWNzZWFyY2gxDDAKBgNVBAoTA29yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANHgMX2aX8t0nj4sGLNuKISmmXIYCj9RwRqS7L03l9Nng7kOKnhHu/nXDt7zMRJyHj+q6FAt5khlavYSVCQyrDybRuA5z31gOdqXerrjs2OXS5HSHNvoDAnHFsaYX/5geMewVTtc/vqpd7Ph/QtaKfmG2FK0JNQo0k24tcgCIcyMtBh6BA70yGBM0OT8GdOgd/d/mA7mRhaxIUMNYQzRYRsp4hMnnWoOTkR5Q8KSO3MKw9dPSpPe8EnwtJE10S3s5aXmgytru/xQqrFycPBNj4KbKVmqMP0G60CzXik5pr2LNvOFz3Qb6sYJtqeZF+JKgGWdaTC89m63+TEnUHqk0lcCAwEAAaNNMEswCQYDVR0TBAIwADAdBgNVHQ4EFgQU/+aAD6Q4mFq1vpHorC25/OY5zjcwHwYDVR0jBBgwFoAU8siFCiMiYZZm/95qFC75AG/LRE0wDQYJKoZIhvcNAQELBQADggEBAIRpCgDLpvXcgDHUk10uhxev21mlIbU+VP46ANnCuj0UELhTrdTuWvO1PAI4z+WbDUxryQfOOXO9R6D0dE5yR56L/J7d+KayW34zU7yRDZM7+rXpocdQ1Ex8mjP9HJ/Bf56YZTBQJpXeDrKow4FvtkI3bcIMkqmbG16LHQXeG3RS4ds4S4wCnE2nA6vIn9y+4R999q6y1VSBORrYULcDWxS54plHLEdiMr1vVallg82AGobS9GMcTL2U4Nx5IYZG7sbTk3LrDxVpVg/S2wLofEdOEwqCeHug/iOihNLJBabEW6z4TDLJAVW5KCY1DfhkYlBfHn7vxKkfKoCUK/yLWWI=\"] <1>\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delegate-pki-authentication.asciidoc",
- "line": 88
- },
- "digest": "da2bb6894d95489812b653be2feeeb5b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-app-privileges.asciidoc",
- "line": 41
- },
- "digest": "ebd76a45e153c4656c5871e23b7b5508",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/privilege/myapp/read",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/privilege/myapp/read",
- "query": null,
- "body": null,
- "params": {
- "application": "myapp",
- "name": "read"
- },
- "api": "security.delete_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-app-privileges.asciidoc",
- "line": 50
- },
- "digest": "b8ac8a2f22ee5934b077a82245fa3398",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"myapp\": {\n \"read\": {\n \"found\" : true\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-role-mappings.asciidoc",
- "line": 46
- },
- "digest": "261480571394632db40e88fbb6c59c2f",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/role_mapping/mapping1",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/role_mapping/mapping1",
- "query": null,
- "body": null,
- "params": {
- "name": "mapping1"
- },
- "api": "security.delete_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-role-mappings.asciidoc",
- "line": 55
- },
- "digest": "5b5daa97b53b478943b50082703a323a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\" : true\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-roles.asciidoc",
- "line": 40
- },
- "digest": "cffce059425d3d21e7f9571500d63524",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/role/my_admin_role",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/role/my_admin_role",
- "query": null,
- "body": null,
- "params": {
- "name": "my_admin_role"
- },
- "api": "security.delete_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-roles.asciidoc",
- "line": 49
- },
- "digest": "5b5daa97b53b478943b50082703a323a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\" : true\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-users.asciidoc",
- "line": 39
- },
- "digest": "ffd63dd186ab81b893faec3b3358fa09",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/user/jacknich",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/user/jacknich",
- "query": null,
- "body": null,
- "params": {
- "username": "jacknich"
- },
- "api": "security.delete_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/delete-users.asciidoc",
- "line": 48
- },
- "digest": "5b5daa97b53b478943b50082703a323a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\" : true\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/disable-users.asciidoc",
- "line": 45
- },
- "digest": "bb293e1bdf0c6f6d9069eeb7edc9d399",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/user/jacknich/_disable",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/user/jacknich/_disable",
- "query": null,
- "body": null,
- "params": {
- "username": "jacknich"
- },
- "api": "security.disable_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/enable-users.asciidoc",
- "line": 44
- },
- "digest": "adf36e2d8fc05c3719c91912481c4e19",
- "lang": "console",
- "found": [],
- "source": "PUT /_security/user/jacknich/_enable",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_security/user/jacknich/_enable",
- "query": null,
- "body": null,
- "params": {
- "username": "jacknich"
- },
- "api": "security.enable_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 65
- },
- "digest": "8d3be5482270921111754772479f8676",
- "lang": "console",
- "found": [],
- "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key\",\n \"role_descriptors\": {}\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key",
- "role_descriptors": {}
- },
- "params": null,
- "api": "security.create_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 77
- },
- "digest": "30c7faeb8f339772d309800170df9f92",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\":\"VuaCfGcBCdbkQm-e5aOx\",\n \"name\":\"my-api-key\",\n \"api_key\":\"ui2lp2axTNmsyakw9tvNnw\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 90
- },
- "digest": "701f1fffc65e9e51c96aa60261e2eae3",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?id=VuaCfGcBCdbkQm-e5aOx",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "id": "VuaCfGcBCdbkQm-e5aOx"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 99
- },
- "digest": "7b864d61767ab283cfd5f9b9ba784b1f",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?name=my-api-key",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "name": "my-api-key"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 107
- },
- "digest": "d1e0fee64389e7c8d4c092030626b61f",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?name=my-*",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "name": "my-*"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 115
- },
- "digest": "10d9da8a3b7061479be908c8c5c76cfb",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?realm_name=native1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "realm_name": "native1"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 123
- },
- "digest": "62eafc5b3ab75cc67314d5a8567d6077",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?username=myuser",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "username": "myuser"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 131
- },
- "digest": "9608820dbeac261ba53fb89bb9400560",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?owner=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "owner": "true"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 138
- },
- "digest": "ca5ae0eb7709f3807bc6239cd4bd9141",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 146
- },
- "digest": "fffaa7ecef94e1404ebec2f9069448e3",
- "lang": "console",
- "found": [],
- "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key-1\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key-1"
- },
- "params": null,
- "api": "security.create_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 157
- },
- "digest": "dffbbdc4025e5777c647d8818847b960",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?id=VuaCfGcBCdbkQm-e5aOx&owner=true",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "id": "VuaCfGcBCdbkQm-e5aOx",
- "owner": "true"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-api-keys.asciidoc",
- "line": 167
- },
- "digest": "30abc76a39e551f4b52c65002bb6405d",
- "lang": "console",
- "found": [],
- "source": "GET /_security/api_key?username=myuser&realm_name=native1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/api_key",
- "query": {
- "username": "myuser",
- "realm_name": "native1"
- },
- "body": null,
- "params": null,
- "api": "security.get_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-app-privileges.asciidoc",
- "line": 58
- },
- "digest": "cd8006165ac64f1ef99af48e5a35a25b",
- "lang": "console",
- "found": [],
- "source": "GET /_security/privilege/myapp/read",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/privilege/myapp/read",
- "query": null,
- "body": null,
- "params": {
- "application": "myapp",
- "name": "read"
- },
- "api": "security.get_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-app-privileges.asciidoc",
- "line": 67
- },
- "digest": "86e449e6a7c3d64f0965b316b9780fad",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"myapp\": {\n \"read\": {\n \"application\": \"myapp\",\n \"name\": \"read\",\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-app-privileges.asciidoc",
- "line": 88
- },
- "digest": "3b18e9de638ff0b1c7a1f1f6bf1c24f3",
- "lang": "console",
- "found": [],
- "source": "GET /_security/privilege/myapp/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/privilege/myapp/",
- "query": null,
- "body": null,
- "params": {
- "application": "myapp"
- },
- "api": "security.get_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-app-privileges.asciidoc",
- "line": 95
- },
- "digest": "0ddf705317d9c5095b4a1419a2e3bace",
- "lang": "console",
- "found": [],
- "source": "GET /_security/privilege/",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/privilege/",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-builtin-privileges.asciidoc",
- "line": 54
- },
- "digest": "2623eb122cc0299b42fc9eca6e7f5e56",
- "lang": "console",
- "found": [],
- "source": "GET /_security/privilege/_builtin",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/privilege/_builtin",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_builtin_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-builtin-privileges.asciidoc",
- "line": 61
- },
- "digest": "55a92d8ae8d4904196bcb5a1f064707f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"cluster\" : [\n \"all\",\n \"create_snapshot\",\n \"delegate_pki\",\n \"grant_api_key\",\n \"manage\",\n \"manage_api_key\",\n \"manage_autoscaling\",\n \"manage_ccr\",\n \"manage_data_frame_transforms\",\n \"manage_enrich\",\n \"manage_ilm\",\n \"manage_index_templates\",\n \"manage_ingest_pipelines\",\n \"manage_ml\",\n \"manage_oidc\",\n \"manage_own_api_key\",\n \"manage_pipeline\",\n \"manage_rollup\",\n \"manage_saml\",\n \"manage_security\",\n \"manage_slm\",\n \"manage_token\",\n \"manage_transform\",\n \"manage_watcher\",\n \"monitor\",\n \"monitor_data_frame_transforms\",\n \"monitor_ml\",\n \"monitor_rollup\",\n \"monitor_snapshot\",\n \"monitor_transform\",\n \"monitor_watcher\",\n \"none\",\n \"read_ccr\",\n \"read_ilm\",\n \"read_slm\",\n \"transport_client\"\n ],\n \"index\" : [\n \"all\",\n \"auto_configure\",\n \"create\",\n \"create_doc\",\n \"create_index\",\n \"delete\",\n \"delete_index\",\n \"index\",\n \"maintenance\",\n \"manage\",\n \"manage_follow_index\",\n \"manage_ilm\",\n \"manage_leader_index\",\n \"monitor\",\n \"none\",\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\",\n \"write\"\n ]\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-role-mappings.asciidoc",
- "line": 64
- },
- "digest": "8b3a94495127efd9d56b2cd7f3eecdca",
- "lang": "console",
- "found": [],
- "source": "GET /_security/role_mapping/mapping1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/role_mapping/mapping1",
- "query": null,
- "body": null,
- "params": {
- "name": "mapping1"
- },
- "api": "security.get_role_mapping"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-role-mappings.asciidoc",
- "line": 71
- },
- "digest": "5658fa03086f1969f2e1fbc0215eed77",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"mapping1\": {\n \"enabled\": true,\n \"roles\": [\n \"user\"\n ],\n \"rules\": {\n \"field\": {\n \"username\": \"*\"\n }\n },\n \"metadata\": {}\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-roles.asciidoc",
- "line": 56
- },
- "digest": "115529722ba30b0b0d51a7ff87e59198",
- "lang": "console",
- "found": [],
- "source": "GET /_security/role/my_admin_role",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/role/my_admin_role",
- "query": null,
- "body": null,
- "params": {
- "name": "my_admin_role"
- },
- "api": "security.get_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-roles.asciidoc",
- "line": 62
- },
- "digest": "ee90e8a3645501f252777737b7466061",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_admin_role\": {\n \"cluster\" : [ \"all\" ],\n \"indices\" : [\n {\n \"names\" : [ \"index1\", \"index2\" ],\n \"privileges\" : [ \"all\" ],\n \"allow_restricted_indices\" : false,\n \"field_security\" : {\n \"grant\" : [ \"title\", \"body\" ]}\n }\n ],\n \"applications\" : [ ],\n \"run_as\" : [ \"other_user\" ],\n \"metadata\" : {\n \"version\" : 1\n },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-roles.asciidoc",
- "line": 90
- },
- "digest": "128283698535116931dca9d16a16dca2",
- "lang": "console",
- "found": [],
- "source": "GET /_security/role",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/role",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_role"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 111
- },
- "digest": "cee591c1fc70d4f180c623a3a6d07755",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\" : \"client_credentials\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "client_credentials"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 122
- },
- "digest": "da2bb6894d95489812b653be2feeeb5b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 146
- },
- "digest": "e1337c6b76defd5a46d05220f9d9c9fc",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\" : \"password\",\n \"username\" : \"test_admin\",\n \"password\" : \"x-pack-test-password\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "password",
- "username": "test_admin",
- "password": "x-pack-test-password"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 159
- },
- "digest": "774740abbecda50b03d75dbff8cbe60f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 176
- },
- "digest": "1873f8a8a291e6fcd6c1c83ea6928759",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\": \"refresh_token\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "refresh_token",
- "refresh_token": "vLBPvmAB6KvwvJZr27cS"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-tokens.asciidoc",
- "line": 190
- },
- "digest": "774740abbecda50b03d75dbff8cbe60f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-users.asciidoc",
- "line": 56
- },
- "digest": "3924ee252581ebb96ac0e60046125ae8",
- "lang": "console",
- "found": [],
- "source": "GET /_security/user/jacknich",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/user/jacknich",
- "query": null,
- "body": null,
- "params": {
- "username": "jacknich"
- },
- "api": "security.get_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-users.asciidoc",
- "line": 62
- },
- "digest": "bac6203259754d2f09c1ebeecc9ded5d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"jacknich\": {\n \"username\": \"jacknich\",\n \"roles\": [\n \"admin\", \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": { \"intelligence\" : 7 },\n \"enabled\": true\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/get-users.asciidoc",
- "line": 80
- },
- "digest": "abdbc81e799e28c833556b1c29f03ba6",
- "lang": "console",
- "found": [],
- "source": "GET /_security/user",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/user",
- "query": null,
- "body": null,
- "params": null,
- "api": "security.get_user"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/has-privileges.asciidoc",
- "line": 68
- },
- "digest": "9684e5fa8c22a07a372feb6fc1f5f7c0",
- "lang": "console",
- "found": [],
- "source": "GET /_security/user/_has_privileges\n{\n \"cluster\": [ \"monitor\", \"manage\" ],\n \"index\" : [\n {\n \"names\": [ \"suppliers\", \"products\" ],\n \"privileges\": [ \"read\" ]\n },\n {\n \"names\": [ \"inventory\" ],\n \"privileges\" : [ \"read\", \"write\" ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\" : [ \"read\", \"data:write/inventory\" ],\n \"resources\" : [ \"product/1852563\" ]\n }\n ]\n}",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_security/user/_has_privileges",
- "query": null,
- "body": {
- "cluster": [
- "monitor",
- "manage"
- ],
- "index": [
- {
- "names": [
- "suppliers",
- "products"
- ],
- "privileges": [
- "read"
- ]
- },
- {
- "names": [
- "inventory"
- ],
- "privileges": [
- "read",
- "write"
- ]
- }
- ],
- "application": [
- {
- "application": "inventory_manager",
- "privileges": [
- "read",
- "data:write/inventory"
- ],
- "resources": [
- "product/1852563"
- ]
- }
- ]
- },
- "params": null,
- "api": "security.has_privileges"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/has-privileges.asciidoc",
- "line": 95
- },
- "digest": "099336bd3e681efc691078a0300781a5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"username\": \"rdeniro\",\n \"has_all_requested\" : false,\n \"cluster\" : {\n \"monitor\" : true,\n \"manage\" : false\n },\n \"index\" : {\n \"suppliers\" : {\n \"read\" : true\n },\n \"products\" : {\n \"read\" : true\n },\n \"inventory\" : {\n \"read\" : true,\n \"write\" : false\n }\n },\n \"application\" : {\n \"inventory_manager\" : {\n \"product/1852563\" : {\n \"read\": false,\n \"data:write/inventory\": false\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 72
- },
- "digest": "0aff04881be21eea45375ec4f4f50e66",
- "lang": "console",
- "found": [],
- "source": "POST /_security/api_key\n{\n \"name\": \"my-api-key\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key"
- },
- "params": null,
- "api": "security.create_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 83
- },
- "digest": "30c7faeb8f339772d309800170df9f92",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\":\"VuaCfGcBCdbkQm-e5aOx\",\n \"name\":\"my-api-key\",\n \"api_key\":\"ui2lp2axTNmsyakw9tvNnw\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 97
- },
- "digest": "01cc9dac719f2612a48cc1b23db7cd54",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"id\" : \"VuaCfGcBCdbkQm-e5aOx\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "id": "VuaCfGcBCdbkQm-e5aOx"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 110
- },
- "digest": "f388e571224dd6850f8c9f9f08fca3da",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"name\" : \"my-api-key\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "name": "my-api-key"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 121
- },
- "digest": "dde283eab92608e7bfbfa09c6482a12e",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"realm_name\" : \"native1\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "realm_name": "native1"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 132
- },
- "digest": "e7d819634d765cde269e2669e2dc677f",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"username\" : \"myuser\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "username": "myuser"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 143
- },
- "digest": "0ad8aa0d684b09500aa30b4c4d6f29c8",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"id\" : \"VuaCfGcBCdbkQm-e5aOx\",\n \"owner\" : \"true\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "id": "VuaCfGcBCdbkQm-e5aOx",
- "owner": "true"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 155
- },
- "digest": "cfad3631be0634ee49c424f9ccec62d9",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"owner\" : \"true\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "owner": "true"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-api-keys.asciidoc",
- "line": 166
- },
- "digest": "6c927313867647e0ef3cd3a37cb410cc",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/api_key\n{\n \"username\" : \"myuser\",\n \"realm_name\" : \"native1\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/api_key",
- "query": null,
- "body": {
- "username": "myuser",
- "realm_name": "native1"
- },
- "params": null,
- "api": "security.invalidate_api_key"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 72
- },
- "digest": "cee591c1fc70d4f180c623a3a6d07755",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\" : \"client_credentials\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "client_credentials"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 82
- },
- "digest": "da2bb6894d95489812b653be2feeeb5b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 95
- },
- "digest": "dbf9abc37899352751dab0ede62af2fd",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "token": "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ=="
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 108
- },
- "digest": "e1337c6b76defd5a46d05220f9d9c9fc",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oauth2/token\n{\n \"grant_type\" : \"password\",\n \"username\" : \"test_admin\",\n \"password\" : \"x-pack-test-password\"\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "grant_type": "password",
- "username": "test_admin",
- "password": "x-pack-test-password"
- },
- "params": null,
- "api": "security.get_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 120
- },
- "digest": "774740abbecda50b03d75dbff8cbe60f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"access_token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"type\" : \"Bearer\",\n \"expires_in\" : 1200,\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 135
- },
- "digest": "0c6f9c9da75293fae69659ac1d6329de",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"refresh_token\" : \"vLBPvmAB6KvwvJZr27cS\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "refresh_token": "vLBPvmAB6KvwvJZr27cS"
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 148
- },
- "digest": "4bc4db44b8c74610b73f21a421099a13",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"realm_name\" : \"saml1\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "realm_name": "saml1"
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 159
- },
- "digest": "0280247e0cf2e561c548f22c9fb31163",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"username\" : \"myuser\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "username": "myuser"
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/invalidate-tokens.asciidoc",
- "line": 170
- },
- "digest": "6dd2a107bc64fd6f058fb17c21640649",
- "lang": "console",
- "found": [],
- "source": "DELETE /_security/oauth2/token\n{\n \"username\" : \"myuser\",\n \"realm_name\" : \"saml1\"\n}",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_security/oauth2/token",
- "query": null,
- "body": {
- "username": "myuser",
- "realm_name": "saml1"
- },
- "params": null,
- "api": "security.invalidate_token"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 69
- },
- "digest": "e3019fd5f23458ae49ad9854c97d321c",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/prepare\n{\n \"realm\" : \"oidc1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 80
- },
- "digest": "7177f0f96dc5fbcf6c707a964707327f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"redirect\" : \"http://127.0.0.1:8080/c2id-login?scope=openid&response_type=id_token&redirect_uri=https%3A%2F%2Fmy.fantastic.rp%2Fcb&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I&nonce=WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM&client_id=elasticsearch-rp\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 95
- },
- "digest": "57dc15e5ad663c342fd5c1d86fcd1b29",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/prepare\n{\n \"realm\" : \"oidc1\",\n \"state\" : \"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n \"nonce\" : \"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 108
- },
- "digest": "99f7cf54f4e1ea0929678f876202bacc",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"redirect\" : \"http://127.0.0.1:8080/c2id-login?scope=openid&response_type=id_token&redirect_uri=https%3A%2F%2Fmy.fantastic.rp%2Fcb&state=lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO&nonce=zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5&client_id=elasticsearch-rp\",\n \"state\" : \"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n \"nonce\" : \"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 121
- },
- "digest": "d35c8cf7a98b3f112e1de8797ec6689d",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/prepare\n{\n \"iss\" : \"http://127.0.0.1:8080\",\n \"login_hint\": \"this_is_an_opaque_string\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-prepare-authentication-api.asciidoc",
- "line": 133
- },
- "digest": "50153ed0f17ea3c4d2392d1ae80a438a",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"redirect\" : \"http://127.0.0.1:8080/c2id-login?login_hint=this_is_an_opaque_string&scope=openid&response_type=id_token&redirect_uri=https%3A%2F%2Fmy.fantastic.rp%2Fcb&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I&nonce=WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM&client_id=elasticsearch-rp\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\"\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-authenticate-api.asciidoc",
- "line": 65
- },
- "digest": "9c01db07c9ac395b6370e3b33965c21f",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/authenticate\n{\n \"redirect_uri\" : \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\" : \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" : \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" : \"oidc1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/oidc-logout-api.asciidoc",
- "line": 44
- },
- "digest": "2a1eece9a59ac1773edcf0a932c26de0",
- "lang": "console",
- "found": [],
- "source": "POST /_security/oidc/logout\n{\n \"token\" : \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-prepare-authentication-api.asciidoc",
- "line": 70
- },
- "digest": "a5dfcfd1cfb3558e7912456669c92eee",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/prepare\n{\n \"realm\" : \"saml1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-prepare-authentication-api.asciidoc",
- "line": 81
- },
- "digest": "da3f280bc65b581fb3097be768061bee",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/prepare\n{\n \"acs\" : \"https://kibana.org/api/security/saml/callback\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-authenticate-api.asciidoc",
- "line": 79
- },
- "digest": "8e208098a0156c4c92afe0a06960b230",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/authenticate\n{\n \"content\" : \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" : [\"4fee3b046395c4e751011e97f8900b5273d56685\"]\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-logout-api.asciidoc",
- "line": 62
- },
- "digest": "8d4dda5d988d568f4f4210a6387e026f",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/logout\n{\n \"token\" : \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\" : \"mJdXLtmvTUSpoLwMvdBt_w\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/saml-invalidate-api.asciidoc",
- "line": 74
- },
- "digest": "49718ad4ff0ae0468c44a7aa35aeee69",
- "lang": "console",
- "found": [],
- "source": "POST /_security/saml/invalidate\n{\n \"queryString\" : \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\" : \"saml1\"\n}",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/security/ssl.asciidoc",
- "line": 84
- },
- "digest": "05f6049c677a156bdf9b83e71a3b87ed",
- "lang": "console",
- "found": [],
- "source": "GET /_ssl/certificates",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_ssl/certificates",
- "query": null,
- "body": null,
- "params": null,
- "api": "ssl.certificates"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/put-repo-api.asciidoc",
- "line": 10
- },
- "digest": "89b72dd7f747f6297c2b089e8bc807be",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_repository\n{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_repository",
- "query": null,
- "body": {
- "type": "fs",
- "settings": {
- "location": "my_backup_location"
- }
- },
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.create_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/verify-repo-api.asciidoc",
- "line": 24
- },
- "digest": "3fe5e6c0d5ea4586aa04f989ae54b72e",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_repository/_verify",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_repository/_verify",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.verify_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/get-repo-api.asciidoc",
- "line": 25
- },
- "digest": "218b9009f120e8ad33f710e019179562",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_repository",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_repository",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/get-repo-api.asciidoc",
- "line": 116
- },
- "digest": "218b9009f120e8ad33f710e019179562",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_repository",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_repository",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.get_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/get-repo-api.asciidoc",
- "line": 123
- },
- "digest": "a15b56c9b304cc40a5e63dc180a9cc03",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"my_repository\" : {\n \"type\" : \"fs\",\n \"settings\" : {\n \"location\" : \"my_backup_location\"\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/delete-repo-api.asciidoc",
- "line": 27
- },
- "digest": "ff56ded50c65998c70f3c5691ddc6f86",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_repository",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_repository",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.delete_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/clean-up-repo-api.asciidoc",
- "line": 25
- },
- "digest": "6aca241c0361d26f134712821e2d09a9",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_repository/_cleanup",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_repository/_cleanup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.cleanup_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/clean-up-repo-api.asciidoc",
- "line": 93
- },
- "digest": "6aca241c0361d26f134712821e2d09a9",
- "lang": "console",
- "found": [],
- "source": "POST /_snapshot/my_repository/_cleanup",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_snapshot/my_repository/_cleanup",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository"
- },
- "api": "snapshot.cleanup_repository"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/clean-up-repo-api.asciidoc",
- "line": 100
- },
- "digest": "5e309dfb203bf2b89cd8a4c353c4b6f5",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"results\": {\n \"deleted_bytes\": 20,\n \"deleted_blobs\": 5\n }\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/create-snapshot-api.asciidoc",
- "line": 25
- },
- "digest": "1f3dd84ab11bae09d3f99b1b3536e239",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_repository/my_snapshot",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_repository/my_snapshot",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository",
- "snapshot": "my_snapshot"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/create-snapshot-api.asciidoc",
- "line": 134
- },
- "digest": "3f30310cc6d0adae6b0f61705624a695",
- "lang": "console",
- "found": [],
- "source": "PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true\n{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_snapshot/my_repository/snapshot_2",
- "query": {
- "wait_for_completion": "true"
- },
- "body": {
- "indices": "index_1,index_2",
- "ignore_unavailable": true,
- "include_global_state": false,
- "metadata": {
- "taken_by": "user123",
- "taken_because": "backup before upgrading"
- }
- },
- "params": {
- "repository": "my_repository",
- "snapshot": "snapshot_2"
- },
- "api": "snapshot.create"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/create-snapshot-api.asciidoc",
- "line": 150
- },
- "digest": "21017715a97dcf62316ba1a7d973f132",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"snapshot\": {\n \"snapshot\": \"snapshot_2\",\n \"uuid\": \"vdRctLCxSketdKb54xw67g\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n },\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-06-25T14:00:28.850Z\",\n \"start_time_in_millis\": 1593093628850,\n \"end_time\": \"2020-06-25T14:00:28.850Z\",\n \"end_time_in_millis\": 1593094752018,\n \"duration_in_millis\": 0,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/get-snapshot-api.asciidoc",
- "line": 28
- },
- "digest": "a811b82ba4632bdd9065829085188bc9",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_repository/my_snapshot",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_repository/my_snapshot",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository",
- "snapshot": "my_snapshot"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/get-snapshot-api.asciidoc",
- "line": 194
- },
- "digest": "bfb8a15cd05b43094ffbce8078bad3e1",
- "lang": "console",
- "found": [],
- "source": "GET /_snapshot/my_repository/snapshot_2",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/my_repository/snapshot_2",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository",
- "snapshot": "snapshot_2"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/get-snapshot-api.asciidoc",
- "line": 201
- },
- "digest": "80b8862ff40169c02d495facc44f2000",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"responses\": [\n {\n \"repository\": \"my_repository\",\n \"snapshots\": [\n {\n \"snapshot\": \"snapshot_2\",\n \"uuid\": \"vdRctLCxSketdKb54xw67g\",\n \"version_id\": ,\n \"version\": ,\n \"indices\": [],\n \"data_streams\": [],\n \"include_global_state\": true,\n \"state\": \"SUCCESS\",\n \"start_time\": \"2020-07-06T21:55:18.129Z\",\n \"start_time_in_millis\": 1593093628850,\n \"end_time\": \"2020-07-06T21:55:18.129Z\",\n \"end_time_in_millis\": 1593094752018,\n \"duration_in_millis\": 0,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n ]\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/delete-snapshot-api.asciidoc",
- "line": 30
- },
- "digest": "f04e1284d09ceb4443d67b2ef9c7f476",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_repository/my_snapshot",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_repository/my_snapshot",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository",
- "snapshot": "my_snapshot"
- },
- "api": "snapshot.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/delete-snapshot-api.asciidoc",
- "line": 69
- },
- "digest": "6dd4c02fe3d6b800648a04d3e2d29fc1",
- "lang": "console",
- "found": [],
- "source": "DELETE /_snapshot/my_repository/snapshot_2,snapshot_3",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_snapshot/my_repository/snapshot_2,snapshot_3",
- "query": null,
- "body": null,
- "params": {
- "repository": "my_repository",
- "snapshot": "snapshot_2,snapshot_3"
- },
- "api": "snapshot.delete"
- }
- ]
- },
- {
- "source_location": {
- "file": "snapshot-restore/apis/delete-snapshot-api.asciidoc",
- "line": 76
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "slm/apis/slm-put.asciidoc",
- "line": 121
- },
- "digest": "aa7cf5df36b867aee5e3314ac4b4fa68",
- "lang": "console",
- "found": [],
- "source": "PUT /_slm/policy/daily-snapshots\n{\n \"schedule\": \"0 30 1 * * ?\", <1>\n \"name\": \"\", <2>\n \"repository\": \"my_repository\", <3>\n \"config\": { <4>\n \"indices\": [\"data-*\", \"important\"], <5>\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": { <6>\n \"expire_after\": \"30d\", <7>\n \"min_count\": 5, <8>\n \"max_count\": 50 <9>\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_slm/policy/daily-snapshots",
- "query": null,
- "body": {
- "schedule": "0 30 1 * * ?",
- "name": "",
- "repository": "my_repository",
- "config": {
- "indices": [
- "data-*",
- "important"
- ],
- "ignore_unavailable": false,
- "include_global_state": false
- },
- "retention": {
- "expire_after": "30d",
- "min_count": 5,
- "max_count": 50
- }
- },
- "params": {
- "policy_id": "daily-snapshots"
- },
- "api": "slm.put_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get.asciidoc",
- "line": 72
- },
- "digest": "b4f9fe8808cb27a210b162e7aaba261d",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/policy/daily-snapshots?human",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/policy/daily-snapshots",
- "query": {
- "human": true
- },
- "body": null,
- "params": {
- "policy_id": "daily-snapshots"
- },
- "api": "slm.get_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get.asciidoc",
- "line": 80
- },
- "digest": "42757e819c51fc2fb12932b05a18fd98",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"daily-snapshots\" : {\n \"version\": 1, <1>\n \"modified_date\": \"2019-04-23T01:30:00.000Z\", <2>\n \"modified_date_millis\": 1556048137314,\n \"policy\" : {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\"data-*\", \"important\"],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n },\n \"stats\": {\n \"policy\": \"daily-snapshots\",\n \"snapshots_taken\": 0,\n \"snapshots_failed\": 0,\n \"snapshots_deleted\": 0,\n \"snapshot_deletion_failures\": 0\n },\n \"next_execution\": \"2019-04-24T01:30:00.000Z\", <3>\n \"next_execution_millis\": 1556048160000\n }\n}"
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get.asciidoc",
- "line": 123
- },
- "digest": "bc2dd9e5ed37f98016ecf53f968d2211",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/policy",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/policy",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.get_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-delete.asciidoc",
- "line": 66
- },
- "digest": "1a1f3421717ff744ed83232729289bb0",
- "lang": "console",
- "found": [],
- "source": "DELETE /_slm/policy/daily-snapshots",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_slm/policy/daily-snapshots",
- "query": null,
- "body": null,
- "params": {
- "policy_id": "daily-snapshots"
- },
- "api": "slm.delete_lifecycle"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-execute.asciidoc",
- "line": 45
- },
- "digest": "0ab002c6618af75e1041a23c692327ad",
- "lang": "console",
- "found": [],
- "source": "POST /_slm/policy/daily-snapshots/_execute",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "slm/apis/slm-execute.asciidoc",
- "line": 53
- },
- "digest": "80e9cf8fc73f6f5c65db578752235391",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"snapshot_name\": \"daily-snap-2019.04.24-gwrqoo2xtea3q57vvg0uea\"\n}"
- },
- {
- "source_location": {
- "file": "slm/apis/slm-execute-retention.asciidoc",
- "line": 35
- },
- "digest": "e71d300cd87f09a9527cf45395dd7eb1",
- "lang": "console",
- "found": [],
- "source": "POST /_slm/_execute_retention",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_slm/_execute_retention",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.execute_retention"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get-status.asciidoc",
- "line": 43
- },
- "digest": "cde4104a29dfe942d55863cdd8718627",
- "lang": "console",
- "found": [],
- "source": "GET _slm/status",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/status",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.get_status"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-get-status.asciidoc",
- "line": 50
- },
- "digest": "99e0bec31e49636bc0053ac66bc29352",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"operation_mode\": \"RUNNING\"\n}"
- },
- {
- "source_location": {
- "file": "slm/apis/slm-stats.asciidoc",
- "line": 27
- },
- "digest": "55e8ddf643726dec51531ada0bec7143",
- "lang": "console",
- "found": [],
- "source": "GET /_slm/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_slm/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "slm.get_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "slm/apis/slm-start.asciidoc",
- "line": 42
- },
- "digest": "371962cf63e65c10026177c6a1bad0b6",
- "lang": "console",
- "found": [],
- "source": "POST _slm/start",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "slm/apis/slm-start.asciidoc",
- "line": 49
- },
- "digest": "bc5fcc40c29087a0df7b5405bb70de5c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "slm/apis/slm-stop.asciidoc",
- "line": 48
- },
- "digest": "41195ef13af0465cdee1ae18f6c00fde",
- "lang": "console",
- "found": [],
- "source": "POST _slm/stop",
- "parsed_source": []
- },
- {
- "source_location": {
- "file": "transform/apis/put-transform.asciidoc",
- "line": 210
- },
- "digest": "23994a14e6b0681cd279b427324945db",
- "lang": "console",
- "found": [],
- "source": "PUT _transform/ecommerce_transform\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_transform/ecommerce_transform",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce",
- "query": {
- "term": {
- "geoip.continent_name": {
- "value": "Asia"
- }
- }
- }
- },
- "pivot": {
- "group_by": {
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "max_price": {
- "max": {
- "field": "taxful_total_price"
- }
- }
- }
- },
- "description": "Maximum priced ecommerce data by customer_id in Asia",
- "dest": {
- "index": "kibana_sample_data_ecommerce_transform",
- "pipeline": "add_timestamp_pipeline"
- },
- "frequency": "5m",
- "sync": {
- "time": {
- "field": "order_date",
- "delay": "60s"
- }
- }
- },
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.put_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/put-transform.asciidoc",
- "line": 258
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/delete-transform.asciidoc",
- "line": 52
- },
- "digest": "70c736ecb3746dbe839af0e468712805",
- "lang": "console",
- "found": [],
- "source": "DELETE _transform/ecommerce_transform",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_transform/ecommerce_transform",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.delete_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/delete-transform.asciidoc",
- "line": 60
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform.asciidoc",
- "line": 96
- },
- "digest": "c65b00a285f510dcd2865aa3539b4e03",
- "lang": "console",
- "found": [],
- "source": "GET _transform?size=10",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_transform",
- "query": {
- "size": "10"
- },
- "body": null,
- "params": null,
- "api": "transform.get_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform.asciidoc",
- "line": 105
- },
- "digest": "c8ebbecc372bcfa5f4a6e7242395ab5e",
- "lang": "console",
- "found": [],
- "source": "GET _transform/ecommerce_transform",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_transform/ecommerce_transform",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.get_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform.asciidoc",
- "line": 113
- },
- "digest": "fd550fe5ac920aa8354cf076b0373e0d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"transforms\" : [\n {\n \"id\" : \"ecommerce_transform\",\n \"source\" : {\n \"index\" : [\n \"kibana_sample_data_ecommerce\"\n ],\n \"query\" : {\n \"term\" : {\n \"geoip.continent_name\" : {\n \"value\" : \"Asia\"\n }\n }\n }\n },\n \"dest\" : {\n \"index\" : \"kibana_sample_data_ecommerce_transform\"\n },\n \"frequency\": \"1m\",\n \"pivot\" : {\n \"group_by\" : {\n \"customer_id\" : {\n \"terms\" : {\n \"field\" : \"customer_id\"\n }\n }\n },\n \"aggregations\" : {\n \"max_price\" : {\n \"max\" : {\n \"field\" : \"taxful_total_price\"\n }\n }\n }\n },\n \"description\" : \"Maximum priced ecommerce data by customer_id in Asia\",\n \"settings\" : { },\n \"version\" : \"7.5.0\",\n \"create_time\" : 1576094542936\n }\n ]\n}\n"
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform-stats.asciidoc",
- "line": 267
- },
- "digest": "53c6256295111524d5ff2885bdcb99a9",
- "lang": "console",
- "found": [],
- "source": "GET _transform/_stats?from=5&size=10",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_transform/_stats",
- "query": {
- "from": "5",
- "size": "10"
- },
- "body": null,
- "params": {
- "transform_id": "_stats"
- },
- "api": "transform.get_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform-stats.asciidoc",
- "line": 275
- },
- "digest": "0755471d7dce4785d2e7ed0c10182ea3",
- "lang": "console",
- "found": [],
- "source": "GET _transform/ecommerce-customer-transform/_stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_transform/ecommerce-customer-transform/_stats",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce-customer-transform"
- },
- "api": "transform.get_transform_stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/get-transform-stats.asciidoc",
- "line": 283
- },
- "digest": "fcb61e4d52d6cc295c8507307aa290b1",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"count\" : 1,\n \"transforms\" : [\n {\n \"id\" : \"ecommerce-customer-transform\",\n \"state\" : \"started\",\n \"node\" : {\n \"id\" : \"cpTIGMsVQ8Gqwqlxxxxxxx\",\n \"name\" : \"my.home\",\n \"ephemeral_id\" : \"5-L21nFsQxxxxxxxxxx-xx\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"attributes\" : { }\n },\n \"stats\" : {\n \"pages_processed\" : 78,\n \"documents_processed\" : 6027,\n \"documents_indexed\" : 68,\n \"trigger_count\" : 168,\n \"index_time_in_ms\" : 412,\n \"index_total\" : 20,\n \"index_failures\" : 0,\n \"search_time_in_ms\" : 353,\n \"search_total\" : 78,\n \"search_failures\" : 0,\n \"processing_time_in_ms\" : 8,\n \"processing_total\" : 78,\n \"exponential_avg_checkpoint_duration_ms\" : 97.30637923893185,\n \"exponential_avg_documents_indexed\" : 2.2064915040974062,\n \"exponential_avg_documents_processed\" : 179.89419945785045\n },\n \"checkpointing\" : {\n \"last\" : {\n \"checkpoint\" : 20,\n \"timestamp_millis\" : 1585344558220,\n \"time_upper_bound_millis\" : 1585344498220\n },\n \"changes_last_detected_at\" : 1585344558219\n }\n }\n ]\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/preview-transform.asciidoc",
- "line": 196
- },
- "digest": "a5ee3f40c34bd913a12e0069b6e42611",
- "lang": "console",
- "found": [],
- "source": "POST _transform/_preview\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/_preview",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce"
- },
- "pivot": {
- "group_by": {
- "customer_id": {
- "terms": {
- "field": "customer_id"
- }
- }
- },
- "aggregations": {
- "max_price": {
- "max": {
- "field": "taxful_total_price"
- }
- }
- }
- }
- },
- "params": null,
- "api": "transform.preview_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/start-transform.asciidoc",
- "line": 64
- },
- "digest": "01bc0f2ed30eb3dd23511d01ce0ac6e1",
- "lang": "console",
- "found": [],
- "source": "POST _transform/ecommerce_transform/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/ecommerce_transform/_start",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.start_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/start-transform.asciidoc",
- "line": 72
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/stop-transform.asciidoc",
- "line": 95
- },
- "digest": "654882f545eca8d7047695f867c63072",
- "lang": "console",
- "found": [],
- "source": "POST _transform/ecommerce_transform/_stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/ecommerce_transform/_stop",
- "query": null,
- "body": null,
- "params": {
- "transform_id": "ecommerce_transform"
- },
- "api": "transform.stop_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/stop-transform.asciidoc",
- "line": 103
- },
- "digest": "aff76d64e6270a13c3274869f9abc3a9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\" : true\n}"
- },
- {
- "source_location": {
- "file": "transform/apis/update-transform.asciidoc",
- "line": 183
- },
- "digest": "27384266370152add76471dd0332a2f1",
- "lang": "console",
- "found": [],
- "source": "POST _transform/simple-kibana-ecomm-pivot/_update\n{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_transform/simple-kibana-ecomm-pivot/_update",
- "query": null,
- "body": {
- "source": {
- "index": "kibana_sample_data_ecommerce",
- "query": {
- "term": {
- "geoip.continent_name": {
- "value": "Asia"
- }
- }
- }
- },
- "description": "Maximum priced ecommerce data by customer_id in Asia",
- "dest": {
- "index": "kibana_sample_data_ecommerce_transform_v2",
- "pipeline": "add_timestamp_pipeline"
- },
- "frequency": "15m",
- "sync": {
- "time": {
- "field": "order_date",
- "delay": "120s"
- }
- }
- },
- "params": {
- "transform_id": "simple-kibana-ecomm-pivot"
- },
- "api": "transform.update_transform"
- }
- ]
- },
- {
- "source_location": {
- "file": "transform/apis/update-transform.asciidoc",
- "line": 215
- },
- "digest": "3f4f5ee9dc4de43a66ef85b46974f19b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"id\": \"simple-kibana-ecomm-pivot\",\n \"source\": {\n \"index\": [\"kibana_sample_data_ecommerce\"],\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\"\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n },\n \"settings\": { },\n \"version\": \"7.5.0\",\n \"create_time\": 1518808660505\n}"
- },
- {
- "source_location": {
- "file": "rest-api/usage.asciidoc",
- "line": 32
- },
- "digest": "43fe75fa9f3fca846598fdad58fd98cb",
- "lang": "console",
- "found": [],
- "source": "GET /_xpack/usage",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_xpack/usage",
- "query": null,
- "body": null,
- "params": null,
- "api": "xpack.usage"
- }
- ]
- },
- {
- "source_location": {
- "file": "rest-api/usage.asciidoc",
- "line": 37
- },
- "digest": "eaae66f14dec008f6ee019c5ecaceb8e",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"security\" : {\n \"available\" : true,\n \"enabled\" : false,\n \"ssl\" : {\n \"http\" : {\n \"enabled\" : false\n },\n \"transport\" : {\n \"enabled\" : false\n }\n }\n },\n \"monitoring\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"collection_enabled\" : false,\n \"enabled_exporters\" : {\n \"local\" : 1\n }\n },\n \"watcher\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"execution\" : {\n \"actions\" : {\n \"_all\" : {\n \"total\" : 0,\n \"total_time_in_ms\" : 0\n }\n }\n },\n \"watch\" : {\n \"input\" : {\n \"_all\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n },\n \"trigger\" : {\n \"_all\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n }\n },\n \"count\" : {\n \"total\" : 0,\n \"active\" : 0\n }\n },\n \"graph\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ml\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"jobs\" : {\n \"_all\" : {\n \"count\" : 0,\n \"detectors\" : {\n ...\n },\n \"created_by\" : { },\n \"model_size\" : {\n ...\n },\n \"forecasts\" : {\n \"total\" : 0,\n \"forecasted_jobs\" : 0\n }\n }\n },\n \"datafeeds\" : {\n \"_all\" : {\n \"count\" : 0\n }\n },\n \"data_frame_analytics_jobs\" : {\n \"_all\" : {\n \"count\" : 0\n }\n },\n \"inference\" : {\n \"ingest_processors\" : {\n \"_all\" : {\n \"num_docs_processed\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n },\n \"pipelines\" : {\n \"count\" : 0\n },\n \"num_failures\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n },\n \"time_ms\" : {\n \"max\" : 0,\n \"sum\" : 0,\n \"min\" : 0\n }\n }\n },\n \"trained_models\" : {\n \"_all\" : {\n \"count\" : 0\n }\n }\n },\n \"node_count\" : 1\n },\n \"logstash\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"eql\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"sql\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"features\" : {\n \"having\" : 0,\n \"subselect\" : 0,\n \"limit\" : 0,\n \"orderby\" : 0,\n \"where\" : 0,\n \"join\" : 0,\n \"groupby\" : 0,\n \"command\" : 0,\n \"local\" : 0\n },\n \"queries\" : {\n \"rest\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"cli\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"canvas\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"jdbc\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc32\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"odbc64\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"_all\" : {\n \"total\" : 0,\n \"paging\" : 0,\n \"failed\" : 0\n },\n \"translate\" : {\n \"count\" : 0\n }\n }\n },\n \"rollup\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ilm\" : {\n \"policy_count\" : 3,\n \"policy_stats\" : [\n ...\n ]\n },\n \"slm\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"ccr\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"follower_indices_count\" : 0,\n \"auto_follow_patterns_count\" : 0\n },\n \"transform\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"vectors\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"dense_vector_fields_count\" : 0,\n \"dense_vector_dims_avg_count\" : 0\n },\n \"voting_only\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"searchable_snapshots\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"indices_count\" : 0\n },\n \"frozen_indices\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"indices_count\" : 0\n },\n \"spatial\" : {\n \"available\" : true,\n \"enabled\" : true\n },\n \"analytics\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"stats\": {\n \"boxplot_usage\" : 0,\n \"top_metrics_usage\" : 0,\n \"normalize_usage\" : 0,\n \"cumulative_cardinality_usage\" : 0,\n \"t_test_usage\" : 0,\n \"string_stats_usage\" : 0,\n \"moving_percentiles_usage\" : 0\n }\n },\n \"data_streams\" : {\n \"available\" : true,\n \"enabled\" : true,\n \"data_streams\" : 0,\n \"indices_count\" : 0\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 62
- },
- "digest": "9116ee8a5b00cc877291ed5559563f24",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my_watch\n{\n \"trigger\" : {\n \"schedule\" : {\n \"yearly\" : { \"in\" : \"february\", \"on\" : 29, \"at\" : \"noon\" }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"actions\": {\n \"test_index\": {\n \"throttle_period\": \"15m\",\n \"index\": {\n \"index\": \"test\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "yearly": {
- "in": "february",
- "on": 29,
- "at": "noon"
- }
- }
- },
- "input": {
- "simple": {
- "payload": {
- "send": "yes"
- }
- }
- },
- "condition": {
- "always": {}
- },
- "actions": {
- "test_index": {
- "throttle_period": "15m",
- "index": {
- "index": "test"
- }
- }
- }
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 96
- },
- "digest": "e827a9040e137410d62d10bb3b3cbb71",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 103
- },
- "digest": "e2d293db79f536e0cd31d3a6871a2642",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"_version\": 1,\n \"_id\": \"my_watch\",\n \"status\": {\n \"version\": 1,\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:04:27.723Z\",\n \"state\": \"awaits_successful_execution\"\n }\n }\n },\n \"state\": ...\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 134
- },
- "digest": "bdc1afd2181154bb78797360f9dbb1a0",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute\n{\n \"record_execution\" : true\n}\n\nGET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": {
- "record_execution": true
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- },
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 147
- },
- "digest": "97c12a82b244e88ca1b3b3c707401b96",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 1,\n \"_primary_term\": 1,\n \"_version\": 2,\n \"status\": {\n \"version\": 2,\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:04:27.723Z\",\n \"state\": \"ackable\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.723Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.723Z\",\n \"successful\": true\n }\n }\n },\n \"state\": ...,\n \"execution_state\": \"executed\",\n \"last_checked\": ...,\n \"last_met_condition\": ...\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 190
- },
- "digest": "1b0dc9d076bbb58c6a2953ef4323d2fc",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my_watch/_ack/test_index\nGET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my_watch/_ack/test_index",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch",
- "action_id": "test_index"
- },
- "api": "watcher.ack_watch"
- },
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 197
- },
- "digest": "1cfe00b731a1fdf0b2add0688c43a1c2",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 2,\n \"_primary_term\": 1,\n \"_version\": 3,\n \"status\": {\n \"version\": 3,\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:04:27.723Z\",\n \"state\": \"acked\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.723Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.723Z\",\n \"successful\": true\n }\n }\n },\n \"state\": ...,\n \"execution_state\": \"executed\",\n \"last_checked\": ...,\n \"last_met_condition\": ...\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 245
- },
- "digest": "8051766cadded0892290bc2cc06e145c",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_ack/action1,action2",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_ack/action1,action2",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch",
- "action_id": "action1,action2"
- },
- "api": "watcher.ack_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 253
- },
- "digest": "df7dbac966b67404b8bfa9cdda5ef480",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_ack",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_ack",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch"
- },
- "api": "watcher.ack_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc",
- "line": 262
- },
- "digest": "545a911f3f261e048a8affc77fa29a5d",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"status\": {\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:04:27.723Z\"\n },\n \"last_checked\": \"2015-05-26T18:04:27.753Z\",\n \"last_met_condition\": \"2015-05-26T18:04:27.763Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\" : {\n \"timestamp\": \"2015-05-26T18:04:27.713Z\",\n \"state\": \"acked\"\n },\n \"last_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.733Z\",\n \"successful\": true\n },\n \"last_successful_execution\" : {\n \"timestamp\": \"2015-05-25T18:04:27.773Z\",\n \"successful\": true\n }\n }\n },\n \"execution_state\": \"executed\",\n \"version\": 2\n }\n}\n"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc",
- "line": 50
- },
- "digest": "e827a9040e137410d62d10bb3b3cbb71",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc",
- "line": 56
- },
- "digest": "6ab4f67649c21d637ec8a0ce72fd0d7c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"_version\": 1,\n \"status\": {\n \"state\" : {\n \"active\" : false,\n \"timestamp\" : \"2015-08-20T12:21:32.734Z\"\n },\n \"actions\": ...,\n \"version\": 1\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc",
- "line": 82
- },
- "digest": "3477a89d869b1f7f72d50c2ca86c4679",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my_watch/_activate",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my_watch/_activate",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch"
- },
- "api": "watcher.activate_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc",
- "line": 90
- },
- "digest": "67f8c67c5dce82121a87f60160071133",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"status\": {\n \"state\" : {\n \"active\" : true,\n \"timestamp\" : \"2015-09-04T08:39:46.816Z\"\n },\n \"actions\": ...,\n \"version\": 1\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc",
- "line": 50
- },
- "digest": "e827a9040e137410d62d10bb3b3cbb71",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc",
- "line": 56
- },
- "digest": "c924b17f4d746145e67e12ddcc126a6f",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_version\": 1,\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"status\": {\n \"state\" : {\n \"active\" : true,\n \"timestamp\" : \"2015-08-20T12:21:32.734Z\"\n },\n \"actions\": ...,\n \"version\": 1\n },\n \"watch\": ...\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc",
- "line": 82
- },
- "digest": "f63f6343e74bd5c844854272e746de14",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my_watch/_deactivate",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my_watch/_deactivate",
- "query": null,
- "body": null,
- "params": {
- "watch_id": "my_watch"
- },
- "api": "watcher.deactivate_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc",
- "line": 90
- },
- "digest": "6a25b3650607fe28bab83484ddf9a98c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"status\": {\n \"state\" : {\n \"active\" : false,\n \"timestamp\" : \"2015-09-04T08:39:46.816Z\"\n },\n \"actions\": ...,\n \"version\": 1\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/delete-watch.asciidoc",
- "line": 60
- },
- "digest": "2aa548b692fc2fe7b6f0d90eb8b2ae29",
- "lang": "console",
- "found": [],
- "source": "DELETE _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "DELETE",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.delete_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/delete-watch.asciidoc",
- "line": 68
- },
- "digest": "83597138e92b7b938bddf80b550eeed9",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_version\": 2\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 147
- },
- "digest": "01dc7bdc223bd651574ed2d3954a5b1c",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 155
- },
- "digest": "f6eff830fb0fad200ebfb1e3e46f6f0e",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute\n{\n \"trigger_data\" : { <1>\n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { <2>\n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, <3>\n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" <4>\n },\n \"record_execution\" : true <5>\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": {
- "trigger_data": {
- "triggered_time": "now",
- "scheduled_time": "now"
- },
- "alternative_input": {
- "foo": "bar"
- },
- "ignore_condition": true,
- "action_modes": {
- "my-action": "force_simulate"
- },
- "record_execution": true
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 188
- },
- "digest": "c017830af8d4720a5f60c0f142ed348b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"_id\": \"my_watch_0-2015-06-02T23:17:55.124Z\", <1>\n \"watch_record\": { <2>\n \"watch_id\": \"my_watch\",\n \"node\": \"my_node\",\n \"messages\": [],\n \"trigger_event\": {\n \"type\": \"manual\",\n \"triggered_time\": \"2015-06-02T23:17:55.124Z\",\n \"manual\": {\n \"schedule\": {\n \"scheduled_time\": \"2015-06-02T23:17:55.124Z\"\n }\n }\n },\n \"state\": \"executed\",\n \"status\": {\n \"version\": 1,\n \"execution_state\": \"executed\",\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-06-02T23:17:55.111Z\"\n },\n \"last_checked\": \"2015-06-02T23:17:55.124Z\",\n \"last_met_condition\": \"2015-06-02T23:17:55.124Z\",\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"state\": \"ackable\"\n },\n \"last_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n },\n \"last_successful_execution\": {\n \"timestamp\": \"2015-06-02T23:17:55.124Z\",\n \"successful\": true\n }\n }\n }\n },\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"result\": { <3>\n \"execution_time\": \"2015-06-02T23:17:55.124Z\",\n \"execution_duration\": 12608,\n \"input\": {\n \"type\": \"simple\",\n \"payload\": {\n \"foo\": \"bar\"\n },\n \"status\": \"success\"\n },\n \"condition\": {\n \"type\": \"always\",\n \"met\": true,\n \"status\": \"success\"\n },\n \"actions\": [\n {\n \"id\": \"test_index\",\n \"index\": {\n \"response\": {\n \"index\": \"test\",\n \"version\": 1,\n \"created\": true,\n \"result\": \"created\",\n \"id\": \"AVSHKzPa9zx62AzUzFXY\"\n }\n },\n \"status\": \"success\",\n \"type\": \"index\"\n }\n ]\n },\n \"user\": \"test_admin\" <4>\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 297
- },
- "digest": "7f37031fb40b68a61255b7c71d7eed0b",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute\n{\n \"action_modes\" : {\n \"action1\" : \"force_simulate\",\n \"action2\" : \"skip\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": {
- "action_modes": {
- "action1": "force_simulate",
- "action2": "skip"
- }
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 312
- },
- "digest": "9cf6c7012a4f2bb562bc256aa28c3409",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/my_watch/_execute\n{\n \"action_modes\" : {\n \"_all\" : \"force_execute\"\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/my_watch/_execute",
- "query": null,
- "body": {
- "action_modes": {
- "_all": "force_execute"
- }
- },
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 325
- },
- "digest": "9cd37d0ccbc66ad47ddb626564b27cc8",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/_execute\n{\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/_execute",
- "query": null,
- "body": {
- "watch": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "log_error": {
- "logging": {
- "text": "Found {{ctx.payload.hits.total}} errors in the logs"
- }
- }
- }
- }
- },
- "params": null,
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc",
- "line": 361
- },
- "digest": "10b924bf6298aa6157ed00ce12f8edc1",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/watch/_execute\n{\n \"ignore_condition\" : true,\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/watch/_execute",
- "query": null,
- "body": {
- "ignore_condition": true,
- "watch": {
- "trigger": {
- "schedule": {
- "interval": "10s"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logs"
- ],
- "body": {
- "query": {
- "match": {
- "message": "error"
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "log_error": {
- "logging": {
- "text": "Found {{ctx.payload.hits.total}} errors in the logs"
- }
- }
- }
- }
- },
- "params": null,
- "api": "watcher.execute_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/get-watch.asciidoc",
- "line": 49
- },
- "digest": "e827a9040e137410d62d10bb3b3cbb71",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/watch/my_watch",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/watch/my_watch",
- "query": null,
- "body": null,
- "params": {
- "id": "my_watch"
- },
- "api": "watcher.get_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/get-watch.asciidoc",
- "line": 57
- },
- "digest": "b27af4671721924c2e449cf6f1e73158",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"found\": true,\n \"_id\": \"my_watch\",\n \"_seq_no\": 0,\n \"_primary_term\": 1,\n \"_version\": 1,\n \"status\": { <1>\n \"version\": 1,\n \"state\": {\n \"active\": true,\n \"timestamp\": \"2015-05-26T18:21:08.630Z\"\n },\n \"actions\": {\n \"test_index\": {\n \"ack\": {\n \"timestamp\": \"2015-05-26T18:21:08.630Z\",\n \"state\": \"awaits_successful_execution\"\n }\n }\n }\n },\n \"watch\": {\n \"input\": {\n \"simple\": {\n \"payload\": {\n \"send\": \"yes\"\n }\n }\n },\n \"condition\": {\n \"always\": {}\n },\n \"trigger\": {\n \"schedule\": {\n \"hourly\": {\n \"minute\": [0, 5]\n }\n }\n },\n \"actions\": {\n \"test_index\": {\n \"index\": {\n \"index\": \"test\"\n }\n }\n }\n }\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stats.asciidoc",
- "line": 84
- },
- "digest": "17266cee5eaaddf08e5534bf580a1910",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/stats",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/stats",
- "query": null,
- "body": null,
- "params": null,
- "api": "watcher.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stats.asciidoc",
- "line": 112
- },
- "digest": "3ed79871d956bfb2d6d2721d7272520c",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/stats?metric=current_watches",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/stats",
- "query": {
- "metric": "current_watches"
- },
- "body": null,
- "params": null,
- "api": "watcher.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stats.asciidoc",
- "line": 119
- },
- "digest": "56b6b50b174a935d368301ebd717231d",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/stats/current_watches",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/stats/current_watches",
- "query": null,
- "body": null,
- "params": {
- "metric": "current_watches"
- },
- "api": "watcher.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stats.asciidoc",
- "line": 163
- },
- "digest": "6244204213f60edf2f23295f9059f2c9",
- "lang": "console",
- "found": [],
- "source": "GET _watcher/stats/queued_watches",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_watcher/stats/queued_watches",
- "query": null,
- "body": null,
- "params": {
- "metric": "queued_watches"
- },
- "api": "watcher.stats"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/put-watch.asciidoc",
- "line": 117
- },
- "digest": "3a12feb0de224bfaaf518d95b9f516ff",
- "lang": "console",
- "found": [],
- "source": "PUT _watcher/watch/my-watch\n{\n \"trigger\" : {\n \"schedule\" : { \"cron\" : \"0 0/1 * * * ?\" }\n },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [\n \"logstash*\"\n ],\n \"body\" : {\n \"query\" : {\n \"bool\" : {\n \"must\" : {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\" : {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"email_admin\" : {\n \"email\" : {\n \"to\" : \"admin@domain.host.com\",\n \"subject\" : \"404 recently encountered\"\n }\n }\n }\n}",
- "parsed_source": [
- {
- "method": "PUT",
- "url": "/_watcher/watch/my-watch",
- "query": null,
- "body": {
- "trigger": {
- "schedule": {
- "cron": "0 0/1 * * * ?"
- }
- },
- "input": {
- "search": {
- "request": {
- "indices": [
- "logstash*"
- ],
- "body": {
- "query": {
- "bool": {
- "must": {
- "match": {
- "response": 404
- }
- },
- "filter": {
- "range": {
- "@timestamp": {
- "from": "{{ctx.trigger.scheduled_time}}||-5m",
- "to": "{{ctx.trigger.triggered_time}}"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "actions": {
- "email_admin": {
- "email": {
- "to": "admin@domain.host.com",
- "subject": "404 recently encountered"
- }
- }
- }
- },
- "params": {
- "id": "my-watch"
- },
- "api": "watcher.put_watch"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/start.asciidoc",
- "line": 43
- },
- "digest": "97ea5ab17213cb1faaf6f3ea13607098",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/_start",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/_start",
- "query": null,
- "body": null,
- "params": null,
- "api": "watcher.start"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/start.asciidoc",
- "line": 50
- },
- "digest": "647803854da1f06200d471a2937e105c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stop.asciidoc",
- "line": 43
- },
- "digest": "6b1336ff477f91d4a0db0b06db546ff0",
- "lang": "console",
- "found": [],
- "source": "POST _watcher/_stop",
- "parsed_source": [
- {
- "method": "POST",
- "url": "/_watcher/_stop",
- "query": null,
- "body": null,
- "params": null,
- "api": "watcher.stop"
- }
- ]
- },
- {
- "source_location": {
- "file": "../../x-pack/docs/en/rest-api/watcher/stop.asciidoc",
- "line": 50
- },
- "digest": "647803854da1f06200d471a2937e105c",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"acknowledged\": true\n}"
- },
- {
- "source_location": {
- "file": "migration/migrate_8_0/snapshots.asciidoc",
- "line": 22
- },
- "digest": "6458a2377155ecbdd2d3ebd0e1529201",
- "lang": "console",
- "found": [],
- "source": "GET _snapshot/repo1/snap1",
- "parsed_source": [
- {
- "method": "GET",
- "url": "/_snapshot/repo1/snap1",
- "query": null,
- "body": null,
- "params": {
- "repository": "repo1",
- "snapshot": "snap1"
- },
- "api": "snapshot.get"
- }
- ]
- },
- {
- "source_location": {
- "file": "migration/migrate_8_0/snapshots.asciidoc",
- "line": 30
- },
- "digest": "97eab207747d5ad2e1f6d3b84971d74b",
- "lang": "console-result",
- "found": [],
- "source": "{\n \"responses\": [\n {\n \"repository\": \"repo1\",\n \"snapshots\": [\n {\n \"snapshot\": \"snap1\",\n \"uuid\": \"cEzdqUKxQ5G6MyrJAcYwmA\",\n \"version_id\": 8000099,\n \"version\": \"8.0.0\",\n \"indices\": [],\n \"include_global_state\": true,\n \"state\": \"SUCCESS\",\n \"start_time\": \"2019-05-10T17:01:57.868Z\",\n \"start_time_in_millis\": 1557507717868,\n \"end_time\": \"2019-05-10T17:01:57.909Z\",\n \"end_time_in_millis\": 1557507717909,\n \"duration_in_millis\": 41,\n \"failures\": [],\n \"shards\": {\n \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n ]\n }\n ]\n}"
- }
-]
\ No newline at end of file
diff --git a/util/run_es_docker.sh b/util/run_es_docker.sh
deleted file mode 100755
index b65b82b75..000000000
--- a/util/run_es_docker.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-if [ -z $STACK_VERSION ]; then
- echo "No STACK_VERSION specified";
- exit 1;
-fi
-
-if [ "$TEST_SUITE" != "free" ] && [ "$TEST_SUITE" != "platinum" ]; then
- echo "TEST_SUITE must be free or platinum";
- exit 1;
-fi
-
-if [ "$TEST_SUITE" = "free" ]; then
- docker pull docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
- docker network create esnet;
- docker run \
- --rm \
- --publish 9200:9200 \
- --ulimit nofile=65536:65536 \
- --ulimit memlock=-1:-1 \
- --env "node.attr.testattr=test" \
- --env "path.repo=/tmp" \
- --env "repositories.url.allowed_urls=http://snapshot.*" \
- --env "discovery.type=single-node" \
- --env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
- --env "action.destructive_requires_name=false" \
- --network=esnet \
- --name=elasticsearch \
- --health-interval=2s \
- --health-retries=20 \
- --health-timeout=2s \
- --detach \
- docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
- docker run --network esnet --rm appropriate/curl --max-time 120 --retry 120 --retry-delay 1 --retry-connrefused --show-error --silent http://elasticsearch:9200
-else
- repo=$(pwd)
- testnodecrt="/util/certs/testnode.crt"
- testnodekey="/util/certs/testnode.key"
- cacrt="/util/certs/ca.crt"
-
- docker pull docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
- docker network create esnet;
-
- docker run \
- --rm \
- --publish 9200:9200 \
- --env "node.attr.testattr=test" \
- --env "path.repo=/tmp" \
- --env "repositories.url.allowed_urls=http://snapshot.*" \
- --env "discovery.type=single-node" \
- --env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
- --env "action.destructive_requires_name=false" \
- --env "ELASTIC_PASSWORD=changeme" \
- --env "xpack.security.enabled=true" \
- --env "xpack.license.self_generated.type=trial" \
- --env "xpack.security.http.ssl.enabled=true" \
- --env "xpack.security.http.ssl.verification_mode=certificate" \
- --env "xpack.security.http.ssl.key=certs/testnode.key" \
- --env "xpack.security.http.ssl.certificate=certs/testnode.crt" \
- --env "xpack.security.http.ssl.certificate_authorities=certs/ca.crt" \
- --env "xpack.security.transport.ssl.enabled=true" \
- --env "xpack.security.transport.ssl.key=certs/testnode.key" \
- --env "xpack.security.transport.ssl.certificate=certs/testnode.crt" \
- --env 'indices.lifecycle.history_index_enabled=false' \
- --env "xpack.security.transport.ssl.certificate_authorities=certs/ca.crt" \
- --env "xpack.ml.max_model_memory_limit=2gb" \
- --volume "$repo$testnodecrt:/usr/share/elasticsearch/config/certs/testnode.crt" \
- --volume "$repo$testnodekey:/usr/share/elasticsearch/config/certs/testnode.key" \
- --volume "$repo$cacrt:/usr/share/elasticsearch/config/certs/ca.crt" \
- --network=esnet \
- --name=elasticsearch \
- --detach \
- docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
-
- docker run --network esnet --rm appropriate/curl --max-time 120 --retry 120 --retry-delay 1 --retry-connrefused --show-error --silent --insecure https://elastic:changeme@elasticsearch:9200
-fi
-