-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ESQL - Remove restrictions for disjunctions in full text functions #118544
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
Changes from all commits
0766c5d
ab91f4c
6097a0d
68e88ef
c198d91
c91cf7c
47be335
3a9e468
da32a06
60221ba
191e710
9860680
1056909
b3e9a64
657c447
6449d22
8901591
d213d76
4968e9e
317f7d8
1cd80aa
d4789dd
d3b5dce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pr: 118544 | ||
| summary: ESQL - Remove restrictions for disjunctions in full text functions | ||
| area: ES|QL | ||
| type: enhancement | ||
| issues: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,6 +115,80 @@ book_no:keyword | title:text | |
| 7140 |The Lord of the Rings Poster Collection: Six Paintings by Alan Lee (No. 1) | ||
| ; | ||
|
|
||
| matchWithDisjunction | ||
| required_capability: match_function | ||
| required_capability: full_text_functions_disjunctions | ||
|
|
||
| from books | ||
| | where match(author, "Vonnegut") or match(author, "Guinane") | ||
| | keep book_no, author; | ||
| ignoreOrder:true | ||
|
|
||
| book_no:keyword | author:text | ||
| 2464 | Kurt Vonnegut | ||
| 6970 | Edith Vonnegut | ||
| 8956 | Kurt Vonnegut | ||
| 3950 | Kurt Vonnegut | ||
| 4382 | Carole Guinane | ||
| ; | ||
|
|
||
| matchWithDisjunctionAndFiltersConjunction | ||
| required_capability: match_function | ||
| required_capability: full_text_functions_disjunctions | ||
|
|
||
| from books | ||
| | where (match(author, "Vonnegut") or match(author, "Guinane")) and year > 1997 | ||
| | keep book_no, author, year; | ||
| ignoreOrder:true | ||
|
|
||
| book_no:keyword | author:text | year:integer | ||
| 6970 | Edith Vonnegut | 1998 | ||
| 4382 | Carole Guinane | 2001 | ||
| ; | ||
|
|
||
| matchWithDisjunctionAndConjunction | ||
| required_capability: match_function | ||
| required_capability: full_text_functions_disjunctions | ||
|
|
||
| from books | ||
| | where (match(author, "Vonnegut") or match(author, "Marquez")) and match(description, "realism") | ||
| | keep book_no; | ||
|
|
||
| book_no:keyword | ||
| 4814 | ||
| ; | ||
|
|
||
| matchWithMoreComplexDisjunctionAndConjunction | ||
| required_capability: match_function | ||
| required_capability: full_text_functions_disjunctions | ||
|
|
||
| from books | ||
| | where (match(author, "Vonnegut") and match(description, "charming")) or (match(author, "Marquez") and match(description, "realism")) | ||
| | keep book_no; | ||
| ignoreOrder:true | ||
|
|
||
| book_no:keyword | ||
| 6970 | ||
| 4814 | ||
| ; | ||
|
|
||
| matchWithDisjunctionIncludingConjunction | ||
| required_capability: match_function | ||
| required_capability: full_text_functions_disjunctions | ||
|
|
||
| from books | ||
| | where match(author, "Vonnegut") or (match(author, "Marquez") and match(description, "realism")) | ||
| | keep book_no; | ||
| ignoreOrder:true | ||
|
|
||
| book_no:keyword | ||
| 2464 | ||
| 6970 | ||
| 4814 | ||
| 8956 | ||
| 3950 | ||
| ; | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a few more queries with nested AND/OR(in csv and yml tests), similar as the one below, and perhaps make it a bit more complicated? It will be helpful to catch some surprises.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. perhaps we can add an IT which programmatically adds a random number of nested disjunctions?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for checking this, I added some more tests as this test case needed some code changes.
Agreed, we need to change the tests for full text functions to include this kind of testing. Let's do that on a separate PR and issue. |
||
| matchWithFunctionPushedToLucene | ||
| required_capability: match_function | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.