fix MultiValuesSourceFieldConfig toXContent#36525
Conversation
|
Pinging @elastic/es-analytics-geo |
|
@polyfractal I was interested in adding actual tests for the aggregation as well since I couldn't find any. Do we have to/from xcontent tests somewhere for the weighted_avg aggregation? I tried my hand, but For example, here is a snippet of the generated xcontent: There is an extra |
|
I assume I am missing some context, but I went ahead and added a second commit that demonstrates what I meant by my previous comment |
polyfractal
left a comment
There was a problem hiding this comment.
Thanks @talevy! Left a few comments, otherwise LGTM.
Should this target master, not just 6.x?
.../java/org/elasticsearch/search/aggregations/support/MultiValuesSourceAggregationBuilder.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Should we snag the code from BaseAggregatorTestCase#parse() so that we have a similar set of assertions here?
There was a problem hiding this comment.
oh woah, yeah, I'll lift that...
thanks for the pointer, was looking for something like that to re-use
There was a problem hiding this comment.
I think that if we want to change this, we might need to wrap this in version checks? readOptionalString() encodes an extra byte for the boolean
There was a problem hiding this comment.
OK. maybe we can do this in a separate PR. I think Docs need clean up too. We claim that field is required, but it can be replaced with script.
I see this as a bug, but want to attack this separately since the original issue was only with XContent.
This commit turns MultiValuesSourceFieldConfig into a proper ToXContentObject for easy testing and verification of its to/from XContent methods. Closes elastic#36474.
|
Hey @polyfractal, I know you approved this, but I've reverted the serialization changes, mind taking another look? As I said previously. the bug in the serialization is not the concern of this PR. |
polyfractal
left a comment
There was a problem hiding this comment.
👍 looks good! ++ to doing the serialization stuff in a followup PR (agree it's a bug and the docs should be updated to match)
|
thanks for the review @polyfractal! |
This commit turns MultiValuesSourceFieldConfig into a proper ToXContentObject for easy testing and verification of its to/from XContent methods. Closes #36474.
This commit turns MultiValuesSourceFieldConfig into a proper ToXContentObject for easy testing and verification of its to/from XContent methods. Closes #36474.
* elastic/master: Remove deprecated `useDisMax` from MultiMatchQuery (elastic#36488) HLRC: Add get users action (elastic#36332) fix MultiValuesSourceFieldConfig toXContent (elastic#36525) Add ILM-specific security privileges (elastic#36493) Remove usages of `MockTcpTransport` from zen tests (elastic#36579)
|
This is also broken on the 6.4 branch, would it be possible to back port the fix there as well? |
This commit turns MultiValuesSourceFieldConfig into a proper
ToXContentObject for easy testing and verification of its
to/from XContent methods.
Closes #36474.