Skip to content

ES|QL - Allow full text functions to be used in EVAL #125482

@carlosdelest

Description

@carlosdelest
Member

Description

Full text functions should be usable in EVAL:

FROM books 
| EVAL m = author:"tolkien"

Activity

elasticsearchmachine

elasticsearchmachine commented on Mar 24, 2025

@elasticsearchmachine
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

elasticsearchmachine

elasticsearchmachine commented on Mar 24, 2025

@elasticsearchmachine
Collaborator

Pinging @elastic/kibana-esql (ES|QL-ui)

ioanatia

ioanatia commented on Jul 7, 2025

@ioanatia
Contributor

I wonder if we can close this one if favour of using the score function #120082

With the score function we can have:

FROM books 
| EVAL m = score(author:"tolkien") > 0

which would be the equivalent of what this issue is proposing.

carlosdelest

carlosdelest commented on Jul 7, 2025

@carlosdelest
MemberAuthor

@ioanatia I don't think it's the same - in EVAL we would get a true or false, as full text functions are boolean functions. Using score function allows to get the score part in EVAL but not the result of the full text function itself.

ioanatia

ioanatia commented on Jul 7, 2025

@ioanatia
Contributor

If you want to evaluate in an EVAL whether author:"tolkien" is true, doesn't it suffice to just check if it's score is bigger than 0?
I am not sure how it's different.

carlosdelest

carlosdelest commented on Jul 7, 2025

@carlosdelest
MemberAuthor

It's not the same as in the type returned is not the one the function provides. A boolean function should evaluate to a boolean, not a number IMO.

ioanatia

ioanatia commented on Jul 7, 2025

@ioanatia
Contributor

is m supposed to be a boolean in this example? or something else?

FROM books 
| EVAL m = author:"tolkien"

because in the case of using the score function, m here is a boolean:

FROM books 
| EVAL m = score(author:"tolkien") > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @carlosdelest@ioanatia@elasticsearchmachine

        Issue actions

          ES|QL - Allow full text functions to be used in EVAL · Issue #125482 · elastic/elasticsearch