Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
dynamicIndexSettings: `${ELASTIC_DOCS}reference/elasticsearch/index-settings/index-modules#dynamic-index-settings`,
indexTemplates: `${ELASTIC_DOCS}manage-data/data-store/templates`,
mapping: `${ELASTIC_DOCS}manage-data/data-store/mapping`,
mappingReference: `${ELASTIC_DOCS}reference/elasticsearch/mapping-reference`,
mappingAnalyzer: `${ELASTIC_DOCS}reference/elasticsearch/mapping-reference/analyzer`,
mappingCoerce: `${ELASTIC_DOCS}reference/elasticsearch/mapping-reference/coerce`,
mappingCopyTo: `${ELASTIC_DOCS}reference/elasticsearch/mapping-reference/copy-to`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
defaultMessage: 'Text',
}),
documentation: {
main: 'text.html',
main: 'text',
},
description: () => (
<p>
Expand Down Expand Up @@ -49,7 +49,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
defaultMessage: 'Match only text',
}),
documentation: {
main: 'text.html#match-only-text-field-type',
main: 'match-only-text',
},
description: () => (
<p>
Expand Down Expand Up @@ -78,7 +78,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
defaultMessage: 'Keyword',
}),
documentation: {
main: 'keyword.html',
main: 'keyword#keyword-field-type',
},
description: () => (
<p>
Expand Down Expand Up @@ -107,7 +107,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
defaultMessage: 'Constant keyword',
}),
documentation: {
main: 'keyword.html#constant-keyword-field-type',
main: 'keyword#constant-keyword-field-type',
},
description: () => (
<p>
Expand All @@ -127,7 +127,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
defaultMessage: 'Numeric',
}),
documentation: {
main: 'number.html',
main: 'number',
},
subTypes: {
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.numericSubtypeDescription', {
Expand Down Expand Up @@ -322,7 +322,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'date',
documentation: {
main: 'date.html',
main: 'date',
},
description: () => (
<p>
Expand All @@ -339,7 +339,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'date_nanos',
documentation: {
main: 'date_nanos.html',
main: 'date_nanos',
},
description: () => (
<p>
Expand Down Expand Up @@ -368,7 +368,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'binary',
documentation: {
main: 'binary.html',
main: 'binary',
},
description: () => (
<p>
Expand All @@ -385,7 +385,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'ip',
documentation: {
main: 'ip.html',
main: 'ip',
},
description: () => (
<p>
Expand Down Expand Up @@ -414,7 +414,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'boolean',
documentation: {
main: 'boolean.html',
main: 'boolean',
},
description: () => (
<p>
Expand All @@ -435,7 +435,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'range',
documentation: {
main: 'range.html',
main: 'range',
},
subTypes: {
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.rangeSubtypeDescription', {
Expand All @@ -457,7 +457,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'object',
documentation: {
main: 'object.html',
main: 'object',
},
description: () => (
<p>
Expand Down Expand Up @@ -486,7 +486,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'nested',
documentation: {
main: 'nested.html',
main: 'nested',
},
description: () => (
<p>
Expand Down Expand Up @@ -515,7 +515,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'rank_feature',
documentation: {
main: 'rank-feature.html',
main: 'rank-feature',
},
description: () => (
<p>
Expand Down Expand Up @@ -544,7 +544,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'rank_features',
documentation: {
main: 'rank-features.html',
main: 'rank-features',
},
description: () => (
<p>
Expand Down Expand Up @@ -572,14 +572,17 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
defaultMessage: 'Passthrough',
}),
value: 'passthrough',
documentation: {
main: 'passthrough',
},
},
dense_vector: {
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.denseVectorDescription', {
defaultMessage: 'Dense vector',
}),
value: 'dense_vector',
documentation: {
main: 'dense-vector.html',
main: 'dense-vector',
},
description: () => (
<p>
Expand Down Expand Up @@ -680,7 +683,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'geo_point',
documentation: {
main: 'geo-point.html',
main: 'geo-point',
},
description: () => (
<p>
Expand All @@ -697,8 +700,8 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'geo_shape',
documentation: {
main: 'geo-shape.html',
learnMore: '/geo-shape.html#geoshape-indexing-approach',
main: 'geo-shape',
learnMore: 'geo-shape#geoshape-indexing-approach',
},
description: () => (
<p>
Expand Down Expand Up @@ -730,7 +733,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'completion',
documentation: {
main: 'search-suggesters.html#completion-suggester',
main: 'completion',
},
description: () => (
<p>
Expand All @@ -747,7 +750,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'token_count',
documentation: {
main: 'token-count.html',
main: 'token-count',
},
description: () => (
<p>
Expand All @@ -764,7 +767,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'percolator',
documentation: {
main: 'percolator.html',
main: 'percolator',
},
description: () => (
<p>
Expand Down Expand Up @@ -793,7 +796,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'histogram',
documentation: {
main: 'histogram.html',
main: 'histogram',
},
description: () => (
<p>
Expand All @@ -810,7 +813,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'join',
documentation: {
main: 'parent-join.html',
main: 'parent-join',
},
description: () => (
<p>
Expand All @@ -827,7 +830,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'alias',
documentation: {
main: 'alias.html',
main: 'field-alias',
},
description: () => (
<p>
Expand All @@ -844,7 +847,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'search_as_you_type',
documentation: {
main: 'search-as-you-type.html',
main: 'search-as-you-type',
},
description: () => (
<p>
Expand All @@ -861,7 +864,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'flattened',
documentation: {
main: 'flattened.html',
main: 'flattened',
},
description: () => (
<p>
Expand All @@ -878,7 +881,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'shape',
documentation: {
main: 'shape.html',
main: 'shape',
},
description: () => (
<p>
Expand All @@ -895,7 +898,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'sparse_vector',
documentation: {
main: 'sparse-vector.html',
main: 'sparse-vector',
},
description: () => (
<p>
Expand All @@ -912,7 +915,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'semantic_text',
documentation: {
main: 'semantic-text.html',
main: 'semantic-text',
},
description: () => (
<p>
Expand All @@ -929,7 +932,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'point',
documentation: {
main: 'point.html',
main: 'point',
},
description: () => (
<p>
Expand All @@ -949,7 +952,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'version',
documentation: {
main: 'version.html',
main: 'version',
},
description: () => (
<p>
Expand Down Expand Up @@ -978,7 +981,7 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
}),
value: 'wildcard',
documentation: {
main: 'keyword.html#wildcard-field-type',
main: 'keyword#wildcard-field-type',
},
description: () => (
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class DocumentationService {
private bulkApi: string = '';
private updateExistingDS: string = '';
private enrichIngestData: string = '';
private mappingReference: string = '';

public setup(docLinks: DocLinksStart): void {
const { links } = docLinks;
Expand Down Expand Up @@ -114,6 +115,7 @@ class DocumentationService {
this.mappingParameters = links.elasticsearch.mappingParameters;
this.mappingPositionIncrementGap = links.elasticsearch.mappingPositionIncrementGap;
this.mappingRankFeatureFields = links.elasticsearch.mappingRankFeatureFields;
this.mappingReference = links.elasticsearch.mappingReference;
this.mappingRouting = links.elasticsearch.mappingRouting;
this.mappingSimilarity = links.elasticsearch.mappingSimilarity;
this.mappingSourceFields = links.elasticsearch.mappingSourceFields;
Expand Down Expand Up @@ -179,7 +181,7 @@ class DocumentationService {
) {
return undefined;
}
return `${this.esDocsBase}${typeDefinition.documentation[docType]}`;
return `${this.mappingReference}/${typeDefinition.documentation[docType]}`;
};
public getMappingTypesLink() {
return this.mappingFieldDataTypes;
Expand Down