Skip to content
Merged
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 @@ -129,11 +129,10 @@ Calculates the rate of an ever increasing counter. This function will only yield
If the value does get smaller, it will interpret this as a counter reset. To get most precise results, \`counter_rate\` should be calculated on the \`max\` of a field.

This calculation will be done separately for separate series defined by filters or top values dimensions.
It uses the current interval when used in Formula.

Example: Visualize the rate of bytes received over time by a memcached server:
\`\`\`
counter_rate(max(memcached.stats.read.bytes))
\`\`\`
${'`counter_rate(max(memcached.stats.read.bytes))`'}
`,
}),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ Calculates the cumulative sum of a metric over time, adding all previous values
This calculation will be done separately for separate series defined by filters or top values dimensions.

Example: Visualize the received bytes accumulated over time:
\`\`\`
cumulative_sum(sum(bytes))
\`\`\`
${'`cumulative_sum(sum(bytes))`'}
`,
}),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ Differences requires the data to be sequential. If your data is empty when using
This calculation will be done separately for separate series defined by filters or top values dimensions.

Example: Visualize the change in bytes received over time:
\`\`\`
differences(sum(bytes))
\`\`\`
${'`differences(sum(bytes))`'}
`,
}),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ This calculation will be done separately for separate series defined by filters
Takes a named parameter \`window\` which specifies how many last values to include in the average calculation for the current value.

Example: Smooth a line of measurements:
\`\`\`
moving_average(sum(bytes), window=5)
\`\`\`
${'`moving_average(sum(bytes), window=5)`'}
`,
values: {
defaultValue: WINDOW_DEFAULT_VALUE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,17 @@ export const cardinalityOperation: OperationDefinition<CardinalityIndexPatternCo
documentation: {
section: 'elasticsearch',
signature: i18n.translate('xpack.lens.indexPattern.cardinality.signature', {
defaultMessage: 'field: string, [kql]?: string, [lucene]?: string',
defaultMessage: 'field: string',
}),
description: i18n.translate('xpack.lens.indexPattern.cardinality.documentation', {
defaultMessage: `
Calculates the number of unique values of a specified field. Works for number, string, date and boolean values.

Example: Calculate the number of different products:
\`\`\`
unique_count(product.name)
\`\`\`
${'`unique_count(product.name)`'}

Example: Calculate the number of different products from the "clothes" group:
\`\`\`
unique_count(product.name, kql="product.group=clothes")
\`\`\`
${"`unique_count(product.name, kql='product.group=clothes')`"}
`,
}),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,16 @@ export const countOperation: OperationDefinition<CountIndexPatternColumn, 'field
filterable: true,
documentation: {
section: 'elasticsearch',
signature: i18n.translate('xpack.lens.indexPattern.count.signature', {
defaultMessage: '[kql]?: string, [lucene]?: string',
}),
signature: '',
description: i18n.translate('xpack.lens.indexPattern.count.documentation', {
defaultMessage: `
Calculates the number of documents.

Example: Calculate the number of documents:
\`\`\`
count()
\`\`\`
${'`count()`'}

Example: Calculate the number of documents matching a certain filter:
\`\`\`
count(kql="price > 500")
\`\`\`
${"`count(kql='price > 500')`"}
`,
}),
},
Expand Down
Loading