Skip to content

Commit b208d47

Browse files
authored
Merge branch 'main' into hints-2
2 parents 31e9142 + bf0b45f commit b208d47

8 files changed

Lines changed: 1496 additions & 283 deletions

File tree

src/platform/packages/private/kbn-language-documentation/src/sections/generated/processing_commands.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ ROW a = "12 15.5 15.6 true"
497497
label: i18n.translate('languageDocumentation.documentationESQL.inline_stats', {
498498
defaultMessage: 'INLINE STATS',
499499
}),
500-
preview: false,
500+
preview: true,
501501
description: {
502502
markdownContent: i18n.translate(
503503
'languageDocumentation.documentationESQL.inline_stats.markdown',

src/platform/packages/private/kbn-language-documentation/src/sections/generated/scalar_functions.tsx

Lines changed: 230 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ export const functions = {
304304
Use \`CHUNK\` to split a text field into smaller chunks.
305305
306306
\`\`\`esql
307-
FROM books
308-
| EVAL chunks = CHUNK(description)
307+
ROW result = CHUNK("It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.", '{"strategy": "word", "max_chunk_size": 10, "overlap": 1}')
308+
| MV_EXPAND result
309309
\`\`\`
310310
`,
311311
description:
@@ -1561,6 +1561,34 @@ export const functions = {
15611561
ROW a="foo;bar;baz"
15621562
| EVAL first_a = MV_FIRST(SPLIT(a, ";"))
15631563
\`\`\`
1564+
`,
1565+
description:
1566+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
1567+
ignoreTag: true,
1568+
}
1569+
),
1570+
},
1571+
},
1572+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
1573+
{
1574+
label: i18n.translate('languageDocumentation.documentationESQL.mv_intersection', {
1575+
defaultMessage: 'MV_INTERSECTION',
1576+
}),
1577+
preview: true,
1578+
license: undefined,
1579+
description: {
1580+
markdownContent: i18n.translate(
1581+
'languageDocumentation.documentationESQL.mv_intersection.markdown',
1582+
{
1583+
defaultMessage: `
1584+
### MV INTERSECTION
1585+
Returns the values that appear in both input fields. Returns \`null\` if either field is null or if no values match.
1586+
1587+
\`\`\`esql
1588+
ROW a = [1, 2, 3, 4, 5], b = [2, 3, 4, 5, 6]
1589+
| EVAL finalValue = MV_INTERSECTION(a, b)
1590+
| KEEP finalValue
1591+
\`\`\`
15641592
`,
15651593
description:
15661594
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
@@ -2700,6 +2728,33 @@ export const functions = {
27002728
FROM airports
27012729
| WHERE ST_INTERSECTS(location, TO_GEOSHAPE("POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))"))
27022730
\`\`\`
2731+
`,
2732+
description:
2733+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
2734+
ignoreTag: true,
2735+
}
2736+
),
2737+
},
2738+
},
2739+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
2740+
{
2741+
label: i18n.translate('languageDocumentation.documentationESQL.st_simplify', {
2742+
defaultMessage: 'ST_SIMPLIFY',
2743+
}),
2744+
preview: true,
2745+
license: undefined,
2746+
description: {
2747+
markdownContent: i18n.translate(
2748+
'languageDocumentation.documentationESQL.st_simplify.markdown',
2749+
{
2750+
defaultMessage: `
2751+
### ST SIMPLIFY
2752+
Simplifies the input geometry by applying the Douglas-Peucker algorithm with a specified tolerance. Vertices that fall within the tolerance distance from the simplified shape are removed. Note that the resulting geometry may be invalid, even if the original input was valid.
2753+
2754+
\`\`\`esql
2755+
ROW wkt = "POLYGON ((7.998 53.827, 9.470 53.068, 15.754 53.801, 16.523 57.160, 11.162 57.868, 8.064 57.445, 6.219 55.317, 7.998 53.827))"
2756+
| EVAL simplified = ST_SIMPLIFY(TO_GEOSHAPE(wkt), 0.7)
2757+
\`\`\`
27032758
`,
27042759
description:
27052760
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
@@ -3054,8 +3109,8 @@ export const functions = {
30543109
Generates dense vector embeddings from text input using a specified [inference endpoint](docs-content://explore-analyze/elastic-inference/inference-api.md). Use this function to generate query vectors for KNN searches against your vectorized data or others dense vector based operations.
30553110
30563111
\`\`\`esql
3057-
ROW input="Who is Victor Hugo?"
3058-
| EVAL embedding = TEXT_EMBEDDING("Who is Victor Hugo?", "test_dense_inference")
3112+
FROM dense_vector_text METADATA _score
3113+
| WHERE KNN(text_embedding_field, TEXT_EMBEDDING("be excellent to each other", "test_dense_inference"))
30593114
\`\`\`
30603115
`,
30613116
description:
@@ -3598,8 +3653,9 @@ export const functions = {
35983653
{
35993654
defaultMessage: `
36003655
### TO LONG
3601-
Converts an input value to a long value. If the input parameter is of a date type,
3602-
its value will be interpreted as milliseconds since the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time), converted to long.
3656+
Converts the input value to a long.
3657+
If the input parameter is of a date type, its value will be interpreted as milliseconds
3658+
since the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time), converted to long.
36033659
Boolean \`true\` will be converted to long \`1\`, \`false\` to \`0\`.
36043660
36053661
\`\`\`esql
@@ -3796,6 +3852,33 @@ export const functions = {
37963852
\`\`\`esql
37973853
ROW v = TO_VERSION("1.2.3")
37983854
\`\`\`
3855+
`,
3856+
description:
3857+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
3858+
ignoreTag: true,
3859+
}
3860+
),
3861+
},
3862+
},
3863+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
3864+
{
3865+
label: i18n.translate('languageDocumentation.documentationESQL.top_snippets', {
3866+
defaultMessage: 'TOP_SNIPPETS',
3867+
}),
3868+
preview: true,
3869+
license: undefined,
3870+
description: {
3871+
markdownContent: i18n.translate(
3872+
'languageDocumentation.documentationESQL.top_snippets.markdown',
3873+
{
3874+
defaultMessage: `
3875+
### TOP SNIPPETS
3876+
Use \`TOP_SNIPPETS\` to extract the best snippets for a given query string from a text field.
3877+
3878+
\`\`\`esql
3879+
FROM books
3880+
| EVAL snippets = TOP_SNIPPETS(description, "Tolkien")
3881+
\`\`\`
37993882
`,
38003883
description:
38013884
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
@@ -3926,6 +4009,147 @@ export const functions = {
39264009
ROW u = "https://example.com/?x=foo bar&y=baz"
39274010
| EVAL u = URL_ENCODE_COMPONENT(u)
39284011
\`\`\`
4012+
`,
4013+
description:
4014+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
4015+
ignoreTag: true,
4016+
}
4017+
),
4018+
},
4019+
},
4020+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
4021+
{
4022+
label: i18n.translate('languageDocumentation.documentationESQL.v_cosine', {
4023+
defaultMessage: 'V_COSINE',
4024+
}),
4025+
preview: true,
4026+
license: undefined,
4027+
description: {
4028+
markdownContent: i18n.translate(
4029+
'languageDocumentation.documentationESQL.v_cosine.markdown',
4030+
{
4031+
defaultMessage: `
4032+
### V COSINE
4033+
Calculates the cosine similarity between two dense_vectors.
4034+
4035+
\`\`\`esql
4036+
from colors
4037+
| where color != "black"
4038+
| eval similarity = v_cosine(rgb_vector, [0, 255, 255])
4039+
| sort similarity desc, color asc
4040+
\`\`\`
4041+
`,
4042+
description:
4043+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
4044+
ignoreTag: true,
4045+
}
4046+
),
4047+
},
4048+
},
4049+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
4050+
{
4051+
label: i18n.translate('languageDocumentation.documentationESQL.v_dot_product', {
4052+
defaultMessage: 'V_DOT_PRODUCT',
4053+
}),
4054+
preview: true,
4055+
license: undefined,
4056+
description: {
4057+
markdownContent: i18n.translate(
4058+
'languageDocumentation.documentationESQL.v_dot_product.markdown',
4059+
{
4060+
defaultMessage: `
4061+
### V DOT PRODUCT
4062+
Calculates the dot product between two dense_vectors.
4063+
4064+
\`\`\`esql
4065+
from colors
4066+
| eval similarity = v_dot_product(rgb_vector, [0, 255, 255])
4067+
| sort similarity desc, color asc
4068+
\`\`\`
4069+
`,
4070+
description:
4071+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
4072+
ignoreTag: true,
4073+
}
4074+
),
4075+
},
4076+
},
4077+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
4078+
{
4079+
label: i18n.translate('languageDocumentation.documentationESQL.v_hamming', {
4080+
defaultMessage: 'V_HAMMING',
4081+
}),
4082+
preview: true,
4083+
license: undefined,
4084+
description: {
4085+
markdownContent: i18n.translate(
4086+
'languageDocumentation.documentationESQL.v_hamming.markdown',
4087+
{
4088+
defaultMessage: `
4089+
### V HAMMING
4090+
Calculates the Hamming distance between two dense vectors.
4091+
4092+
\`\`\`esql
4093+
from colors
4094+
| eval similarity = v_hamming(rgb_byte_vector, [0, 127, 127])
4095+
| sort similarity desc, color asc
4096+
\`\`\`
4097+
`,
4098+
description:
4099+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
4100+
ignoreTag: true,
4101+
}
4102+
),
4103+
},
4104+
},
4105+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
4106+
{
4107+
label: i18n.translate('languageDocumentation.documentationESQL.v_l1_norm', {
4108+
defaultMessage: 'V_L1_NORM',
4109+
}),
4110+
preview: true,
4111+
license: undefined,
4112+
description: {
4113+
markdownContent: i18n.translate(
4114+
'languageDocumentation.documentationESQL.v_l1_norm.markdown',
4115+
{
4116+
defaultMessage: `
4117+
### V L1 NORM
4118+
Calculates the l1 norm between two dense_vectors.
4119+
4120+
\`\`\`esql
4121+
from colors
4122+
| eval similarity = v_l1_norm(rgb_vector, [0, 255, 255])
4123+
| sort similarity desc, color asc
4124+
\`\`\`
4125+
`,
4126+
description:
4127+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
4128+
ignoreTag: true,
4129+
}
4130+
),
4131+
},
4132+
},
4133+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
4134+
{
4135+
label: i18n.translate('languageDocumentation.documentationESQL.v_l2_norm', {
4136+
defaultMessage: 'V_L2_NORM',
4137+
}),
4138+
preview: true,
4139+
license: undefined,
4140+
description: {
4141+
markdownContent: i18n.translate(
4142+
'languageDocumentation.documentationESQL.v_l2_norm.markdown',
4143+
{
4144+
defaultMessage: `
4145+
### V L2 NORM
4146+
Calculates the l2 norm between two dense_vectors.
4147+
4148+
\`\`\`esql
4149+
from colors
4150+
| eval similarity = v_l2_norm(rgb_vector, [0, 255, 255])
4151+
| sort similarity desc, color asc
4152+
\`\`\`
39294153
`,
39304154
description:
39314155
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',

src/platform/packages/private/kbn-language-documentation/src/sections/generated/timeseries_aggregation_functions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ export const functions = {
380380
{
381381
defaultMessage: `
382382
### PERCENTILE OVER TIME
383-
Calculates the percentile over time of a numeric field.
383+
Calculates the percentile over time of a field.
384384
385385
\`\`\`esql
386386
TS k8s

0 commit comments

Comments
 (0)