Skip to content

Conversation

pmpailis
Copy link
Contributor

@pmpailis pmpailis commented Oct 15, 2025

We want to ensure that the SCORE function will be executed on data nodes even when dealing with eval FUNCTION. To that end, in this PR we update the PushDownAndCombineLimits rule so that LIMIT is not pushed further from an EVAL expression if:

  • any of the expressions is SCORE
  • rule is applied on the coordinator node

By doing so, the eval is pushed to the data node, where the check above does not hold, so that the limit is pushed and reaches the underlying LuceneOperator.

Closes #133462.

@pmpailis pmpailis changed the title [ES|QL] pushing down score function [ES|QL] pushing down eval expression when it requires data access Oct 16, 2025
@pmpailis pmpailis added >non-issue :Search Relevance/ES|QL Search functionality in ES|QL >bug and removed >non-issue labels Oct 17, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @pmpailis, I've created a changelog YAML for you.

…thub.com:pmpailis/elasticsearch into fix_133462_fixing_score_function_error_no_shards
@pmpailis pmpailis marked this pull request as ready for review October 17, 2025 10:32
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Oct 17, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Search Relevance/ES|QL Search functionality in ES|QL Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ES|QL: score function pushdown error

2 participants