Skip to content

Commit

Permalink
improve user-facing text
Browse files Browse the repository at this point in the history
  • Loading branch information
drewdaemon committed Apr 15, 2022
1 parent 500a3d6 commit eaee5be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ export const termsOperation: OperationDefinition<TermsIndexPatternColumn, 'field
<EuiIconTip
color="subdued"
content={i18n.translate('xpack.lens.indexPattern.terms.accuracyModeHelp', {
defaultMessage: `Can improve accuracy for high cardinality datasets by using more resources in your Elasticsearch cluster.`,
defaultMessage: `Improves results for high-cardinality data, but increases the load on the Elasticsearch cluster.`,
})}
iconProps={{
className: 'eui-alignTop',
Expand Down
17 changes: 9 additions & 8 deletions x-pack/plugins/lens/public/indexpattern_datasource/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ const accuracyModeDisabledWarning = (
<>
<FormattedMessage
id="xpack.lens.indexPattern.precisionErrorWarning.accuracyDisabled"
defaultMessage="{name} for this visualization may be approximate due to how the data is indexed. If you need this field to be more exact, try enabling accuracy mode (this may impact performance). To learn more about this limit, {link}."
defaultMessage="Top 5 values for {name} might be an approximation. You can enable accuracy mode for more precise results, but note that it increases the load on the Elasticsearch cluster. {learnMoreLink}"
values={{
name: <EuiTextColor color="accent">{columnName}</EuiTextColor>,
link: (
learnMoreLink: (
<EuiLink href={docLink} color="text" target="_blank" external={true}>
<FormattedMessage
defaultMessage="visit the documentation"
defaultMessage="Learn more."
id="xpack.lens.indexPattern.precisionErrorWarning.link"
/>
</EuiLink>
Expand All @@ -125,29 +125,30 @@ const accuracyModeDisabledWarning = (
const accuracyModeEnabledWarning = (columnName: string, docLink: string) => (
<FormattedMessage
id="xpack.lens.indexPattern.precisionErrorWarning.accuracyEnabled"
defaultMessage="{name} for this visualization may be approximate due to how the data is indexed. Try increasing the number of {topValues} or use {filters} instead of {topValues} for precise results. To learn more about this limit, {link}."
// defaultMessage="{name} for this visualization may be approximate due to how the data is indexed. Try increasing the number of {topValues} or use {filters} instead of {topValues} for precise results. To learn more about this limit, {link}."
defaultMessage="Top 5 values for {name} might be an approximation. For more precise results, try increasing the number of {topValues} or using {filters} instead. {learnMoreLink}"
values={{
name: <EuiTextColor color="accent">{columnName}</EuiTextColor>,
topValues: (
<EuiTextColor color="subdued">
<FormattedMessage
id="xpack.lens.indexPattern.precisionErrorWarning.topValues"
defaultMessage="Top values"
defaultMessage="top values"
/>
</EuiTextColor>
),
filters: (
<EuiTextColor color="subdued">
<FormattedMessage
id="xpack.lens.indexPattern.precisionErrorWarning.filters"
defaultMessage="Filters"
defaultMessage="filters"
/>
</EuiTextColor>
),
link: (
learnMoreLink: (
<EuiLink href={docLink} color="text" target="_blank" external={true}>
<FormattedMessage
defaultMessage="visit the documentation"
defaultMessage="Learn more."
id="xpack.lens.indexPattern.precisionErrorWarning.link"
/>
</EuiLink>
Expand Down

0 comments on commit eaee5be

Please sign in to comment.