Skip to content

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

Merged
Mikep86 merged 3 commits intoelastic:8.xfrom
Mikep86:backport/8.x/pr-119792
Jan 13, 2025
Merged

[8.x] Make semantic text part of the text family (#119792)#119962
Mikep86 merged 3 commits intoelastic:8.xfrom
Mikep86:backport/8.x/pr-119792

Conversation

@Mikep86
Copy link
Copy Markdown
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 <ioana.tagirta@elastic.co>
(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 some.email@foo.com 42 | 2023-01-23T12:15:00.000Z | 127.0.0.1 | some.email@foo.com | 42
2024-01-23T12:15:00.000Z 1.2.3.4 foo@example.com 42 | 2024-01-23T12:15:00.000Z | 1.2.3.4 | foo@example.com | 42
2024-12-23T12:15:00.000Z 1.2.3.4 example@example.com 4553 | 2024-12-23T12:15:00.000Z | 1.2.3.4 | example@example.com | 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 some.email@foo.com 42 | 2023-01-23T12:15:00.000Z | 127.0.0.1 | some.email@foo.com | 42
2024-01-23T12:15:00.000Z 1.2.3.4 foo@example.com 42 | 2024-01-23T12:15:00.000Z | 1.2.3.4 | foo@example.com | 42
2024-12-23T12:15:00.000Z 1.2.3.4 example@example.com 4553 | 2024-12-23T12:15:00.000Z | 1.2.3.4 | example@example.com | 4553
;

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Contributor Author

Mikep86 commented Jan 10, 2025

buildkite test this

@Mikep86 Mikep86 merged commit c8ba0f3 into elastic:8.x Jan 13, 2025
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