-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
has_parent builder: exception message/param fix #31182
has_parent builder: exception message/param fix #31182
Conversation
Pinging @elastic/es-search-aggs |
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.
Thanks @nirmalc for the fix! I left a small comment.
@@ -74,7 +74,7 @@ public HasParentQueryBuilder(String type, QueryBuilder query, boolean score) { | |||
} | |||
|
|||
private HasParentQueryBuilder(String type, QueryBuilder query, boolean score, InnerHitBuilder innerHitBuilder) { | |||
this.type = requireValue(type, "[" + NAME + "] requires 'type' field"); | |||
this.type = requireValue(type, "[" + NAME + "] requires 'parent_type' field"); |
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.
To avoid this getting out-of-sync in the future, it would be nice to use PARENT_TYPE_FIELD.getPreferredName()
instead of hard-coding parent_type
. The same idea applies to query
below.
has_parent builder throws exception message that it expects a `type` while parser excepts `parent_type`
4aa0e42
to
870a90f
Compare
Thanks for review, I've updated and rebased with latest master |
@elasticmachine test this please |
* elastic/ccr: (30 commits) Enable setting client path prefix to / (elastic#30119) [DOCS] Secure settings specified per node (elastic#31621) has_parent builder: exception message/param fix (elastic#31182) TEST: Randomize soft-deletes settings (elastic#31585) Mute 'Test typed keys parameter for suggesters' as we await a fix. Build test: Thread linger Fix gradle4.8 deprecation warnings (elastic#31654) Mute FileRealmTests#testAuthenticateCaching with an @AwaitsFix. Mute TransportChangePasswordActionTests#testIncorrectPasswordHashingAlgorithm with an @AwaitsFix. Build: Fix naming conventions task (elastic#31681) Introduce a Hashing Processor (elastic#31087) Do not check for object existence when deleting repository index files (elastic#31680) Remove extra check for object existence in repository-gcs read object (elastic#31661) Support multiple system store types (elastic#31650) [Test] Clean up some repository-s3 tests (elastic#31601) [Docs] Use capital letters in section headings (elastic#31678) muted tests that will be replaced by the shard follow task refactoring: elastic#31581 [DOCS] Add PQL language Plugin (elastic#31237) Merge AzureStorageService and AzureStorageServiceImpl and clean up tests (elastic#31607) TEST: Fix test task invocation (elastic#31657) ...
has_parent builder throws exception message that it expects a `type` while parser excepts `parent_type`
has_parent builder throws exception message that it expects a `type` while parser excepts `parent_type`
The issue is still on 6x so I pushed the fix for this version (also in 6.5.1). |
has_parent builder throws exception message that it expects a
type
while parser excepts
parent_type