Skip to content
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

[8.x] Make semantic text part of the text family (#119792) #119962

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

Mikep86
Copy link
Contributor

@Mikep86 Mikep86 commented Jan 10, 2025

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

Co-authored-by: Ioana Tagirta <[email protected]>
(cherry picked from commit 29e1bf9)

# Conflicts:
#	x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/EsqlSpecTestCase.java
#	x-pack/plugin/esql/qa/testFixtures/src/main/resources/semantic_text.csv-spec
Comment on lines +135 to +164
grok
required_capability: semantic_text_field_caps

FROM semantic_text METADATA _id
| GROK st_logs """%{TIMESTAMP_ISO8601:date} %{IP:ip} %{EMAILADDRESS:email} %{NUMBER:num}"""
| KEEP st_logs, date, ip, email, num
| SORT st_logs
;

st_logs:text | date:keyword | ip:keyword | email:keyword | num:keyword
2023-01-23T12:15:00.000Z 127.0.0.1 [email protected] 42 | 2023-01-23T12:15:00.000Z | 127.0.0.1 | [email protected] | 42
2024-01-23T12:15:00.000Z 1.2.3.4 [email protected] 42 | 2024-01-23T12:15:00.000Z | 1.2.3.4 | [email protected] | 42
2024-12-23T12:15:00.000Z 1.2.3.4 [email protected] 4553 | 2024-12-23T12:15:00.000Z | 1.2.3.4 | [email protected] | 4553
;

dissect
required_capability: semantic_text_field_caps

FROM semantic_text METADATA _id
| DISSECT st_logs """%{date} %{ip} %{email} %{num}"""
| KEEP st_logs, date, ip, email, num
| SORT st_logs
;

st_logs:text | date:keyword | ip:keyword | email:keyword | num:keyword
2023-01-23T12:15:00.000Z 127.0.0.1 [email protected] 42 | 2023-01-23T12:15:00.000Z | 127.0.0.1 | [email protected] | 42
2024-01-23T12:15:00.000Z 1.2.3.4 [email protected] 42 | 2024-01-23T12:15:00.000Z | 1.2.3.4 | [email protected] | 42
2024-12-23T12:15:00.000Z 1.2.3.4 [email protected] 4553 | 2024-12-23T12:15:00.000Z | 1.2.3.4 | [email protected] | 4553
;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests were pulled in from main, should we keep them?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're not part of 8.x - I'll let @ioanatia call this one out

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are missing because the auto backport failed for #117337 - I looked at the PR and I think we should only include the tests. This PR made changes that assumed we will have a semantic_text field type in ES|QL and this is no longer the case. The tests would be good to keep, we can validate that commands like GROK or DISSECT will continue to work with fields mapped as semantic_text.

@Mikep86 Mikep86 added the :SearchOrg/Relevance Label for the Search (solution/org) Relevance team label Jan 10, 2025
Copy link
Member

@carlosdelest carlosdelest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include the changes from #119940, and add the test-release label to double check we're not causing trouble for CSV tests?

@Mikep86 Mikep86 added the test-release Trigger CI checks against release build label Jan 10, 2025
@Mikep86
Copy link
Contributor Author

Mikep86 commented Jan 10, 2025

buildkite test this

@Mikep86 Mikep86 merged commit c8ba0f3 into elastic:8.x Jan 13, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :SearchOrg/Relevance Label for the Search (solution/org) Relevance team test-release Trigger CI checks against release build v8.18.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants