Open
Description
👋 howdy team,
Generalizing #1634, via (A) Python to (B) output with manual review of final
it appears we have some flavors
- links to ES API-not-refrence docs with
#
do not redirect correctly (example #1634 stands) - bootstrap docs' links mostly redirect to the correct-although-generic page instead of the sub-header. (Manually trying sub-headers do seem to work so seems redirect mapping maybe's off?)
- there doesn't appear to be a consistent new doc base URL for related code to pivot from
https://www.elastic.co/guide/en/elasticsearch/reference/{version}/
off of. I assume redirects will expect to exist forever then as part of this architecture? How would we know if needed page got moved?
(A)
import requests,json
OLD_ES = "https://www.elastic.co/guide/en/elasticsearch/reference"
# https://github.com/stefnestor/elasticsearch/blob/6fee26653bf3b1f7f370414475c58b3a1ce130a3/server/src/main/resources/org/elasticsearch/common/reference-docs-links.txt
DOCS_LINKS = [
{"id": "ALLOCATION_EXPLAIN_API", "old":"cluster-allocation-explain.html", "new": None},
{"id": "ALLOCATION_EXPLAIN_MAX_RETRY", "old":"cluster-allocation-explain.html#maximum-number-of-retries-exceeded", "new": None},
{"id": "ALLOCATION_EXPLAIN_NO_COPIES", "old":"cluster-allocation-explain.html#no-valid-shard-copy", "new": None},
{"id": "ALLOCATION_EXPLAIN_SETTING_CONFLICT", "old":"cluster-allocation-explain.html#allocation-explain-setting-conflict", "new": None},
{"id": "ARCHIVE_INDICES", "old":"archive-indices.html", "new": None},
{"id": "BOOTSTRAP_CHECKS", "old":"bootstrap-checks.html", "new": None},
{"id": "BOOTSTRAP_CHECK_ALL_PERMISSION", "old":"bootstrap-checks-all-permission.html", "new": None},
{"id": "BOOTSTRAP_CHECK_CLIENT_JVM", "old":"bootstrap-checks-client-jvm.html", "new": None},
{"id": "BOOTSTRAP_CHECK_DISCOVERY_CONFIGURATION", "old":"bootstrap-checks-discovery-configuration.html", "new": None},
{"id": "BOOTSTRAP_CHECK_EARLY_ACCESS", "old":"bootstrap-checks-early-access.html", "new": None},
{"id": "BOOTSTRAP_CHECK_ENCRYPT_SENSITIVE_DATA", "old":"bootstrap-checks-xpack.html#bootstrap-checks-xpack-encrypt-sensitive-data", "new": None},
{"id": "BOOTSTRAP_CHECK_FILE_DESCRIPTOR", "old":"bootstrap-checks-file-descriptor.html", "new": None},
{"id": "BOOTSTRAP_CHECK_HEAP_SIZE", "old":"bootstrap-checks-heap-size.html", "new": None},
{"id": "BOOTSTRAP_CHECK_MAXIMUM_MAP_COUNT", "old":"bootstrap-checks-max-map-count.html", "new": None},
{"id": "BOOTSTRAP_CHECK_MAX_FILE_SIZE", "old":"bootstrap-checks-max-file-size.html", "new": None},
{"id": "BOOTSTRAP_CHECK_MAX_NUMBER_THREADS", "old":"max-number-threads-check.html", "new": None},
{"id": "BOOTSTRAP_CHECK_MAX_SIZE_VIRTUAL_MEMORY", "old":"max-size-virtual-memory-check.html", "new": None},
{"id": "BOOTSTRAP_CHECK_MEMORY_LOCK", "old":"bootstrap-checks-memory-lock.html", "new": None},
{"id": "BOOTSTRAP_CHECK_ONERROR_AND_ONOUTOFMEMORYERROR", "old":"bootstrap-checks-onerror.html", "new": None},
{"id": "BOOTSTRAP_CHECK_PKI_REALM", "old":"bootstrap-checks-xpack.html#bootstrap-checks-xpack-pki-realm", "new": None},
{"id": "BOOTSTRAP_CHECK_ROLE_MAPPINGS", "old":"bootstrap-checks-xpack.html#bootstrap-checks-xpack-role-mappings", "new": None},
{"id": "BOOTSTRAP_CHECK_SYSTEM_CALL_FILTER", "old":"bootstrap-checks-syscall-filter.html", "new": None},
{"id": "BOOTSTRAP_CHECK_TLS", "old":"bootstrap-checks-xpack.html#bootstrap-checks-tls", "new": None},
{"id": "BOOTSTRAP_CHECK_TOKEN_SSL", "old":"bootstrap-checks-xpack.html#bootstrap-checks-xpack-token-ssl", "new": None},
{"id": "BOOTSTRAP_CHECK_USE_SERIAL_COLLECTOR", "old":"bootstrap-checks-serial-collector.html", "new": None},
{"id": "CIRCUIT_BREAKER_ERRORS", "old":"circuit-breaker-errors.html", "new": None},
{"id": "CONCURRENT_REPOSITORY_WRITERS", "old":"diagnosing-corrupted-repositories.html", "new": None},
{"id": "CONTACT_SUPPORT", "old":"troubleshooting.html#troubleshooting-contact-support", "new": None},
{"id": "DISCOVERY_TROUBLESHOOTING", "old":"discovery-troubleshooting.html", "new": None},
{"id": "EXECUTABLE_JNA_TMPDIR", "old":"executable-jna-tmpdir.html", "new": None},
{"id": "FLOOD_STAGE_WATERMARK", "old":"fix-watermark-errors.html", "new": None},
{"id": "FORMING_SINGLE_NODE_CLUSTERS", "old":"modules-discovery-bootstrap-cluster.html#modules-discovery-bootstrap-cluster-joining", "new": None},
{"id": "HTTP_TRACER", "old":"modules-network.html#http-rest-request-tracer", "new": None},
{"id": "INITIAL_MASTER_NODES", "old":"important-settings.html#initial_master_nodes", "new": None},
{"id": "LAGGING_NODE_TROUBLESHOOTING", "old":"troubleshooting-unstable-cluster.html#troubleshooting-unstable-cluster-lagging", "new": None},
{"id": "LOGGING", "old":"logging.html", "new": None},
{"id": "LUCENE_MAX_DOCS_LIMIT", "old":"size-your-shards.html#troubleshooting-max-docs-limit", "new": None},
{"id": "MAX_SHARDS_PER_NODE", "old":"size-your-shards.html#troubleshooting-max-shards-open", "new": None},
{"id": "NETWORK_BINDING_AND_PUBLISHING", "old":"modules-network.html#modules-network-binding-publishing", "new": None},
{"id": "NETWORK_DISCONNECT_TROUBLESHOOTING", "old":"troubleshooting-unstable-cluster.html#troubleshooting-unstable-cluster-network", "new": None},
{"id": "NETWORK_THREADING_MODEL", "old":"modules-network.html#modules-network-threading-model", "new": None},
{"id": "S3_COMPATIBLE_REPOSITORIES", "old":"repository-s3.html#repository-s3-compatible-services", "new": None},
{"id": "SECURE_SETTINGS", "old":"secure-settings.html", "new": None},
{"id": "SHARD_LOCK_TROUBLESHOOTING", "old":"troubleshooting-unstable-cluster.html#troubleshooting-unstable-cluster-shardlockobtainfailedexception", "new": None},
{"id": "SNAPSHOT_REPOSITORY_ANALYSIS", "old":"repo-analysis-api.html", "new": None},
{"id": "UNASSIGNED_SHARDS", "old":"red-yellow-cluster-status.html", "new": None},
{"id": "UNSTABLE_CLUSTER_TROUBLESHOOTING", "old":"troubleshooting-unstable-cluster.html", "new": None},
{"id": "X_OPAQUE_ID", "old":"api-conventions.html#x-opaque-id", "new": None}
]
for i in DOCS_LINKS:
response = requests.get(f"{OLD_ES}/current/{i['old']}", allow_redirects=True)
i["old"] = f"{OLD_ES}/8.18/{i['old']}"
i["new"] = response.url
i["final"] = ""
print(json.dumps(DOCS_LINKS))
(B)
[
{
"final": true,
"id": "ALLOCATION_EXPLAIN_API",
"new": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-allocation-explain.html"
},
{
"final": "https://www.elastic.co/docs/api/doc/elasticsearch/",
"id": "ALLOCATION_EXPLAIN_MAX_RETRY",
"new": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain#maximum-number-of-retries-exceeded",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-allocation-explain.html#maximum-number-of-retries-exceeded"
},
{
"final": "https://www.elastic.co/docs/api/doc/elasticsearch/",
"id": "ALLOCATION_EXPLAIN_NO_COPIES",
"new": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain#no-valid-shard-copy",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-allocation-explain.html#no-valid-shard-copy"
},
{
"final": "https://www.elastic.co/docs/api/doc/elasticsearch/",
"id": "ALLOCATION_EXPLAIN_SETTING_CONFLICT",
"new": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain#allocation-explain-setting-conflict",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-allocation-explain.html#allocation-explain-setting-conflict"
},
{
"final": true,
"id": "ARCHIVE_INDICES",
"new": "https://www.elastic.co/docs/deploy-manage/upgrade/deployment-or-cluster/reading-indices-from-older-elasticsearch-versions",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/archive-indices.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECKS",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_ALL_PERMISSION",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-all-permission.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_CLIENT_JVM",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-client-jvm.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_DISCOVERY_CONFIGURATION",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-discovery-configuration.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_EARLY_ACCESS",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-early-access.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_ENCRYPT_SENSITIVE_DATA",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-xpack-encrypt-sensitive-data",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-xpack.html#bootstrap-checks-xpack-encrypt-sensitive-data"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_FILE_DESCRIPTOR",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-file-descriptor.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_HEAP_SIZE",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-heap-size.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_MAXIMUM_MAP_COUNT",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-max-map-count.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_MAX_FILE_SIZE",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-max-file-size.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_MAX_NUMBER_THREADS",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/max-number-threads-check.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_MAX_SIZE_VIRTUAL_MEMORY",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/max-size-virtual-memory-check.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_MEMORY_LOCK",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-memory-lock.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_ONERROR_AND_ONOUTOFMEMORYERROR",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-onerror.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_PKI_REALM",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-xpack-pki-realm",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-xpack.html#bootstrap-checks-xpack-pki-realm"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_ROLE_MAPPINGS",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-xpack-role-mappings",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-xpack.html#bootstrap-checks-xpack-role-mappings"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_SYSTEM_CALL_FILTER",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-syscall-filter.html"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_TLS",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-tls",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-xpack.html#bootstrap-checks-tls"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_TOKEN_SSL",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-xpack-token-ssl",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-xpack.html#bootstrap-checks-xpack-token-ssl"
},
{
"final": true,
"id": "BOOTSTRAP_CHECK_USE_SERIAL_COLLECTOR",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/bootstrap-checks",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/bootstrap-checks-serial-collector.html"
},
{
"final": true,
"id": "CIRCUIT_BREAKER_ERRORS",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch/circuit-breaker-errors",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/circuit-breaker-errors.html"
},
{
"final": true,
"id": "CONCURRENT_REPOSITORY_WRITERS",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch/diagnosing-corrupted-repositories",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/diagnosing-corrupted-repositories.html"
},
{
"final": true,
"id": "CONTACT_SUPPORT",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch#troubleshooting-contact-support",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/troubleshooting.html#troubleshooting-contact-support"
},
{
"final": true,
"id": "DISCOVERY_TROUBLESHOOTING",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch/discovery-troubleshooting",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/discovery-troubleshooting.html"
},
{
"final": true,
"id": "EXECUTABLE_JNA_TMPDIR",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/executable-jna-tmpdir",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/executable-jna-tmpdir.html"
},
{
"final": true,
"id": "FLOOD_STAGE_WATERMARK",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch/fix-watermark-errors",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fix-watermark-errors.html"
},
{
"final": true,
"id": "FORMING_SINGLE_NODE_CLUSTERS",
"new": "https://www.elastic.co/docs/deploy-manage/distributed-architecture/discovery-cluster-formation/modules-discovery-bootstrap-cluster#modules-discovery-bootstrap-cluster-joining",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/modules-discovery-bootstrap-cluster.html#modules-discovery-bootstrap-cluster-joining"
},
{
"final": true,
"id": "HTTP_TRACER",
"new": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/networking-settings#http-rest-request-tracer",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/modules-network.html#http-rest-request-tracer"
},
{
"final": true,
"id": "INITIAL_MASTER_NODES",
"new": "https://www.elastic.co/docs/deploy-manage/deploy/self-managed/important-settings-configuration#initial_master_nodes",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/important-settings.html#initial_master_nodes"
},
{
"final": true,
"id": "LAGGING_NODE_TROUBLESHOOTING",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch/troubleshooting-unstable-cluster#troubleshooting-unstable-cluster-lagging",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/troubleshooting-unstable-cluster.html#troubleshooting-unstable-cluster-lagging"
},
{
"final": true,
"id": "LOGGING",
"new": "https://www.elastic.co/docs/deploy-manage/monitor/logging-configuration/update-elasticsearch-logging-levels",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logging.html"
},
{
"final": true,
"id": "LUCENE_MAX_DOCS_LIMIT",
"new": "https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/size-shards#troubleshooting-max-docs-limit",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/size-your-shards.html#troubleshooting-max-docs-limit"
},
{
"final": true,
"id": "MAX_SHARDS_PER_NODE",
"new": "https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/size-shards#troubleshooting-max-shards-open",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/size-your-shards.html#troubleshooting-max-shards-open"
},
{
"final": true,
"id": "NETWORK_BINDING_AND_PUBLISHING",
"new": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/networking-settings#modules-network-binding-publishing",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/modules-network.html#modules-network-binding-publishing"
},
{
"final": true,
"id": "NETWORK_DISCONNECT_TROUBLESHOOTING",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch/troubleshooting-unstable-cluster#troubleshooting-unstable-cluster-network",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/troubleshooting-unstable-cluster.html#troubleshooting-unstable-cluster-network"
},
{
"final": true,
"id": "NETWORK_THREADING_MODEL",
"new": "https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/networking-settings#modules-network-threading-model",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/modules-network.html#modules-network-threading-model"
},
{
"final": true,
"id": "S3_COMPATIBLE_REPOSITORIES",
"new": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository#repository-s3-compatible-services",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/repository-s3.html#repository-s3-compatible-services"
},
{
"final": true,
"id": "SECURE_SETTINGS",
"new": "https://www.elastic.co/docs/deploy-manage/security/secure-settings",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/secure-settings.html"
},
{
"final": true,
"id": "SHARD_LOCK_TROUBLESHOOTING",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch/troubleshooting-unstable-cluster#troubleshooting-unstable-cluster-shardlockobtainfailedexception",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/troubleshooting-unstable-cluster.html#troubleshooting-unstable-cluster-shardlockobtainfailedexception"
},
{
"final": true,
"id": "SNAPSHOT_REPOSITORY_ANALYSIS",
"new": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-analyze",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/repo-analysis-api.html"
},
{
"final": true,
"id": "UNASSIGNED_SHARDS",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch/red-yellow-cluster-status",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/red-yellow-cluster-status.html"
},
{
"final": true,
"id": "UNSTABLE_CLUSTER_TROUBLESHOOTING",
"new": "https://www.elastic.co/docs/troubleshoot/elasticsearch/troubleshooting-unstable-cluster",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/troubleshooting-unstable-cluster.html"
},
{
"final": true,
"id": "X_OPAQUE_ID",
"new": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#x-opaque-id",
"old": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/api-conventions.html#x-opaque-id"
}
]