-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix field resolution for ExposedFieldsAggregationContext. #4328
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
Conversation
This commit fixes an issue where the context is not relaxed and errors on unknown fields if multiple stages of nesting contexts happen.
@@ -96,6 +96,25 @@ private FieldReference getReference(@Nullable Field field, String name) { | |||
return exposedField; | |||
} | |||
|
|||
if(rootContext instanceof RelaxedTypeBasedAggregationOperationContext) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about rootContext.getReference(…)
? Wouldn't that work as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC it broke one of the existing tests for _id
field projection.
That's merged and polished now. |
This PR fixes an issue where the context is not relaxed and errors on unknown fields if multiple stages of nesting contexts happen.
Closes: #3917