Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mappings editor] add descriptions for data types #54817

Merged
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 @@ -50,6 +50,26 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
documentation: {
main: '/keyword.html',
},
description: () => (
<p>
<FormattedMessage
id="xpack.idxMgmt.mappingsEditor.dataType.keywordLongDescription"
defaultMessage="Keyword fields support search by their exact value. This data type is useful for filtering, sorting, and aggregations. To index full-text content, such as an email body, use the {textType}."
values={{
textType: (
<EuiLink href={documentationService.getTypeDocLink('text')} target="_blank">
{i18n.translate(
'xpack.idxMgmt.mappingsEditor.dataType.keywordLongDescription.textTypeLink',
{
defaultMessage: 'text data type',
}
)}
</EuiLink>
),
}}
/>
</p>
),
},
numeric: {
value: 'numeric',
Expand Down Expand Up @@ -293,6 +313,14 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
documentation: {
main: '/dense-vector.html',
},
description: () => (
<p>
<FormattedMessage
id="xpack.idxMgmt.mappingsEditor.dataType.denseVectorLongDescription"
defaultMessage="Dense vector fields store dense vectors of float values. This data type is useful for document scoring."
/>
</p>
),
},
date_range: {
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.dateRangeDescription', {
Expand Down Expand Up @@ -436,6 +464,14 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
documentation: {
main: '/search-suggesters.html#completion-suggester',
},
description: () => (
<p>
<FormattedMessage
id="xpack.idxMgmt.mappingsEditor.dataType.completionSuggesterLongDescription"
defaultMessage="Completion suggester fields support autocomplete functionality. This data type uses data structures to enable fast lookups, but are costly to build and stored in-memory."
/>
</p>
),
},
token_count: {
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.tokenCountDescription', {
Expand All @@ -445,6 +481,14 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
documentation: {
main: '/token-count.html',
},
description: () => (
<p>
<FormattedMessage
id="xpack.idxMgmt.mappingsEditor.dataType.tokenCountLongDescription"
defaultMessage="Token count fields accept string values. These values are analyzed, then the number of tokens in the string are indexed."
/>
</p>
),
},
percolator: {
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.percolatorDescription', {
Expand Down Expand Up @@ -472,6 +516,14 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
documentation: {
main: '/alias.html',
},
description: () => (
<p>
<FormattedMessage
id="xpack.idxMgmt.mappingsEditor.dataType.aliasLongDescription"
defaultMessage="Alias fields accept an alternative name for a field in the index. Aliases can be used in place of the target field in search requests."
/>
</p>
),
},
search_as_you_type: {
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.searchAsYouTypeDescription', {
Expand All @@ -481,6 +533,14 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
documentation: {
main: '/search-as-you-type.html',
},
description: () => (
<p>
<FormattedMessage
id="xpack.idxMgmt.mappingsEditor.dataType.searchAsYouTypeLongDescription"
defaultMessage="Search-as-you-type fields supports as-you-type search by breaking strings into a series of subfields. Both prefix completion and infix completion are supported."
/>
</p>
),
},
flattened: {
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.flattenedDescription', {
Expand All @@ -490,6 +550,14 @@ export const TYPE_DEFINITION: { [key in DataType]: DataTypeDefinition } = {
documentation: {
main: '/flattened.html',
},
description: () => (
<p>
<FormattedMessage
id="xpack.idxMgmt.mappingsEditor.dataType.flattenedLongDescription"
defaultMessage="Flattened fields map an entire field as a single object. This data type is useful for indexing objects with a large or unknown number of unique keys. Flattened fields only support basic queries."
/>
</p>
),
},
shape: {
label: i18n.translate('xpack.idxMgmt.mappingsEditor.dataType.shapeDescription', {
Expand Down