mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ES|QL] Update the definitions / docs scripts with the new paths from ES (#214321)
## Summary Based on the changes here https://github.com/elastic/elasticsearch/pull/124312/ changes the paths of the ES docs and definitions
This commit is contained in:
parent
3cf9ec095a
commit
296aff2abb
9 changed files with 580 additions and 564 deletions
|
@ -40,9 +40,12 @@ function loadFunctionDocs(pathToElasticsearch: string) {
|
|||
// Define the directory path
|
||||
const definitionsPath = path.join(
|
||||
pathToElasticsearch,
|
||||
'/docs/reference/esql/functions/kibana/definition'
|
||||
'/docs/reference/query-languages/esql/kibana/definition/functions'
|
||||
);
|
||||
const docsPath = path.join(
|
||||
pathToElasticsearch,
|
||||
'/docs/reference/query-languages/esql/kibana/docs/functions'
|
||||
);
|
||||
const docsPath = path.join(pathToElasticsearch, '/docs/reference/esql/functions/kibana/docs');
|
||||
|
||||
// Read the directory
|
||||
const docsFiles = fs.readdirSync(docsPath);
|
||||
|
|
|
@ -37,7 +37,7 @@ export const functions = {
|
|||
enableSoftLineBreaks
|
||||
markdownContent={i18n.translate('languageDocumentation.documentationESQL.avg.markdown', {
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### AVG
|
||||
|
@ -70,7 +70,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.count.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### COUNT
|
||||
|
@ -104,7 +104,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.count_distinct.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### COUNT_DISTINCT
|
||||
|
@ -136,7 +136,7 @@ export const functions = {
|
|||
enableSoftLineBreaks
|
||||
markdownContent={i18n.translate('languageDocumentation.documentationESQL.max.markdown', {
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### MAX
|
||||
|
@ -169,7 +169,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.median.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### MEDIAN
|
||||
|
@ -204,13 +204,13 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.median_absolute_deviation.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### MEDIAN_ABSOLUTE_DEVIATION
|
||||
Returns the median absolute deviation, a measure of variability. It is a robust statistic, meaning that it is useful for describing data that may have outliers, or may not be normally distributed. For such data it can be more descriptive than standard deviation.
|
||||
|
||||
It is calculated as the median of each data point's deviation from the median of the entire sample. That is, for a random variable \`X\`, the median absolute deviation is \`median(|median(X) - X|)\`.
|
||||
It is calculated as the median of each data point’s deviation from the median of the entire sample. That is, for a random variable \`X\`, the median absolute deviation is \`median(|median(X) - X|)\`.
|
||||
|
||||
\`\`\`
|
||||
FROM employees
|
||||
|
@ -239,7 +239,7 @@ export const functions = {
|
|||
enableSoftLineBreaks
|
||||
markdownContent={i18n.translate('languageDocumentation.documentationESQL.min.markdown', {
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### MIN
|
||||
|
@ -272,7 +272,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.percentile.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### PERCENTILE
|
||||
|
@ -308,7 +308,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.st_centroid_agg.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### ST_CENTROID_AGG
|
||||
|
@ -342,7 +342,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.st_extent_agg.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### ST_EXTENT_AGG
|
||||
|
@ -377,7 +377,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.std_dev.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### STD_DEV
|
||||
|
@ -409,7 +409,7 @@ export const functions = {
|
|||
enableSoftLineBreaks
|
||||
markdownContent={i18n.translate('languageDocumentation.documentationESQL.sum.markdown', {
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### SUM
|
||||
|
@ -440,7 +440,7 @@ export const functions = {
|
|||
enableSoftLineBreaks
|
||||
markdownContent={i18n.translate('languageDocumentation.documentationESQL.top.markdown', {
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### TOP
|
||||
|
@ -473,11 +473,11 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.values.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### VALUES
|
||||
Returns all values in a group as a multivalued field. The order of the returned values isn't guaranteed. If you need the values returned in order use esql-mv_sort.
|
||||
Returns all values in a group as a multivalued field. The order of the returned values isn’t guaranteed. If you need the values returned in order use esql-mv_sort.
|
||||
|
||||
\`\`\`
|
||||
FROM employees
|
||||
|
@ -509,7 +509,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.weighted_avg.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### WEIGHTED_AVG
|
||||
|
|
|
@ -39,7 +39,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.bucket.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### BUCKET
|
||||
|
@ -76,7 +76,7 @@ export const functions = {
|
|||
'languageDocumentation.documentationESQL.categorize.markdown',
|
||||
{
|
||||
defaultMessage: `<!--
|
||||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### CATEGORIZE
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -912,7 +912,12 @@ ${
|
|||
|
||||
const ESFunctionDefinitionsDirectory = join(
|
||||
pathToElasticsearch,
|
||||
'docs/reference/esql/functions/kibana/definition'
|
||||
'/docs/reference/query-languages/esql/kibana/definition/functions'
|
||||
);
|
||||
|
||||
const ESOperatorsDefinitionsDirectory = join(
|
||||
pathToElasticsearch,
|
||||
'/docs/reference/query-languages/esql/kibana/definition/operators'
|
||||
);
|
||||
|
||||
// read all ES function definitions (the directory is full of JSON files) and create an array of definitions
|
||||
|
@ -920,12 +925,18 @@ ${
|
|||
JSON.parse(readFileSync(`${ESFunctionDefinitionsDirectory}/${file}`, 'utf-8'))
|
||||
);
|
||||
|
||||
const ESFOperatorDefinitions = readdirSync(ESOperatorsDefinitionsDirectory).map((file) =>
|
||||
JSON.parse(readFileSync(`${ESOperatorsDefinitionsDirectory}/${file}`, 'utf-8'))
|
||||
);
|
||||
|
||||
const allFunctionDefinitions = ESFunctionDefinitions.concat(ESFOperatorDefinitions);
|
||||
|
||||
const scalarFunctionDefinitions: FunctionDefinition[] = [];
|
||||
const aggFunctionDefinitions: FunctionDefinition[] = [];
|
||||
const operatorDefinitions: FunctionDefinition[] = [];
|
||||
const groupingFunctionDefinitions: FunctionDefinition[] = [];
|
||||
|
||||
for (const ESDefinition of ESFunctionDefinitions) {
|
||||
for (const ESDefinition of allFunctionDefinitions) {
|
||||
if (aliases.has(ESDefinition.name) || excludedFunctions.has(ESDefinition.name)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -973,7 +973,7 @@ const medianAbsoluteDeviationDefinition: FunctionDefinition = {
|
|||
'kbn-esql-validation-autocomplete.esql.definitions.median_absolute_deviation',
|
||||
{
|
||||
defaultMessage:
|
||||
"Returns the median absolute deviation, a measure of variability. It is a robust statistic, meaning that it is useful for describing data that may have outliers, or may not be normally distributed. For such data it can be more descriptive than standard deviation.\n\nIt is calculated as the median of each data point's deviation from the median of the entire sample. That is, for a random variable `X`, the median absolute deviation is `median(|median(X) - X|)`.",
|
||||
'Returns the median absolute deviation, a measure of variability. It is a robust statistic, meaning that it is useful for describing data that may have outliers, or may not be normally distributed. For such data it can be more descriptive than standard deviation.\n\nIt is calculated as the median of each data point’s deviation from the median of the entire sample. That is, for a random variable `X`, the median absolute deviation is `median(|median(X) - X|)`.',
|
||||
}
|
||||
),
|
||||
preview: false,
|
||||
|
@ -1702,7 +1702,7 @@ const valuesDefinition: FunctionDefinition = {
|
|||
name: 'values',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.values', {
|
||||
defaultMessage:
|
||||
"Returns all values in a group as a multivalued field. The order of the returned values isn't guaranteed. If you need the values returned in order use esql-mv_sort.",
|
||||
'Returns all values in a group as a multivalued field. The order of the returned values isn’t guaranteed. If you need the values returned in order use esql-mv_sort.',
|
||||
}),
|
||||
preview: true,
|
||||
alias: undefined,
|
||||
|
|
|
@ -831,7 +831,7 @@ const bucketDefinition: FunctionDefinition = {
|
|||
'FROM employees\n| WHERE hire_date >= "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 1 week)\n| SORT week',
|
||||
'FROM employees\n| STATS COUNT(*) by bs = BUCKET(salary, 20, 25324, 74999)\n| SORT bs',
|
||||
'FROM employees\n| WHERE hire_date >= "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z"\n| STATS c = COUNT(1) BY b = BUCKET(salary, 5000.)\n| SORT b',
|
||||
'FROM sample_data \n| WHERE @timestamp >= NOW() - 1 day and @timestamp < NOW()\n| STATS COUNT(*) BY bucket = BUCKET(@timestamp, 25, NOW() - 1 day, NOW())',
|
||||
'FROM sample_data\n| WHERE @timestamp >= NOW() - 1 day and @timestamp < NOW()\n| STATS COUNT(*) BY bucket = BUCKET(@timestamp, 25, NOW() - 1 day, NOW())',
|
||||
'FROM employees\n| WHERE hire_date >= "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z"\n| STATS AVG(salary) BY bucket = BUCKET(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")\n| SORT bucket',
|
||||
'FROM employees\n| STATS s1 = b1 + 1, s2 = BUCKET(salary / 1000 + 999, 50.) + 2 BY b1 = BUCKET(salary / 100 + 99, 50.), b2 = BUCKET(salary / 1000 + 999, 50.)\n| SORT b1, b2\n| KEEP s1, b1, s2, b2',
|
||||
'FROM employees\n| STATS dates = MV_SORT(VALUES(birth_date)) BY b = BUCKET(birth_date + 1 HOUR, 1 YEAR) - 1 HOUR\n| EVAL d_count = MV_COUNT(dates)\n| SORT d_count, b\n| LIMIT 3',
|
||||
|
|
|
@ -3337,7 +3337,7 @@ const matchOperatorDefinition: FunctionDefinition = {
|
|||
supportedOptions: [],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'FROM books \n| WHERE MATCH(author, "Faulkner")\n| KEEP book_no, author \n| SORT book_no \n| LIMIT 5',
|
||||
'FROM books\n| WHERE MATCH(author, "Faulkner")\n| KEEP book_no, author\n| SORT book_no\n| LIMIT 5',
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -3769,6 +3769,350 @@ const negDefinition: FunctionDefinition = {
|
|||
examples: [],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
const notInDefinition: FunctionDefinition = {
|
||||
type: FunctionDefinitionTypes.OPERATOR,
|
||||
name: 'not_in',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.not_in', {
|
||||
defaultMessage:
|
||||
'The `NOT IN` operator allows testing whether a field or expression does *not* equal any element in a list of literals, fields or expressions.',
|
||||
}),
|
||||
ignoreAsSuggestion: true,
|
||||
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
signatures: [
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'boolean',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'boolean[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'cartesian_point',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'cartesian_point[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'cartesian_shape',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'cartesian_shape[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'double',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'double[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'geo_point',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'geo_point[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'geo_shape',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'geo_shape[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'integer',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'integer[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'ip',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'ip[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'keyword[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'text[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'long',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'long[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'text',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'keyword[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'text',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'text[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'version',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'version[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
],
|
||||
supportedCommands: ['eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: undefined,
|
||||
validate: undefined,
|
||||
examples: [],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
const notLikeDefinition: FunctionDefinition = {
|
||||
type: FunctionDefinitionTypes.OPERATOR,
|
||||
name: 'not_like',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.not_like', {
|
||||
defaultMessage:
|
||||
'Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`\nusually acts on a field placed on the left-hand side of the operator, but it can\nalso act on a constant (literal) expression. The right-hand side of the operator\nrepresents the pattern.\n\nThe following wildcard characters are supported:\n\n* `*` matches zero or more characters.\n* `?` matches one character.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
signatures: [
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'str',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'pattern',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'str',
|
||||
type: 'text',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'pattern',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
],
|
||||
supportedCommands: ['eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: undefined,
|
||||
validate: undefined,
|
||||
examples: [],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
const notRlikeDefinition: FunctionDefinition = {
|
||||
type: FunctionDefinitionTypes.OPERATOR,
|
||||
name: 'not_rlike',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.not_rlike', {
|
||||
defaultMessage:
|
||||
'Use `RLIKE` to filter data based on string patterns using using\nregular expressions. `RLIKE` usually acts on a field placed on\nthe left-hand side of the operator, but it can also act on a constant (literal)\nexpression. The right-hand side of the operator represents the pattern.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
signatures: [
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'str',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'pattern',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'str',
|
||||
type: 'text',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'pattern',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
],
|
||||
supportedCommands: ['eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: undefined,
|
||||
validate: undefined,
|
||||
examples: [],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
const notEqualsDefinition: FunctionDefinition = {
|
||||
type: FunctionDefinitionTypes.OPERATOR,
|
||||
|
@ -4259,350 +4603,6 @@ const notEqualsDefinition: FunctionDefinition = {
|
|||
examples: [],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
const notInDefinition: FunctionDefinition = {
|
||||
type: FunctionDefinitionTypes.OPERATOR,
|
||||
name: 'not_in',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.not_in', {
|
||||
defaultMessage:
|
||||
'The `NOT IN` operator allows testing whether a field or expression does *not* equal any element in a list of literals, fields or expressions.',
|
||||
}),
|
||||
ignoreAsSuggestion: true,
|
||||
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
signatures: [
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'boolean',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'boolean[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'cartesian_point',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'cartesian_point[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'cartesian_shape',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'cartesian_shape[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'double',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'double[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'geo_point',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'geo_point[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'geo_shape',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'geo_shape[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'integer',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'integer[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'ip',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'ip[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'keyword[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'text[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'long',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'long[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'text',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'keyword[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'text',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'text[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'left',
|
||||
type: 'version',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
type: 'version[]',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
],
|
||||
supportedCommands: ['eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: undefined,
|
||||
validate: undefined,
|
||||
examples: [],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
const notLikeDefinition: FunctionDefinition = {
|
||||
type: FunctionDefinitionTypes.OPERATOR,
|
||||
name: 'not_like',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.not_like', {
|
||||
defaultMessage:
|
||||
'Use `NOT LIKE` to filter data based on string patterns using wildcards. `NOT LIKE`\nusually acts on a field placed on the left-hand side of the operator, but it can\nalso act on a constant (literal) expression. The right-hand side of the operator\nrepresents the pattern.\n\nThe following wildcard characters are supported:\n\n* `*` matches zero or more characters.\n* `?` matches one character.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
signatures: [
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'str',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'pattern',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'str',
|
||||
type: 'text',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'pattern',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
],
|
||||
supportedCommands: ['eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: undefined,
|
||||
validate: undefined,
|
||||
examples: [],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
const notRlikeDefinition: FunctionDefinition = {
|
||||
type: FunctionDefinitionTypes.OPERATOR,
|
||||
name: 'not_rlike',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.not_rlike', {
|
||||
defaultMessage:
|
||||
'Use `NOT RLIKE` to filter data based on string patterns using using\nregular expressions. `NOT RLIKE` usually acts on a field placed on\nthe left-hand side of the operator, but it can also act on a constant (literal)\nexpression. The right-hand side of the operator represents the pattern.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
signatures: [
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'str',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'pattern',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
{
|
||||
params: [
|
||||
{
|
||||
name: 'str',
|
||||
type: 'text',
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
name: 'pattern',
|
||||
type: 'keyword',
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
returnType: 'boolean',
|
||||
minParams: 2,
|
||||
},
|
||||
],
|
||||
supportedCommands: ['eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: undefined,
|
||||
validate: undefined,
|
||||
examples: [],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
const rlikeDefinition: FunctionDefinition = {
|
||||
type: FunctionDefinitionTypes.OPERATOR,
|
||||
|
@ -5014,10 +5014,10 @@ export const operatorFunctionDefinitions = [
|
|||
modDefinition,
|
||||
mulDefinition,
|
||||
negDefinition,
|
||||
notEqualsDefinition,
|
||||
notInDefinition,
|
||||
notLikeDefinition,
|
||||
notRlikeDefinition,
|
||||
notEqualsDefinition,
|
||||
rlikeDefinition,
|
||||
subDefinition,
|
||||
];
|
||||
|
|
|
@ -86,7 +86,7 @@ const absDefinition: FunctionDefinition = {
|
|||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'ROW number = -1.0 \n| EVAL abs_number = ABS(number)',
|
||||
'ROW number = -1.0\n| EVAL abs_number = ABS(number)',
|
||||
'FROM employees\n| KEEP first_name, last_name, height\n| EVAL abs_height = ABS(0.0 - height)',
|
||||
],
|
||||
};
|
||||
|
@ -763,7 +763,7 @@ const cidrMatchDefinition: FunctionDefinition = {
|
|||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'FROM hosts \n| WHERE CIDR_MATCH(ip1, "127.0.0.2/32", "127.0.0.3/32") \n| KEEP card, host, ip0, ip1',
|
||||
'FROM hosts\n| WHERE CIDR_MATCH(ip1, "127.0.0.2/32", "127.0.0.3/32")\n| KEEP card, host, ip0, ip1',
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -1185,7 +1185,7 @@ const cosDefinition: FunctionDefinition = {
|
|||
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: ['ROW a=1.8 \n| EVAL cos=COS(a)'],
|
||||
examples: ['ROW a=1.8\n| EVAL cos=COS(a)'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -1242,7 +1242,7 @@ const coshDefinition: FunctionDefinition = {
|
|||
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: ['ROW a=1.8 \n| EVAL cosh=COSH(a)'],
|
||||
examples: ['ROW a=1.8\n| EVAL cosh=COSH(a)'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -1862,7 +1862,7 @@ const eDefinition: FunctionDefinition = {
|
|||
type: FunctionDefinitionTypes.SCALAR,
|
||||
name: 'e',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.e', {
|
||||
defaultMessage: "Returns Euler's number.",
|
||||
defaultMessage: 'Returns Euler’s number.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
|
@ -2104,7 +2104,7 @@ const fromBase64Definition: FunctionDefinition = {
|
|||
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: ['row a = "ZWxhc3RpYw==" \n| eval d = from_base64(a)'],
|
||||
examples: ['row a = "ZWxhc3RpYw=="\n| eval d = from_base64(a)'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -2416,7 +2416,7 @@ const hashDefinition: FunctionDefinition = {
|
|||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'FROM sample_data \n| WHERE message != "Connection error"\n| EVAL md5 = hash("md5", message), sha256 = hash("sha256", message) \n| KEEP message, md5, sha256;',
|
||||
'FROM sample_data\n| WHERE message != "Connection error"\n| EVAL md5 = hash("md5", message), sha256 = hash("sha256", message)\n| KEEP message, md5, sha256',
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -2755,7 +2755,7 @@ const kqlDefinition: FunctionDefinition = {
|
|||
supportedOptions: [],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'FROM books \n| WHERE KQL("author: Faulkner")\n| KEEP book_no, author \n| SORT book_no \n| LIMIT 5',
|
||||
'FROM books\n| WHERE KQL("author: Faulkner")\n| KEEP book_no, author\n| SORT book_no\n| LIMIT 5',
|
||||
],
|
||||
customParametersSnippet: '"""$0"""',
|
||||
};
|
||||
|
@ -2999,7 +2999,7 @@ const leftDefinition: FunctionDefinition = {
|
|||
name: 'left',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.left', {
|
||||
defaultMessage:
|
||||
"Returns the substring that extracts 'length' chars from 'string' starting from the left.",
|
||||
'Returns the substring that extracts *length* chars from *string* starting from the left.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
|
@ -3642,7 +3642,7 @@ const log10Definition: FunctionDefinition = {
|
|||
}
|
||||
return messages;
|
||||
},
|
||||
examples: ['ROW d = 1000.0 \n| EVAL s = LOG10(d)'],
|
||||
examples: ['ROW d = 1000.0\n| EVAL s = LOG10(d)'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -4425,8 +4425,8 @@ const matchDefinition: FunctionDefinition = {
|
|||
supportedOptions: [],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'FROM books \n| WHERE MATCH(author, "Faulkner")\n| KEEP book_no, author \n| SORT book_no \n| LIMIT 5',
|
||||
'FROM books \n| WHERE MATCH(title, "Hobbit Back Again", {"operator": "AND"})\n| KEEP title;',
|
||||
'FROM books\n| WHERE MATCH(author, "Faulkner")\n| KEEP book_no, author\n| SORT book_no\n| LIMIT 5',
|
||||
'FROM books\n| WHERE MATCH(title, "Hobbit Back Again", {"operator": "AND"})\n| KEEP title;',
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -4465,7 +4465,7 @@ const md5Definition: FunctionDefinition = {
|
|||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'FROM sample_data \n| WHERE message != "Connection error"\n| EVAL md5 = md5(message)\n| KEEP message, md5;',
|
||||
'FROM sample_data\n| WHERE message != "Connection error"\n| EVAL md5 = md5(message)\n| KEEP message, md5',
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -5751,7 +5751,7 @@ const mvMedianAbsoluteDeviationDefinition: FunctionDefinition = {
|
|||
'kbn-esql-validation-autocomplete.esql.definitions.mv_median_absolute_deviation',
|
||||
{
|
||||
defaultMessage:
|
||||
"Converts a multivalued field into a single valued field containing the median absolute deviation.\n\nIt is calculated as the median of each data point's deviation from the median of the entire sample. That is, for a random variable `X`, the median absolute deviation is `median(|median(X) - X|)`.",
|
||||
'Converts a multivalued field into a single valued field containing the median absolute deviation.\n\nIt is calculated as the median of each data point’s deviation from the median of the entire sample. That is, for a random variable `X`, the median absolute deviation is `median(|median(X) - X|)`.',
|
||||
}
|
||||
),
|
||||
preview: false,
|
||||
|
@ -6952,7 +6952,7 @@ const piDefinition: FunctionDefinition = {
|
|||
type: FunctionDefinitionTypes.SCALAR,
|
||||
name: 'pi',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.pi', {
|
||||
defaultMessage: "Returns Pi, the ratio of a circle's circumference to its diameter.",
|
||||
defaultMessage: 'Returns Pi, the ratio of a circle’s circumference to its diameter.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
|
@ -7251,7 +7251,7 @@ const qstrDefinition: FunctionDefinition = {
|
|||
name: 'options',
|
||||
type: 'function_named_parameters',
|
||||
mapParams:
|
||||
"{name='max_determinized_states', values=[10000], description='Maximum number of automaton states required for the query. Default is 10000.'}, {name='fuzziness', values=[AUTO, 1, 2], description='Maximum edit distance allowed for matching.'}, {name='auto_generate_synonyms_phrase_query', values=[true, false], description='If true, match phrase queries are automatically created for multi-term synonyms.'}, {name='phrase_slop', values=[0], description='Maximum number of positions allowed between matching tokens for phrases.'}, {name='default_field', values=[standard], description='Default field to search if no field is provided in the query string. Supports wildcards (*).'}, {name='allow_leading_wildcard', values=[true, false], description='If true, the wildcard characters * and ? are allowed as the first character of the query string.'}, {name='minimum_should_match', values=[standard], description='Minimum number of clauses that must match for a document to be returned.'}, {name='fuzzy_transpositions', values=[true, false], description='If true, edits for fuzzy matching include transpositions of two adjacent characters (ab → ba).'}, {name='fuzzy_prefix_length', values=[0], description='Number of beginning characters left unchanged for fuzzy matching. Defaults to 0.'}, {name='time_zone', values=[standard], description='Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC.'}, {name='lenient', values=[true, false], description='If false, format-based errors, such as providing a text query value for a numeric field, are returned.'}, {name='rewrite', values=[standard], description='Method used to rewrite the query.'}, {name='default_operator', values=[OR, AND], description='Default boolean logic used to interpret text in the query string if no operators are specified.'}, {name='analyzer', values=[standard], description='Analyzer used to convert the text in the query value into token.'}, {name='fuzzy_max_expansions', values=[50], description='Maximum number of terms to which the query expands for fuzzy matching. Defaults to 50.'}, {name='quote_analyzer', values=[standard], description='Analyzer used to convert quoted text in the query string into tokens.'}, {name='allow_wildcard', values=[false, true], description='If true, the query attempts to analyze wildcard terms in the query string.'}, {name='boost', values=[2.5], description='Floating point number used to decrease or increase the relevance scores of the query.'}, {name='quote_field_suffix', values=[standard], description='Suffix appended to quoted text in the query string.'}, {name='enable_position_increments', values=[true, false], description='If true, enable position increments in queries constructed from a query_string search. Defaults to true.'}, {name='fields', values=[standard], description='Array of fields to search. Supports wildcards (*).'}",
|
||||
"{name='max_determinized_states', values=[10000], description='Maximum number of automaton states required for the query. Default is 10000.'}, {name='fuzziness', values=[AUTO, 1, 2], description='Maximum edit distance allowed for matching.'}, {name='auto_generate_synonyms_phrase_query', values=[true, false], description='If true, match phrase queries are automatically created for multi-term synonyms. Defaults to true.'}, {name='phrase_slop', values=[0], description='Maximum number of positions allowed between matching tokens for phrases. Defaults to 0 (which means exact matches are required).'}, {name='default_field', values=[standard], description='Default field to search if no field is provided in the query string. Supports wildcards (*).'}, {name='allow_leading_wildcard', values=[true, false], description='If true, the wildcard characters * and ? are allowed as the first character of the query string. Defaults to true.'}, {name='minimum_should_match', values=[standard], description='Minimum number of clauses that must match for a document to be returned.'}, {name='fuzzy_transpositions', values=[true, false], description='If true, edits for fuzzy matching include transpositions of two adjacent characters (ab → ba). Defaults to true.'}, {name='fuzzy_prefix_length', values=[0], description='Number of beginning characters left unchanged for fuzzy matching. Defaults to 0.'}, {name='time_zone', values=[standard], description='Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC.'}, {name='lenient', values=[true, false], description='If false, format-based errors, such as providing a text query value for a numeric field, are returned. Defaults to false.'}, {name='rewrite', values=[standard], description='Method used to rewrite the query.'}, {name='default_operator', values=[OR, AND], description='Default boolean logic used to interpret text in the query string if no operators are specified.'}, {name='analyzer', values=[standard], description='Analyzer used to convert the text in the query value into token. Defaults to the index-time analyzer mapped for the default_field.'}, {name='fuzzy_max_expansions', values=[50], description='Maximum number of terms to which the query expands for fuzzy matching. Defaults to 50.'}, {name='quote_analyzer', values=[standard], description='Analyzer used to convert quoted text in the query string into tokens. Defaults to the search_quote_analyzer mapped for the default_field.'}, {name='allow_wildcard', values=[false, true], description='If true, the query attempts to analyze wildcard terms in the query string. Defaults to false. '}, {name='boost', values=[2.5], description='Floating point number used to decrease or increase the relevance scores of the query.'}, {name='quote_field_suffix', values=[standard], description='Suffix appended to quoted text in the query string.'}, {name='enable_position_increments', values=[true, false], description='If true, enable position increments in queries constructed from a query_string search. Defaults to true.'}, {name='fields', values=[standard], description='Array of fields to search. Supports wildcards (*).'}",
|
||||
optional: true,
|
||||
constantOnly: true,
|
||||
},
|
||||
|
@ -7270,7 +7270,7 @@ const qstrDefinition: FunctionDefinition = {
|
|||
name: 'options',
|
||||
type: 'function_named_parameters',
|
||||
mapParams:
|
||||
"{name='max_determinized_states', values=[10000], description='Maximum number of automaton states required for the query. Default is 10000.'}, {name='fuzziness', values=[AUTO, 1, 2], description='Maximum edit distance allowed for matching.'}, {name='auto_generate_synonyms_phrase_query', values=[true, false], description='If true, match phrase queries are automatically created for multi-term synonyms.'}, {name='phrase_slop', values=[0], description='Maximum number of positions allowed between matching tokens for phrases.'}, {name='default_field', values=[standard], description='Default field to search if no field is provided in the query string. Supports wildcards (*).'}, {name='allow_leading_wildcard', values=[true, false], description='If true, the wildcard characters * and ? are allowed as the first character of the query string.'}, {name='minimum_should_match', values=[standard], description='Minimum number of clauses that must match for a document to be returned.'}, {name='fuzzy_transpositions', values=[true, false], description='If true, edits for fuzzy matching include transpositions of two adjacent characters (ab → ba).'}, {name='fuzzy_prefix_length', values=[0], description='Number of beginning characters left unchanged for fuzzy matching. Defaults to 0.'}, {name='time_zone', values=[standard], description='Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC.'}, {name='lenient', values=[true, false], description='If false, format-based errors, such as providing a text query value for a numeric field, are returned.'}, {name='rewrite', values=[standard], description='Method used to rewrite the query.'}, {name='default_operator', values=[OR, AND], description='Default boolean logic used to interpret text in the query string if no operators are specified.'}, {name='analyzer', values=[standard], description='Analyzer used to convert the text in the query value into token.'}, {name='fuzzy_max_expansions', values=[50], description='Maximum number of terms to which the query expands for fuzzy matching. Defaults to 50.'}, {name='quote_analyzer', values=[standard], description='Analyzer used to convert quoted text in the query string into tokens.'}, {name='allow_wildcard', values=[false, true], description='If true, the query attempts to analyze wildcard terms in the query string.'}, {name='boost', values=[2.5], description='Floating point number used to decrease or increase the relevance scores of the query.'}, {name='quote_field_suffix', values=[standard], description='Suffix appended to quoted text in the query string.'}, {name='enable_position_increments', values=[true, false], description='If true, enable position increments in queries constructed from a query_string search. Defaults to true.'}, {name='fields', values=[standard], description='Array of fields to search. Supports wildcards (*).'}",
|
||||
"{name='max_determinized_states', values=[10000], description='Maximum number of automaton states required for the query. Default is 10000.'}, {name='fuzziness', values=[AUTO, 1, 2], description='Maximum edit distance allowed for matching.'}, {name='auto_generate_synonyms_phrase_query', values=[true, false], description='If true, match phrase queries are automatically created for multi-term synonyms. Defaults to true.'}, {name='phrase_slop', values=[0], description='Maximum number of positions allowed between matching tokens for phrases. Defaults to 0 (which means exact matches are required).'}, {name='default_field', values=[standard], description='Default field to search if no field is provided in the query string. Supports wildcards (*).'}, {name='allow_leading_wildcard', values=[true, false], description='If true, the wildcard characters * and ? are allowed as the first character of the query string. Defaults to true.'}, {name='minimum_should_match', values=[standard], description='Minimum number of clauses that must match for a document to be returned.'}, {name='fuzzy_transpositions', values=[true, false], description='If true, edits for fuzzy matching include transpositions of two adjacent characters (ab → ba). Defaults to true.'}, {name='fuzzy_prefix_length', values=[0], description='Number of beginning characters left unchanged for fuzzy matching. Defaults to 0.'}, {name='time_zone', values=[standard], description='Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC.'}, {name='lenient', values=[true, false], description='If false, format-based errors, such as providing a text query value for a numeric field, are returned. Defaults to false.'}, {name='rewrite', values=[standard], description='Method used to rewrite the query.'}, {name='default_operator', values=[OR, AND], description='Default boolean logic used to interpret text in the query string if no operators are specified.'}, {name='analyzer', values=[standard], description='Analyzer used to convert the text in the query value into token. Defaults to the index-time analyzer mapped for the default_field.'}, {name='fuzzy_max_expansions', values=[50], description='Maximum number of terms to which the query expands for fuzzy matching. Defaults to 50.'}, {name='quote_analyzer', values=[standard], description='Analyzer used to convert quoted text in the query string into tokens. Defaults to the search_quote_analyzer mapped for the default_field.'}, {name='allow_wildcard', values=[false, true], description='If true, the query attempts to analyze wildcard terms in the query string. Defaults to false. '}, {name='boost', values=[2.5], description='Floating point number used to decrease or increase the relevance scores of the query.'}, {name='quote_field_suffix', values=[standard], description='Suffix appended to quoted text in the query string.'}, {name='enable_position_increments', values=[true, false], description='If true, enable position increments in queries constructed from a query_string search. Defaults to true.'}, {name='fields', values=[standard], description='Array of fields to search. Supports wildcards (*).'}",
|
||||
optional: true,
|
||||
constantOnly: true,
|
||||
},
|
||||
|
@ -7282,7 +7282,8 @@ const qstrDefinition: FunctionDefinition = {
|
|||
supportedOptions: [],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'FROM books \n| WHERE QSTR("author: Faulkner")\n| KEEP book_no, author \n| SORT book_no \n| LIMIT 5',
|
||||
'FROM books\n| WHERE QSTR("author: Faulkner")\n| KEEP book_no, author\n| SORT book_no\n| LIMIT 5',
|
||||
'FROM books\n| WHERE QSTR("title: Hobbjt~", {"fuzziness": 2})\n| KEEP book_no, title\n| SORT book_no\n| LIMIT 5',
|
||||
],
|
||||
customParametersSnippet: '"""$0"""',
|
||||
};
|
||||
|
@ -7559,7 +7560,7 @@ const rightDefinition: FunctionDefinition = {
|
|||
name: 'right',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.right', {
|
||||
defaultMessage:
|
||||
"Return the substring that extracts 'length' chars from 'str' starting from the right.",
|
||||
'Return the substring that extracts *length* chars from *str* starting from the right.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
|
@ -7857,7 +7858,7 @@ const sha1Definition: FunctionDefinition = {
|
|||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'FROM sample_data \n| WHERE message != "Connection error"\n| EVAL sha1 = sha1(message)\n| KEEP message, sha1;',
|
||||
'FROM sample_data\n| WHERE message != "Connection error"\n| EVAL sha1 = sha1(message)\n| KEEP message, sha1',
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -7896,7 +7897,7 @@ const sha256Definition: FunctionDefinition = {
|
|||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: [
|
||||
'FROM sample_data \n| WHERE message != "Connection error"\n| EVAL sha256 = sha256(message)\n| KEEP message, sha256;',
|
||||
'FROM sample_data\n| WHERE message != "Connection error"\n| EVAL sha256 = sha256(message)\n| KEEP message, sha256',
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -8012,7 +8013,7 @@ const sinDefinition: FunctionDefinition = {
|
|||
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: ['ROW a=1.8 \n| EVAL sin=SIN(a)'],
|
||||
examples: ['ROW a=1.8\n| EVAL sin=SIN(a)'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -8069,7 +8070,7 @@ const sinhDefinition: FunctionDefinition = {
|
|||
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: ['ROW a=1.8 \n| EVAL sinh=SINH(a)'],
|
||||
examples: ['ROW a=1.8\n| EVAL sinh=SINH(a)'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -9417,7 +9418,7 @@ const tanDefinition: FunctionDefinition = {
|
|||
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: ['ROW a=1.8 \n| EVAL tan=TAN(a)'],
|
||||
examples: ['ROW a=1.8\n| EVAL tan=TAN(a)'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -9474,7 +9475,7 @@ const tanhDefinition: FunctionDefinition = {
|
|||
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: ['ROW a=1.8 \n| EVAL tanh=TANH(a)'],
|
||||
examples: ['ROW a=1.8\n| EVAL tanh=TANH(a)'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -9482,7 +9483,8 @@ const tauDefinition: FunctionDefinition = {
|
|||
type: FunctionDefinitionTypes.SCALAR,
|
||||
name: 'tau',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.tau', {
|
||||
defaultMessage: "Returns the ratio of a circle's circumference to its radius.",
|
||||
defaultMessage:
|
||||
'Returns the [ratio](https://tauday.com/tau-manifesto) of a circle’s circumference to its radius.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
|
@ -9575,7 +9577,7 @@ const termDefinition: FunctionDefinition = {
|
|||
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: ['FROM books \n| WHERE TERM(author, "gabriel") \n| KEEP book_no, title\n| LIMIT 3;'],
|
||||
examples: ['FROM books\n| WHERE TERM(author, "gabriel")\n| KEEP book_no, title\n| LIMIT 3'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -9612,7 +9614,7 @@ const toBase64Definition: FunctionDefinition = {
|
|||
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
|
||||
supportedOptions: ['by'],
|
||||
validate: undefined,
|
||||
examples: ['row a = "elastic" \n| eval e = to_base64(a)'],
|
||||
examples: ['row a = "elastic"\n| eval e = to_base64(a)'],
|
||||
};
|
||||
|
||||
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
|
||||
|
@ -9621,7 +9623,7 @@ const toBooleanDefinition: FunctionDefinition = {
|
|||
name: 'to_boolean',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_boolean', {
|
||||
defaultMessage:
|
||||
'Converts an input value to a boolean value.\nA string value of *true* will be case-insensitive converted to the Boolean *true*.\nFor anything else, including the empty string, the function will return *false*.\nThe numerical value of *0* will be converted to *false*, anything else will be converted to *true*.',
|
||||
'Converts an input value to a boolean value.\nA string value of `true` will be case-insensitive converted to the Boolean `true`.\nFor anything else, including the empty string, the function will return `false`.\nThe numerical value of `0` will be converted to `false`, anything else will be converted to `true`.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: ['to_bool'],
|
||||
|
@ -9961,7 +9963,7 @@ const toDatetimeDefinition: FunctionDefinition = {
|
|||
name: 'to_datetime',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_datetime', {
|
||||
defaultMessage:
|
||||
"Converts an input value to a date value.\nA string will only be successfully converted if it's respecting the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`.\nTo convert dates in other formats, use `DATE_PARSE`.",
|
||||
"Converts an input value to a date value.\nA string will only be successfully converted if it’s respecting the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`.\nTo convert dates in other formats, use `DATE_PARSE`.",
|
||||
}),
|
||||
preview: false,
|
||||
alias: ['to_dt'],
|
||||
|
@ -10119,7 +10121,7 @@ const toDoubleDefinition: FunctionDefinition = {
|
|||
name: 'to_double',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_double', {
|
||||
defaultMessage:
|
||||
'Converts an input value to a double value. If the input parameter is of a date type,\nits value will be interpreted as milliseconds since the Unix epoch,\nconverted to double. Boolean *true* will be converted to double *1.0*, *false* to *0.0*.',
|
||||
'Converts an input value to a double value. If the input parameter is of a date type,\nits value will be interpreted as milliseconds since the Unix epoch,\nconverted to double. Boolean `true` will be converted to double `1.0`, `false` to `0.0`.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: ['to_dbl'],
|
||||
|
@ -10357,7 +10359,7 @@ const toIntegerDefinition: FunctionDefinition = {
|
|||
name: 'to_integer',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_integer', {
|
||||
defaultMessage:
|
||||
'Converts an input value to an integer value.\nIf the input parameter is of a date type, its value will be interpreted as milliseconds\nsince the Unix epoch, converted to integer.\nBoolean *true* will be converted to integer *1*, *false* to *0*.',
|
||||
'Converts an input value to an integer value.\nIf the input parameter is of a date type, its value will be interpreted as milliseconds\nsince the Unix epoch, converted to integer.\nBoolean `true` will be converted to integer `1`, `false` to `0`.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: ['to_int'],
|
||||
|
@ -10514,7 +10516,7 @@ const toLongDefinition: FunctionDefinition = {
|
|||
name: 'to_long',
|
||||
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_long', {
|
||||
defaultMessage:
|
||||
'Converts an input value to a long value. If the input parameter is of a date type,\nits value will be interpreted as milliseconds since the Unix epoch, converted to long.\nBoolean *true* will be converted to long *1*, *false* to *0*.',
|
||||
'Converts an input value to a long value. If the input parameter is of a date type,\nits value will be interpreted as milliseconds since the Unix epoch, converted to long.\nBoolean `true` will be converted to long `1`, `false` to `0`.',
|
||||
}),
|
||||
preview: false,
|
||||
alias: undefined,
|
||||
|
@ -10956,7 +10958,7 @@ const toUnsignedLongDefinition: FunctionDefinition = {
|
|||
'kbn-esql-validation-autocomplete.esql.definitions.to_unsigned_long',
|
||||
{
|
||||
defaultMessage:
|
||||
'Converts an input value to an unsigned long value. If the input parameter is of a date type,\nits value will be interpreted as milliseconds since the Unix epoch, converted to unsigned long.\nBoolean *true* will be converted to unsigned long *1*, *false* to *0*.',
|
||||
'Converts an input value to an unsigned long value. If the input parameter is of a date type,\nits value will be interpreted as milliseconds since the Unix epoch, converted to unsigned long.\nBoolean `true` will be converted to unsigned long `1`, `false` to `0`.',
|
||||
}
|
||||
),
|
||||
preview: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue