Skip to content

Conversation

Those shortcuts are not supported by the Elasticsearch specification.
@pquentin pquentin added >docs General docs changes >non-issue :Search Relevance/Ranking Scoring, rescoring, rank evaluation. Team:Clients Meta label for clients team auto-backport Automatically create backport pull requests when merged :Search Foundations/Search Catch all for Search Foundations branch:9.2 branch:9.1 branch:8.19 labels Oct 31, 2025
@elasticsearchmachine elasticsearchmachine added v9.3.0 v9.2.1 v8.19.7 v9.1.7 Team:Docs Meta label for docs team Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch and removed branch:9.2 branch:9.1 labels Oct 31, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine removed branch:8.19 Team:Clients Meta label for clients team labels Oct 31, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/core-docs (Team:Docs)

@pquentin
Copy link
Member Author

Just realized that an array is actually mandatory here, I'll fix this PR. Sorry!

} else if (token == XContentParser.Token.START_ARRAY) {
if (FUNCTIONS_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
if (singleFunctionFound) {
String errorString = "already found [" + singleFunctionName + "], now encountering [functions].";
handleMisplacedFunctionsDeclaration(parser.getTokenLocation(), errorString);
}
functionArrayFound = true;
currentFieldName = parseFiltersAndFunctions(parser, filterFunctionBuilders);
} else {

@pquentin
Copy link
Member Author

Closing for now, I may reopen in the future by using the full form:

GET /_search
{
  "query": {
    "function_score": {
      "query": { "match_all": {} },
      "boost": "5",
      "functions": [
        {
          "filter": { "match": { "test": "bar" } },
          "random_score": {},
          "weight": 23
        }
      ],
     }
  }
}
```

@pquentin pquentin closed this Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >docs General docs changes >non-issue :Search Foundations/Search Catch all for Search Foundations :Search Relevance/Ranking Scoring, rescoring, rank evaluation. Team:Docs Meta label for docs team Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v8.19.7 v9.1.7 v9.2.1 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants