Skip to content

Conversation

@pquentin
Copy link
Member

@pquentin pquentin commented Oct 30, 2025

Note that this is not about supporting the shortcut form that we decided that we wouldn't support: #2852 (comment). This is just allowing the verbose form to be slightly smaller when there's a single function. And it's not breaking since X[] and X | X[] are equivalent for typed clients.

This allows turning this:

"function_score": {
  "functions": [
    {
      "random_score": {}
    }
  ]
}

into this:

"function_score": {
  "functions": {
    "random_score": {}
  }
}

which is nicer.

@github-actions
Copy link
Contributor

Following you can find the validation changes against the target branch for the API.

API Status Request Response
search 🔴 2640/2659 → 2646/2659 2659/2659

You can validate this API yourself by using the make validate target.

@pquentin pquentin requested review from flobernd and l-trotta October 30, 2025 13:19
@pquentin pquentin merged commit 9bd939c into main Oct 30, 2025
14 checks passed
@pquentin pquentin deleted the functions-score-single-function branch October 30, 2025 13:42
github-actions bot pushed a commit that referenced this pull request Oct 30, 2025
github-actions bot pushed a commit that referenced this pull request Oct 30, 2025
github-actions bot pushed a commit that referenced this pull request Oct 30, 2025
pquentin added a commit that referenced this pull request Oct 30, 2025
(cherry picked from commit 9bd939c)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
pquentin added a commit that referenced this pull request Oct 30, 2025
(cherry picked from commit 9bd939c)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
pquentin added a commit that referenced this pull request Oct 30, 2025
(cherry picked from commit 9bd939c)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
pquentin added a commit that referenced this pull request Oct 31, 2025
pquentin added a commit that referenced this pull request Oct 31, 2025
github-actions bot pushed a commit that referenced this pull request Oct 31, 2025
github-actions bot pushed a commit that referenced this pull request Oct 31, 2025
github-actions bot pushed a commit that referenced this pull request Oct 31, 2025
pquentin added a commit that referenced this pull request Oct 31, 2025
#5589) (#5592)

This reverts commit 9bd939c.

(cherry picked from commit ea95e94)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
pquentin added a commit that referenced this pull request Oct 31, 2025
#5589) (#5591)

This reverts commit 9bd939c.

(cherry picked from commit ea95e94)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
pquentin added a commit that referenced this pull request Oct 31, 2025
#5589) (#5590)

This reverts commit 9bd939c.

(cherry picked from commit ea95e94)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
margaretjgu pushed a commit that referenced this pull request Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants