Skip to content
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

ESQL: Pushdown Like query where possible #124568

Open
costin opened this issue Mar 11, 2025 · 2 comments
Open

ESQL: Pushdown Like query where possible #124568

costin opened this issue Mar 11, 2025 · 2 comments
Assignees
Labels
:Analytics/ES|QL AKA ESQL >bug >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@costin
Copy link
Member

costin commented Mar 11, 2025

Description

Similar to RLike or StartsWith, Like query can be pushed down to Lucene using a WildcardQuery, which we're already doing for SQL.

@costin costin added >enhancement needs:triage Requires assignment of a team area label labels Mar 11, 2025
@costin costin added :Analytics/ES|QL AKA ESQL >bug and removed needs:triage Requires assignment of a team area label labels Mar 11, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 11, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@ivancea
Copy link
Contributor

ivancea commented Mar 11, 2025

We're pushing it down, the implementation within the function is here:

@Override
public boolean translatable(LucenePushdownPredicates pushdownPredicates) {
return pushdownPredicates.isPushableAttribute(field());
}
@Override
public Query asQuery(TranslatorHandler handler) {
var field = field();
LucenePushdownPredicates.checkIsPushableAttribute(field);
return translateField(handler.nameOf(field instanceof FieldAttribute fa ? fa.exactAttribute() : field));
}

It was implemented here: #120192 (In 8.18.0 and 9.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >bug >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

3 participants