Skip to content

Commit

Permalink
Merge branch '8.x' into port/8.x_120527
Browse files Browse the repository at this point in the history
  • Loading branch information
bpintea authored Jan 28, 2025
2 parents 4f34f55 + e2fe409 commit cab7686
Show file tree
Hide file tree
Showing 109 changed files with 3,076 additions and 2,228 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/120360.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 120360
summary: ESQL - Add Match function options
area: ES|QL
type: feature
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ A metric aggregation that executes using scripts to provide a metric output.
WARNING: `scripted_metric` is not available in {serverless-full}.

WARNING: Using scripts can result in slower search speeds. See
<<scripts-and-search-speed>>.
<<scripts-and-search-speed>>. When using a scripted metric aggregation, its intermediate state is serialized
into an in-memory byte array for transmission to other nodes during the aggregation process.
Consequently, a complex scripted metric aggregation may also encounter the 2GB limitation imposed on Java arrays.

Example:

Expand Down
12 changes: 6 additions & 6 deletions docs/reference/connector/docs/connectors-box.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Save the refresh token from the response. You'll need this for the connector con
* "Write all files and folders stored in Box" in Application Scopes
* "Make API calls using the as-user header" in Advanced Features
3. Select `App + Enterprise Access` in App Access Level.
4. Authorize your application from the admin console.
4. Authorize your application from the admin console. If you do not have permission, you may need to submit the application for authorization.
Save the *Client Credentials* and *Enterprise ID*. You'll need these to configure the connector.
[discrete#es-connectors-box-configuration]
Expand All @@ -121,7 +121,7 @@ The Client ID to authenticate with Box instance.
The Client Secret to authenticate with Box instance.
`Refresh Token` (required if Box Account is Box Free)::
The Refresh Token to generate Access Token.
The Refresh Token to generate Access Token.
*NOTE:* If the process terminates, you'll need to generate a new refresh token.
`Enterprise ID` (required if Box Account is Box Enterprise)::
Expand Down Expand Up @@ -179,7 +179,7 @@ See <<es-connectors-troubleshooting>>.
See <<es-connectors-security>>.
// Closing the collapsible section
// Closing the collapsible section
===============


Expand Down Expand Up @@ -275,7 +275,7 @@ Save the refresh token from the response. You'll need this for the connector con
* "Write all files and folders stored in Box" in Application Scopes
* "Make API calls using the as-user header" in Advanced Features
3. Select `App + Enterprise Access` in App Access Level.
4. Authorize your application from the admin console.
4. Authorize your application from the admin console. If you do not have permission, you may need to submit the application for authorization.
Save the *Client Credentials* and *Enterprise ID*. You'll need these to configure the connector.
[discrete#es-connectors-box-client-configuration]
Expand All @@ -291,7 +291,7 @@ The Client ID to authenticate with Box instance.
The Client Secret to authenticate with Box instance.
`Refresh Token` (required if Box Account is Box Free)::
The Refresh Token to generate Access Token.
The Refresh Token to generate Access Token.
*NOTE:* If the process terminates, you'll need to generate a new refresh token.
`Enterprise ID` (required if Box Account is Box Enterprise)::
Expand Down Expand Up @@ -375,5 +375,5 @@ See <<es-connectors-troubleshooting>>.
See <<es-connectors-security>>.
// Closing the collapsible section
// Closing the collapsible section
===============
44 changes: 44 additions & 0 deletions docs/reference/esql/esql-syntax.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,47 @@ Timespan literals are not whitespace sensitive. These expressions are all valid:
* `1 day`
* `1 day`

[discrete]
[[esql-function-named-params]]
==== Function named parameters

Some functions like <<esql-match,match>> use named parameters to provide additional options.

Named parameters allow specifying name value pairs, using the following syntax:

`{"option_name": option_value, "another_option_name": another_value}`

Valid value types are strings, numbers and booleans.

An example using <<esql-match,match>>:

[source,console]
----
POST /_query
{
"query": """
FROM library
| WHERE match(author, "Frank Herbert", {"minimum_should_match": 2, "operator": "AND"})
| LIMIT 5
"""
}
----
// TEST[setup:library]

You can also use <<esql-rest-params,query parameters>> in function named parameters:

[source,console]
----
POST /_query
{
"query": """
FROM library
| EVAL year = DATE_EXTRACT("year", release_date)
| WHERE page_count > ? AND match(author, ?, {"minimum_should_match": ?})
| LIMIT 5
""",
"params": [300, "Frank Herbert", 2]
}
----
// TEST[setup:library]

2 changes: 1 addition & 1 deletion docs/reference/esql/functions/description/match.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion docs/reference/esql/functions/examples/match.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions docs/reference/esql/functions/functionNamedParams/match.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/esql/functions/kibana/definition/kql.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cab7686

Please sign in to comment.