Skip to content

Conversation

@JoshMock
Copy link
Member

@JoshMock JoshMock commented Sep 3, 2024

Fixes #2109.

@l-trotta
Copy link
Contributor

l-trotta commented Sep 5, 2024

FunctionScoreQuery was recently updated with the @shortcut property which allowed us to accept every variant of the query, are we sure we need this?

@JoshMock
Copy link
Member Author

JoshMock commented Sep 5, 2024

I'm not entirely sure @shortcut_property covers all of this. As @swallez noted here, the issue is that all the properties of FunctionScoreContainer can be used on the same level as boost_mode, max_boost, etc. OR a functions property can be provided that includes one function object or an array of function objects.

pquentin
pquentin previously approved these changes Sep 9, 2024
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM.

@pquentin pquentin dismissed their stale review September 9, 2024 10:04

Laura plans to take more time to review this.

@l-trotta
Copy link
Contributor

l-trotta commented Sep 12, 2024

we need to rename FunctionScoreContainer, the java generator (and maybe others?) removes the "Container" part of the name, and since FunctionScore already exists there's a duplicate error. Does FunctionScoreCommonContainer sounds okay?

Or renaming FunctionScore back to FunctionScoreQuery as is was before - feels weird being the only Query field that is not called SomethingQuery.

@l-trotta
Copy link
Contributor

After discussing it with the other static clients maintainer we have decided that supporting this would require too much effort compared to the benefits (since it's not a unique feature, but just an alternative syntax). If we were to discover a case where this is absolutely necessary to implement in the dynamic clients then we can review this solution again as a starting point and the static client can ignore it from the generator.

@JoshMock
Copy link
Member Author

Thanks @l-trotta!

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.

function_score type in QueryDslQueryContainer interface seems incorrect

4 participants