Skip to content

Commit 841910d

Browse files
[9.1] [Index Management] Fix mappings docs links (elastic#240028) (elastic#240836)
# Backport This will backport the following commits from `main` to `9.1`: - [[Index Management] Fix mappings docs links (elastic#240028)](elastic#240028) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sonia Sanz Vivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-10-27T14:50:57Z","message":"[Index Management] Fix mappings docs links (elastic#240028)\n\nFixes https://github.com/elastic/kibana/issues/222270\n\n## Summary\nIt seems that elastic#219656 caused a\nregression in the mapping types documentation links. I've updated them\nto point to:\n\n`https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/{field-data-type}`\n\n### How to test\n* Navigate to Index Mapping (it doesn't matter if you test it in\nserverless or not)\n* Create a new index\n* Got to the mappings tab\n* Select some mapping type and verify that the documentation link\nredirect to a valid url\n* Save some mapping and click edit. Verify that the documentation link\nin the flyout also redirects to a valid url\n<img width=\"764\" height=\"290\" alt=\"Screenshot 2025-10-22 at 10 57 32\"\nsrc=\"https://github.com/user-attachments/assets/bf87cbcd-49e5-4c3c-8715-a809aca2baa0\"\n/>\n\n<img width=\"1044\" height=\"323\" alt=\"Screenshot 2025-10-22 at 10 57 41\"\nsrc=\"https://github.com/user-attachments/assets/ff0f3ea9-628a-4632-90de-a0dfc0021beb\"\n/>","sha":"de37192ae03871f7152ce8dca09f55871a8a03bf","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","backport:version","v9.1.3","v9.3.0","v9.0.9","v9.2.1"],"title":"[Index Management] Fix mappings docs links","number":240028,"url":"https://github.com/elastic/kibana/pull/240028","mergeCommit":{"message":"[Index Management] Fix mappings docs links (elastic#240028)\n\nFixes https://github.com/elastic/kibana/issues/222270\n\n## Summary\nIt seems that elastic#219656 caused a\nregression in the mapping types documentation links. I've updated them\nto point to:\n\n`https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/{field-data-type}`\n\n### How to test\n* Navigate to Index Mapping (it doesn't matter if you test it in\nserverless or not)\n* Create a new index\n* Got to the mappings tab\n* Select some mapping type and verify that the documentation link\nredirect to a valid url\n* Save some mapping and click edit. Verify that the documentation link\nin the flyout also redirects to a valid url\n<img width=\"764\" height=\"290\" alt=\"Screenshot 2025-10-22 at 10 57 32\"\nsrc=\"https://github.com/user-attachments/assets/bf87cbcd-49e5-4c3c-8715-a809aca2baa0\"\n/>\n\n<img width=\"1044\" height=\"323\" alt=\"Screenshot 2025-10-22 at 10 57 41\"\nsrc=\"https://github.com/user-attachments/assets/ff0f3ea9-628a-4632-90de-a0dfc0021beb\"\n/>","sha":"de37192ae03871f7152ce8dca09f55871a8a03bf"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","9.0","9.2"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/240028","number":240028,"mergeCommit":{"message":"[Index Management] Fix mappings docs links (elastic#240028)\n\nFixes https://github.com/elastic/kibana/issues/222270\n\n## Summary\nIt seems that elastic#219656 caused a\nregression in the mapping types documentation links. I've updated them\nto point to:\n\n`https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/{field-data-type}`\n\n### How to test\n* Navigate to Index Mapping (it doesn't matter if you test it in\nserverless or not)\n* Create a new index\n* Got to the mappings tab\n* Select some mapping type and verify that the documentation link\nredirect to a valid url\n* Save some mapping and click edit. Verify that the documentation link\nin the flyout also redirects to a valid url\n<img width=\"764\" height=\"290\" alt=\"Screenshot 2025-10-22 at 10 57 32\"\nsrc=\"https://github.com/user-attachments/assets/bf87cbcd-49e5-4c3c-8715-a809aca2baa0\"\n/>\n\n<img width=\"1044\" height=\"323\" alt=\"Screenshot 2025-10-22 at 10 57 41\"\nsrc=\"https://github.com/user-attachments/assets/ff0f3ea9-628a-4632-90de-a0dfc0021beb\"\n/>","sha":"de37192ae03871f7152ce8dca09f55871a8a03bf"}},{"branch":"9.0","label":"v9.0.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sonia Sanz Vivas <[email protected]>
1 parent 7101edb commit 841910d

File tree

3 files changed

+40
-34
lines changed

3 files changed

+40
-34
lines changed

src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
345345
dynamicIndexSettings: `${ELASTIC_DOCS}reference/elasticsearch/index-settings/index-modules#dynamic-index-settings`,
346346
indexTemplates: `${ELASTIC_DOCS}manage-data/data-store/templates`,
347347
mapping: `${ELASTIC_DOCS}manage-data/data-store/mapping`,
348+
mappingReference: `${ELASTIC_DOCS}reference/elasticsearch/mapping-reference`,
348349
mappingAnalyzer: `${ELASTIC_DOCS}reference/elasticsearch/mapping-reference/analyzer`,
349350
mappingCoerce: `${ELASTIC_DOCS}reference/elasticsearch/mapping-reference/coerce`,
350351
mappingCopyTo: `${ELASTIC_DOCS}reference/elasticsearch/mapping-reference/copy-to`,

x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/constants/data_types_definition.tsx

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
2020
defaultMessage: 'Text',
2121
}),
2222
documentation: {
23-
main: 'text.html',
23+
main: 'text',
2424
},
2525
description: () => (
2626
<p>
@@ -49,7 +49,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
4949
defaultMessage: 'Match only text',
5050
}),
5151
documentation: {
52-
main: 'text.html#match-only-text-field-type',
52+
main: 'match-only-text',
5353
},
5454
description: () => (
5555
<p>
@@ -78,7 +78,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
7878
defaultMessage: 'Keyword',
7979
}),
8080
documentation: {
81-
main: 'keyword.html',
81+
main: 'keyword#keyword-field-type',
8282
},
8383
description: () => (
8484
<p>
@@ -107,7 +107,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
107107
defaultMessage: 'Constant keyword',
108108
}),
109109
documentation: {
110-
main: 'keyword.html#constant-keyword-field-type',
110+
main: 'keyword#constant-keyword-field-type',
111111
},
112112
description: () => (
113113
<p>
@@ -127,7 +127,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
127127
defaultMessage: 'Numeric',
128128
}),
129129
documentation: {
130-
main: 'number.html',
130+
main: 'number',
131131
},
132132
subTypes: {
133133
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.numericSubtypeDescription', {
@@ -322,7 +322,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
322322
}),
323323
value: 'date',
324324
documentation: {
325-
main: 'date.html',
325+
main: 'date',
326326
},
327327
description: () => (
328328
<p>
@@ -339,7 +339,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
339339
}),
340340
value: 'date_nanos',
341341
documentation: {
342-
main: 'date_nanos.html',
342+
main: 'date_nanos',
343343
},
344344
description: () => (
345345
<p>
@@ -368,7 +368,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
368368
}),
369369
value: 'binary',
370370
documentation: {
371-
main: 'binary.html',
371+
main: 'binary',
372372
},
373373
description: () => (
374374
<p>
@@ -385,7 +385,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
385385
}),
386386
value: 'ip',
387387
documentation: {
388-
main: 'ip.html',
388+
main: 'ip',
389389
},
390390
description: () => (
391391
<p>
@@ -414,7 +414,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
414414
}),
415415
value: 'boolean',
416416
documentation: {
417-
main: 'boolean.html',
417+
main: 'boolean',
418418
},
419419
description: () => (
420420
<p>
@@ -435,7 +435,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
435435
}),
436436
value: 'range',
437437
documentation: {
438-
main: 'range.html',
438+
main: 'range',
439439
},
440440
subTypes: {
441441
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.rangeSubtypeDescription', {
@@ -457,7 +457,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
457457
}),
458458
value: 'object',
459459
documentation: {
460-
main: 'object.html',
460+
main: 'object',
461461
},
462462
description: () => (
463463
<p>
@@ -486,7 +486,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
486486
}),
487487
value: 'nested',
488488
documentation: {
489-
main: 'nested.html',
489+
main: 'nested',
490490
},
491491
description: () => (
492492
<p>
@@ -515,7 +515,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
515515
}),
516516
value: 'rank_feature',
517517
documentation: {
518-
main: 'rank-feature.html',
518+
main: 'rank-feature',
519519
},
520520
description: () => (
521521
<p>
@@ -544,7 +544,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
544544
}),
545545
value: 'rank_features',
546546
documentation: {
547-
main: 'rank-features.html',
547+
main: 'rank-features',
548548
},
549549
description: () => (
550550
<p>
@@ -572,14 +572,17 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
572572
defaultMessage: 'Passthrough',
573573
}),
574574
value: 'passthrough',
575+
documentation: {
576+
main: 'passthrough',
577+
},
575578
},
576579
dense_vector: {
577580
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.denseVectorDescription', {
578581
defaultMessage: 'Dense vector',
579582
}),
580583
value: 'dense_vector',
581584
documentation: {
582-
main: 'dense-vector.html',
585+
main: 'dense-vector',
583586
},
584587
description: () => (
585588
<p>
@@ -680,7 +683,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
680683
}),
681684
value: 'geo_point',
682685
documentation: {
683-
main: 'geo-point.html',
686+
main: 'geo-point',
684687
},
685688
description: () => (
686689
<p>
@@ -697,8 +700,8 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
697700
}),
698701
value: 'geo_shape',
699702
documentation: {
700-
main: 'geo-shape.html',
701-
learnMore: '/geo-shape.html#geoshape-indexing-approach',
703+
main: 'geo-shape',
704+
learnMore: 'geo-shape#geoshape-indexing-approach',
702705
},
703706
description: () => (
704707
<p>
@@ -730,7 +733,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
730733
}),
731734
value: 'completion',
732735
documentation: {
733-
main: 'search-suggesters.html#completion-suggester',
736+
main: 'completion',
734737
},
735738
description: () => (
736739
<p>
@@ -747,7 +750,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
747750
}),
748751
value: 'token_count',
749752
documentation: {
750-
main: 'token-count.html',
753+
main: 'token-count',
751754
},
752755
description: () => (
753756
<p>
@@ -764,7 +767,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
764767
}),
765768
value: 'percolator',
766769
documentation: {
767-
main: 'percolator.html',
770+
main: 'percolator',
768771
},
769772
description: () => (
770773
<p>
@@ -793,7 +796,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
793796
}),
794797
value: 'histogram',
795798
documentation: {
796-
main: 'histogram.html',
799+
main: 'histogram',
797800
},
798801
description: () => (
799802
<p>
@@ -810,7 +813,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
810813
}),
811814
value: 'join',
812815
documentation: {
813-
main: 'parent-join.html',
816+
main: 'parent-join',
814817
},
815818
description: () => (
816819
<p>
@@ -827,7 +830,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
827830
}),
828831
value: 'alias',
829832
documentation: {
830-
main: 'alias.html',
833+
main: 'field-alias',
831834
},
832835
description: () => (
833836
<p>
@@ -844,7 +847,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
844847
}),
845848
value: 'search_as_you_type',
846849
documentation: {
847-
main: 'search-as-you-type.html',
850+
main: 'search-as-you-type',
848851
},
849852
description: () => (
850853
<p>
@@ -861,7 +864,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
861864
}),
862865
value: 'flattened',
863866
documentation: {
864-
main: 'flattened.html',
867+
main: 'flattened',
865868
},
866869
description: () => (
867870
<p>
@@ -878,7 +881,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
878881
}),
879882
value: 'shape',
880883
documentation: {
881-
main: 'shape.html',
884+
main: 'shape',
882885
},
883886
description: () => (
884887
<p>
@@ -895,7 +898,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
895898
}),
896899
value: 'sparse_vector',
897900
documentation: {
898-
main: 'sparse-vector.html',
901+
main: 'sparse-vector',
899902
},
900903
description: () => (
901904
<p>
@@ -912,7 +915,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
912915
}),
913916
value: 'semantic_text',
914917
documentation: {
915-
main: 'semantic-text.html',
918+
main: 'semantic-text',
916919
},
917920
description: () => (
918921
<p>
@@ -929,7 +932,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
929932
}),
930933
value: 'point',
931934
documentation: {
932-
main: 'point.html',
935+
main: 'point',
933936
},
934937
description: () => (
935938
<p>
@@ -949,7 +952,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
949952
}),
950953
value: 'version',
951954
documentation: {
952-
main: 'version.html',
955+
main: 'version',
953956
},
954957
description: () => (
955958
<p>
@@ -978,7 +981,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
978981
}),
979982
value: 'wildcard',
980983
documentation: {
981-
main: 'keyword.html#wildcard-field-type',
984+
main: 'keyword#wildcard-field-type',
982985
},
983986
description: () => (
984987
<p>

x-pack/platform/plugins/shared/index_management/public/application/services/documentation.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class DocumentationService {
6969
private bulkApi: string = '';
7070
private updateExistingDS: string = '';
7171
private enrichIngestData: string = '';
72+
private mappingReference: string = '';
7273

7374
public setup(docLinks: DocLinksStart): void {
7475
const { links } = docLinks;
@@ -114,6 +115,7 @@ class DocumentationService {
114115
this.mappingParameters = links.elasticsearch.mappingParameters;
115116
this.mappingPositionIncrementGap = links.elasticsearch.mappingPositionIncrementGap;
116117
this.mappingRankFeatureFields = links.elasticsearch.mappingRankFeatureFields;
118+
this.mappingReference = links.elasticsearch.mappingReference;
117119
this.mappingRouting = links.elasticsearch.mappingRouting;
118120
this.mappingSimilarity = links.elasticsearch.mappingSimilarity;
119121
this.mappingSourceFields = links.elasticsearch.mappingSourceFields;
@@ -179,7 +181,7 @@ class DocumentationService {
179181
) {
180182
return undefined;
181183
}
182-
return `${this.esDocsBase}${typeDefinition.documentation[docType]}`;
184+
return `${this.mappingReference}/${typeDefinition.documentation[docType]}`;
183185
};
184186
public getMappingTypesLink() {
185187
return this.mappingFieldDataTypes;

0 commit comments

Comments
 (0)