-
Notifications
You must be signed in to change notification settings - Fork 101
Improve Analyzer
definitions and fix various classes
#3215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0bd910e
to
9765060
Compare
the |
definitely not easy to check the code here, because it relies on Lucene classes a lot, but I think everything else looks good! |
Thanks a lot for checking @l-trotta 🙂 Do you know which version of the server deprecated the |
@flobernd 7.14.0! elastic/elasticsearch#74073 |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Analyzer
definitionsAnalyzer
definitions and fix various classes
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
e0c41c1
to
cc404ce
Compare
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
cc404ce
to
bf02b19
Compare
I removed the controversal change about the SQL + ESQL parameters for now as we decided to fix this in a separate PR. |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.x 8.x
# Navigate to the new working tree
cd .worktrees/backport-8.x
# Create a new branch
git switch --create backport-3215-to-8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 62092179e10298e6ff3b6dbfdbe68af8990119a3
# Push it to GitHub
git push --set-upstream origin backport-3215-to-8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.x Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.16 8.16
# Navigate to the new working tree
cd .worktrees/backport-8.16
# Create a new branch
git switch --create backport-3215-to-8.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 62092179e10298e6ff3b6dbfdbe68af8990119a3
# Push it to GitHub
git push --set-upstream origin backport-3215-to-8.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.16 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.17 8.17
# Navigate to the new working tree
cd .worktrees/backport-8.17
# Create a new branch
git switch --create backport-3215-to-8.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 62092179e10298e6ff3b6dbfdbe68af8990119a3
# Push it to GitHub
git push --set-upstream origin backport-3215-to-8.17
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.17 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.18 8.18
# Navigate to the new working tree
cd .worktrees/backport-8.18
# Create a new branch
git switch --create backport-3215-to-8.18
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 62092179e10298e6ff3b6dbfdbe68af8990119a3
# Push it to GitHub
git push --set-upstream origin backport-3215-to-8.18
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.18 Then, create a pull request where the |
* [DOCS] Fix overlay for resolve cluster (#3670) * Update specification output * uppercase enum source mode (#3676) * [DOCS] Add overlays for CCR API examples (#3672) * Update inference.update.json with the correct verb (#3688) * Update specification output * [DOCS] Convert final examples from JSON to YAML (#3692) * Update specification output * Correcting the response format for ingest simulate (#3640) * Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> * Update specification output * Add text_embedding_bits to inference result output (#3698) * Update specification output * Improve `Analyzer` definitions and fix various classes (#3215) * Update specification output --------- Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Laura Trotta <[email protected]> Co-authored-by: David Kyle <[email protected]> Co-authored-by: Keith Massey <[email protected]> Co-authored-by: Ying Mao <[email protected]>
@@ -309,7 +310,7 @@ export class ProcessorBase { | |||
/** | |||
* Conditionally execute the processor. | |||
*/ | |||
if?: string | |||
if?: Script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flobernd I'm curious about whether this change is correct. I thought the if
conditions for all ingest processors were represented only string
values (that hold Painless expressions). If I understand correctly, this makes the if
value into a struct which runs contrary to the pipelines processors I have used. Could you double check this please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @andrewkroh, sure I will double check.
The driver for this change are some examples in our REST API documentation which do use a stroed script for the condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation says:
You can also specify a stored script as the if condition.
The corresponding example is this one:
PUT _ingest/pipeline/my-pipeline
{
"processors": [
{
"drop": {
"description": "Drop documents that don't contain 'prod' tag",
"if": { "id": "my-prod-tag-script" }
}
}
]
}
Our current Script
type is defined like this:
/**
* @shortcut_property source
* */
export class Script {
/**
* The script source.
*/
source?: string
/**
* The `id` for a stored script.
*/
id?: Id
// ...
}
Because of the "shortcut" to source
, any JSON string
literal is eqivalent to initializing a Script
object and setting the source
property to the value.
For example:
"if": "test"
is eqivalent to
"if": {
"source": "test"
}
I just double checked in the Kibana dev console again and both requests (+ the one that uses id
instead of source
) do indeed work fine 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic. My missing piece of knowledge was this @shortcut_property
. Thank you!
Some analyzers had properties incorrectly marked as "required". As well added documentation for all documented fields.
This PR as well fixes different classes in various namespaces. These discrepancies have been found while working on the request converter. Thanks @l-trotta for double-checking my changes on base of the server code!