Skip to content

Commit cecbe31

Browse files
kderussocarlosdelestelasticsearchmachineafoucretioanatia
authored
[8.19] [ES|QL] Add MATCH_PHRASE (#127661) (#129215)
* [ES|QL] Add MATCH_PHRASE (#127661) * Initial commit of match_phrase * Add MatchPhraseQueryTests * First pass at CSV specs * Update docs/changelog/127661.yaml * Refactor so MatchPhrase doesn't use all fulltext test cases, just text only * Fix tests * Add some CSV test cases * Fix test * Update changelog * Update tests * Comment out MATCH_PHRASE in search-functions Markdown * Minor PR feedback * PR feedback - refactor/consolidate code * Add some more tests * Fix some tests * [CI] Auto commit changes from spotless * Fix tests * PR feedback - add tests, support boost and numeric data * Revert "PR feedback - add tests, support boost and numeric data" This reverts commit 4e7a699. * Apply testing/PR feedback outside numeric support only * Regenerate docs * Add negative test * Update x-pack/plugin/esql/qa/testFixtures/src/main/resources/match-phrase-function.csv-spec Co-authored-by: Carlos Delgado <[email protected]> * Update x-pack/plugin/esql/qa/testFixtures/src/main/resources/match-phrase-function.csv-spec Co-authored-by: Carlos Delgado <[email protected]> * Update x-pack/plugin/esql/qa/testFixtures/src/main/resources/match-phrase-function.csv-spec Co-authored-by: Carlos Delgado <[email protected]> * PR feedback * Fix auto-commit error * Regenerate docs * Update x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchPhrase.java Co-authored-by: Liam Thompson <[email protected]> * Remove non text field types * Fake test data * Remove tests that no longer should pass without ip/date/version support * Put real data in score tests now that I was able to engineer a failure * Realized the scoring test might be flakey because how it was written, updated * PR feedback * PR feedback * [CI] Auto commit changes from spotless * Add check to MatchPhrase tests * Fix merge errors * [CI] Auto commit changes from spotless * Test generated docs * Add additional verifier tests --------- Co-authored-by: elasticsearchmachine <[email protected]> Co-authored-by: Carlos Delgado <[email protected]> Co-authored-by: Liam Thompson <[email protected]> (cherry picked from commit eee423a) # Conflicts: # docs/reference/esql/functions/description/match_phrase.md # docs/reference/esql/functions/examples/match_phrase.md # docs/reference/esql/functions/kibana/definition/match_phrase.json # docs/reference/esql/functions/kibana/docs/match_phrase.md # docs/reference/query-languages/esql/_snippets/lists/search-functions.md # docs/reference/query-languages/esql/functions-operators/search-functions.md # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/FullTextFunction.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/QueryString.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java * Take match_phrase out of snapshot and make tech preview (#128925) * Take match_phrase out of snapshot and make tech preview * Update docs/changelog/128925.yaml * PR feedback * Adding regenerated test data * Update docs/changelog/128925.yaml Co-authored-by: Carlos Delgado <[email protected]> * [CI] Auto commit changes from spotless * Checkstyle * Correct docs * Hopefully fix docs build * Found one more bad docs link - here's hoping this now fixes the doc build * OMG bitten by - vs _ --------- Co-authored-by: Carlos Delgado <[email protected]> Co-authored-by: elasticsearchmachine <[email protected]> Co-authored-by: Aurélien FOUCRET <[email protected]> * Remove null example for match_phrase (#129173) * Fix errors from merge * Fix more errors from merge * [CI] Auto commit changes from spotless * Fix compile errors introduced through cherry-pick * Fix test compilation * Generate docs * Register match_phrase as a function not a snapshot function (#129255) * Register match_phrase as a function not a snapshot function * Update usage * Fix usage --------- Co-authored-by: Carlos Delgado <[email protected]> Co-authored-by: elasticsearchmachine <[email protected]> Co-authored-by: Aurélien FOUCRET <[email protected]> Co-authored-by: Ioana Tagirta <[email protected]>
1 parent 881b4ac commit cecbe31

File tree

30 files changed

+1711
-92
lines changed

30 files changed

+1711
-92
lines changed

docs/changelog/127661.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127661
2+
summary: Add MATCH_PHRASE
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/changelog/128925.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128925
2+
summary: ES|QL - Add `match_phrase` full text function (tech preview)
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/reference/esql/functions/description/match_phrase.asciidoc

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/examples/match_phrase.asciidoc

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/functionNamedParams/match_phrase.asciidoc

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/kibana/definition/match_phrase.json

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/kibana/docs/match_phrase.md

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/layout/match_phrase.asciidoc

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/parameters/match_phrase.asciidoc

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/signature/match_phrase.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)