Skip to content

ESQL: improved planning for full-text search functions #130567

Open
@bpintea

Description

@bpintea

Description

Currently, queries with full-text functions like these are rejected by the post-analysis verifications:

FROM employees
| EVAL language_code = languages
| LOOKUP JOIN languages_lookup ON language_code
| WHERE QSTR("first_name:Georg*")

, or even:

FROM employees
| EVAL language_code = languages
| WHERE QSTR("first_name:Georg*")

with a failure like org.elasticsearch.xpack.esql.VerificationException: Found 1 problem line 100:3: [QSTR] function cannot be used after EVAL.

However, in these cases, without the verification check, the filter is pushed down near the source and fuzed into it:

EsQueryExec[employees], indexMode[standard], query[{"query_string":{"query":"first_name:Georg*","fields":[]}}][_doc{f}#58], limit[
1000], sort[] estimatedRowSize[null]

which even allows the optimised execution.

Related: #116261

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions